Code Monkey home page Code Monkey logo

safe-deployments's Introduction

Safe Deployments

npm version CI

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

0x31 avatar 0xad1onchain avatar bertux avatar datradito avatar develcuy avatar elviskrop avatar evseevnn avatar germartinez avatar happyleow avatar hirama avatar iamacook avatar inomurko avatar jpalvarezl avatar leonimella avatar leopaul36 avatar mmv08 avatar moisses89 avatar mshakeg avatar msvstj avatar nick8319 avatar nlordell avatar piquinikis avatar pkakelas avatar rmeissner avatar svanegmond avatar t0mcr8se avatar tenthirtyone avatar uxio0 avatar vigan-abd avatar zlog-in avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

safe-deployments's Issues

Evaluate `Aurora Testnet` Chain

RPC: https://testnet.aurora.dev/

Where possible, provide links to the transactions in the block explorer of the chain.

Publish the latest branch to npm

I see that the last publication happened 2 months back. Since then a lot of chains have been added that we need for our project. I request to please publish the latest changes to npm.

Safe is not supported in the web app when L1 contract is used for proxy creation on Polygon

  • I have a Gnosis Safe on Polygon chain created by sending Create Proxy using Safe 1.3.0 as a base contract. Same address is used on Ethereum chain.
  • Importing created Safe to https://gnosis-safe.io/app shows "This Safe was created with an unsupported base contract. The web interface might not work correctly.".
  • If Safe is created from web app, another contract is used as base - Safe L2 1.3.0.

I'm not sure if this warning is a bug or intended behaviour. It seems the only difference in source code between regular 1.3.0 and L2 versions, is that L2 emits additional SafeMultiSigTransaction and SafeModuleTransaction events. Ignoring the warning and sending transaction via imported Safe from web app also works as expected.

If only L2 version is intended to be used as a base on Polygon, what is the reason behind having regular one on this chain?

Improve querying (get a contract filtering by the GnosisSafe version that uses it)

At first, it looks like every new version of the Safe contracts includes a new version for each contract (GnosisSafe, MultiSend, DefaultCallbackHandler, etc.) .

  • GnosisSafe v1.1.1 uses MultiSend v1.1.1
  • GnosisSafe v1.3.0 uses MultiSend v1.3.0

However, this is not always true. A specific version of the GnosisSafe contract might use a contract with a lower version number.

  • GnosisSafe v1.2.0 uses MultiSend v1.1.1 (MultiSend v1.2.0 does not exist)

It would be useful to get the specific contract used by a given GnosisSafe version by adding a new filter with the GnosisSafe version to the DeploymentFilter.

Evaluate `Optimism` Chain

Bridge: https://gateway.optimism.io/

Where possible, provide links to the transactions in the block explorer of the chain.

Evaluate `Aurora` Chain

RPC: https://mainnet.aurora.dev

Where possible, provide links to the transactions in the block explorer of the chain.

Add deployment bytecode

For testing purposes it would be good to be able to deploy the contracts in a local network. Therefore the deployment bytecode should be added

Different proxy factory for Optimism Goerli

Hello guys,

I am trying to predict the safe address with create2 for a cross-chain Safe for goerli, mumbai, optimism-goerli, aurora-testnet, arbitrum-goerli, avalanche-fuji and binance-testnet. The problem is that I am using the proxy factory address as first parameter for getCreate2Address, but optimism-goerli on proxy_factory.json has different address that for example goerli. is this an error or correct?.

I am asking, because I can found the goerli address on optimism-goerli.

Thank you in advance.

[New Chain / Network] Optimism on Gnosis Chain

Will complete as many steps as possible today

Useful Links

Please list any useful links that you encounter in the process. Such as, block explorers, faucets, bridges, etc.
​​

ChainId

Validation steps

As you complete the steps, provide links to the chain's block explorer transactions, to verify the correct execution of the steps.

Where possible, provide links to the transactions in the block explorer of the chain.

[New chain]: Condor Systems Testnet

EVMOS testnet support

Useful Links

Please list any useful links that you encounter in the process. Such as, block explorers, faucets, bridges, etc.

Network info

Validation steps

As you complete the steps, provide links to the chain's block explorer transactions, to verify the correct execution of the steps.

  • If contracts are not deployed. Deploy them using the tool
  • Please document links of interest such as faucets, bridges, block explorer, etc. as comments in this issue.
  • Execute the steps in our internal guide for user side validation of the contracts:
    • Deploy 2 L2 safes
    • Use one safe to wrap and unwrap ETH.
    • Transfer native currency of the chain to one of the safes from your EOA
    • Transfer ERC20 token (please provide link and/or deploy one if necessary) to one of the safes
    • Transfer ERC20 token and native coin between the safes
    • Add an additional owner to one of the safes

Where possible, provide links to the transactions in the block explorer of the chain.

Add existing 1.0.0 contracts

ChainId

1

Chainlist

1

Contract deployed

Version of contracts deployed

v1.0.0

Relevant information

Currently, we only have the GnosisSafe contract address for 1.0.0, and it blocks some projects that are looking to support a wide range of safe versions and rely on this repo to get contract addresses. We should add all 1.0.0 contracts

Add Arbitrum Görli Rollup Testnet

Useful Links

https://developer.offchainlabs.com/docs/public_chains

ChainId

Validation steps

As you complete the steps, provide links to the chain's block explorer transactions, to verify the correct execution of the steps.

Where possible, provide links to the transactions in the block explorer of the chain.

[New chain]: Celo Alfajores testnet

ChainId

44787

Chainlist

https://chainlist.org/chain/44787

Contract deployed

  • I confirm that the contracts are deployed

Version of contracts deployed

v1.3.0

Relevant information

Block explorer: https://explorer.celo.org/alfajores

yarn hardhat sourcify --network custom output:

verifying CompatibilityFallbackHandler (0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4 on chain 44787) ...
 => contract CompatibilityFallbackHandler is now verified
verifying CreateCall (0x7cbB62EaA69F79e6873cD1ecB2392971036cFAa4 on chain 44787) ...
 => contract CreateCall is now verified
verifying DefaultCallbackHandler (0x1AC114C2099aFAf5261731655Dc6c306bFcd4Dbd on chain 44787) ...
 => contract DefaultCallbackHandler is now verified
verifying GnosisSafe (0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552 on chain 44787) ...
 => contract GnosisSafe is now verified
verifying GnosisSafeL2 (0x3E5c63644E683549055b9Be8653de26E0B4CD36E on chain 44787) ...
 => contract GnosisSafeL2 is now verified
verifying GnosisSafeProxyFactory (0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2 on chain 44787) ...
 => contract GnosisSafeProxyFactory is now verified
verifying MultiSend (0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761 on chain 44787) ...
{"error":"Contract name: MultiSend. The deployed and recompiled bytecode don't match."}
verifying MultiSendCallOnly (0x40A2aCCbd92BCA938b02010E17A5b8929b49130D on chain 44787) ...
 => contract MultiSendCallOnly is now verified
verifying SignMessageLib (0xA65387F16B013cf2Af4605Ad8aA5ec25a2cbA3a2 on chain 44787) ...
 => contract SignMessageLib is now verified
verifying SimulateTxAccessor (0x59AD6735bCd8152B84860Cb256dD9e96b85F69Da on chain 44787) ...
{"error":"Contract name: SimulateTxAccessor. The deployed and recompiled bytecode don't match."}

Add Chiado test network

ChainId

10200

Chainlist

https://chainlist.org/chain/10200

Contract deployed

  • I confirm that the contracts are deployed

Version of contracts deployed

v1.3.0

Relevant information

Although the block explorer for Chiado does not provide enough information for deployed contracts, the command:

yarn hardhat --network chiado deploy

returns:

reusing "SimulateTxAccessor" at 0x59AD6735bCd8152B84860Cb256dD9e96b85F69Da
reusing "GnosisSafeProxyFactory" at 0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2
reusing "DefaultCallbackHandler" at 0x1AC114C2099aFAf5261731655Dc6c306bFcd4Dbd
reusing "CompatibilityFallbackHandler" at 0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4
reusing "CreateCall" at 0x7cbB62EaA69F79e6873cD1ecB2392971036cFAa4
reusing "MultiSend" at 0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761
reusing "MultiSendCallOnly" at 0x40A2aCCbd92BCA938b02010E17A5b8929b49130D
reusing "SignMessageLib" at 0xA65387F16B013cf2Af4605Ad8aA5ec25a2cbA3a2
reusing "GnosisSafeL2" at 0x3E5c63644E683549055b9Be8653de26E0B4CD36E
reusing "GnosisSafe" at 0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552

meaning that the contracts are deployed.
I also checked the method await provider.getCode(<address>) from ethers.js

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.