ETH Price: $2,364.80 (-5.10%)
Gas: 0.7 Gwei

Contract

0x1b05623800526da9c03De7583917344d5d30e139
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xe4DfC679...5b726005f
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
UpgraderToVersionManager

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 999 runs

Other Settings:
default evmVersion, GNU GPLv3 license

Contract Source Code (Solidity Multiple files format)

File 1 of 7: UpgraderToVersionManager.sol
// Copyright (C) 2018  Argent Labs Ltd. <https://argent.xyz>

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.6.12;

import "./IModule.sol";
import "./IVersionManager.sol";
import "./IModuleRegistry.sol";
import "./ILockStorage.sol";
import "./IWallet.sol";

/**
 * @title UpgraderToVersionManager
 * @notice Temporary module used to add the VersionManager and remove other modules.
 * @author Olivier VDB - <[email protected]>, Julien Niset - <[email protected]>
 */
contract UpgraderToVersionManager is IModule {

    IModuleRegistry private registry;
    ILockStorage private lockStorage;
    address[] public toDisable;
    address public versionManager;

    // *************** Constructor ********************** //

    constructor(
        IModuleRegistry _registry,
        ILockStorage _lockStorage,
        address[] memory _toDisable,
        address _versionManager
    )
        public
    {
        registry = _registry;
        lockStorage = _lockStorage;
        toDisable = _toDisable;
        versionManager = _versionManager;
    }

    // *************** External/Public Functions ********************* //

    /**
     * @notice Perform the upgrade for a wallet. This method gets called when UpgradeToVersionManager is temporarily added as a module.
     * @param _wallet The target wallet.
     */
    function init(address _wallet) public override {
        require(msg.sender == _wallet, "SU: only wallet can call init");
        require(!lockStorage.isLocked(_wallet), "SU: wallet locked");
        require(registry.isRegisteredModule(versionManager), "SU: VersionManager not registered");

        // add VersionManager
        IWallet(_wallet).authoriseModule(versionManager, true);

        // upgrade wallet from version 0 to version 1
        IVersionManager(versionManager).upgradeWallet(_wallet, 1);

        // remove old modules
        for (uint256 i = 0; i < toDisable.length; i++) {
            IWallet(_wallet).authoriseModule(toDisable[i], false);
        }
        // SimpleUpgrader did its job, we no longer need it as a module
        IWallet(_wallet).authoriseModule(address(this), false);
    }

    /**
     * @inheritdoc IModule
     */
    function addModule(address _wallet, address _module) external override {}
}

File 2 of 7: ILimitStorage.sol
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

/**
 * @title ILimitStorage
 * @notice LimitStorage interface
 */
interface ILimitStorage {

    struct Limit {
        // the current limit
        uint128 current;
        // the pending limit if any
        uint128 pending;
        // when the pending limit becomes the current limit
        uint64 changeAfter;
    }

    struct DailySpent {
        // The amount already spent during the current period
        uint128 alreadySpent;
        // The end of the current period
        uint64 periodEnd;
    }

    function setLimit(address _wallet, Limit memory _limit) external;

    function getLimit(address _wallet) external view returns (Limit memory _limit);

    function setDailySpent(address _wallet, DailySpent memory _dailySpent) external;

    function getDailySpent(address _wallet) external view returns (DailySpent memory _dailySpent);

    function setLimitAndDailySpent(address _wallet, Limit memory _limit, DailySpent memory _dailySpent) external;

    function getLimitAndDailySpent(address _wallet) external view returns (Limit memory _limit, DailySpent memory _dailySpent);
}

File 3 of 7: ILockStorage.sol
// Copyright (C) 2018  Argent Labs Ltd. <https://argent.xyz>

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity >=0.5.4 <0.7.0;

interface ILockStorage {
    function isLocked(address _wallet) external view returns (bool);

    function getLock(address _wallet) external view returns (uint256);

    function getLocker(address _wallet) external view returns (address);

    function setLock(address _wallet, address _locker, uint256 _releaseAfter) external;
}

File 4 of 7: IModule.sol
// Copyright (C) 2018  Argent Labs Ltd. <https://argent.xyz>

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity >=0.5.4 <0.7.0;

/**
 * @title IModule
 * @notice Interface for a module.
 * A module MUST implement the addModule() method to ensure that a wallet with at least one module
 * can never end up in a "frozen" state.
 * @author Julien Niset - <[email protected]>
 */
interface IModule {
    /**
     * @notice Inits a module for a wallet by e.g. setting some wallet specific parameters in storage.
     * @param _wallet The wallet.
     */
    function init(address _wallet) external;

    /**	
     * @notice Adds a module to a wallet. Cannot execute when wallet is locked (or under recovery)	
     * @param _wallet The target wallet.	
     * @param _module The modules to authorise.	
     */	
    function addModule(address _wallet, address _module) external;
}

File 5 of 7: IModuleRegistry.sol
// Copyright (C) 2020  Argent Labs Ltd. <https://argent.xyz>

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity >=0.5.4 <0.7.0;

/**
 * @title IModuleRegistry
 * @notice Interface for the registry of authorised modules.
 */
interface IModuleRegistry {
    function registerModule(address _module, bytes32 _name) external;

    function deregisterModule(address _module) external;

    function registerUpgrader(address _upgrader, bytes32 _name) external;

    function deregisterUpgrader(address _upgrader) external;

    function recoverToken(address _token) external;

    function moduleInfo(address _module) external view returns (bytes32);

    function upgraderInfo(address _upgrader) external view returns (bytes32);

    function isRegisteredModule(address _module) external view returns (bool);

    function isRegisteredModule(address[] calldata _modules) external view returns (bool);

    function isRegisteredUpgrader(address _upgrader) external view returns (bool);
}

File 6 of 7: IVersionManager.sol
// Copyright (C) 2018  Argent Labs Ltd. <https://argent.xyz>

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity >=0.5.4 <0.7.0;
pragma experimental ABIEncoderV2;

import "./ILimitStorage.sol";

/**
 * @title IVersionManager
 * @notice Interface for the VersionManager module.
 * @author Olivier VDB - <[email protected]>
 */
interface IVersionManager {
    /**
     * @notice Returns true if the feature is authorised for the wallet
     * @param _wallet The target wallet.
     * @param _feature The feature.
     */
    function isFeatureAuthorised(address _wallet, address _feature) external view returns (bool);

    /**
     * @notice Lets a feature (caller) invoke a wallet.
     * @param _wallet The target wallet.
     * @param _to The target address for the transaction.
     * @param _value The value of the transaction.
     * @param _data The data of the transaction.
     */
    function checkAuthorisedFeatureAndInvokeWallet(
        address _wallet,
        address _to,
        uint256 _value,
        bytes calldata _data
    ) external returns (bytes memory _res);

    /* ******* Backward Compatibility with old Storages and BaseWallet *************** */

    /**
     * @notice Sets a new owner for the wallet.
     * @param _newOwner The new owner.
     */
    function setOwner(address _wallet, address _newOwner) external;

    /**
     * @notice Lets a feature write data to a storage contract.
     * @param _wallet The target wallet.
     * @param _storage The storage contract.
     * @param _data The data of the call
     */
    function invokeStorage(address _wallet, address _storage, bytes calldata _data) external;

    /**
     * @notice Upgrade a wallet to a new version.
     * @param _wallet the wallet to upgrade
     * @param _toVersion the new version
     */
    function upgradeWallet(address _wallet, uint256 _toVersion) external;
 
}

File 7 of 7: IWallet.sol
// Copyright (C) 2018  Argent Labs Ltd. <https://argent.xyz>

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity >=0.5.4 <0.7.0;

/**
 * @title IWallet
 * @notice Interface for the BaseWallet
 */
interface IWallet {
    /**
     * @notice Returns the wallet owner.
     * @return The wallet owner address.
     */
    function owner() external view returns (address);

    /**
     * @notice Returns the number of authorised modules.
     * @return The number of authorised modules.
     */
    function modules() external view returns (uint);

    /**
     * @notice Sets a new owner for the wallet.
     * @param _newOwner The new owner.
     */
    function setOwner(address _newOwner) external;

    /**
     * @notice Checks if a module is authorised on the wallet.
     * @param _module The module address to check.
     * @return `true` if the module is authorised, otherwise `false`.
     */
    function authorised(address _module) external view returns (bool);

    /**
     * @notice Returns the module responsible for a static call redirection.
     * @param _sig The signature of the static call.
     * @return the module doing the redirection
     */
    function enabled(bytes4 _sig) external view returns (address);

    /**
     * @notice Enables/Disables a module.
     * @param _module The target module.
     * @param _value Set to `true` to authorise the module.
     */
    function authoriseModule(address _module, bool _value) external;

    /**
    * @notice Enables a static method by specifying the target module to which the call must be delegated.
    * @param _module The target module.
    * @param _method The static method signature.
    */
    function enableStaticCall(address _module, bytes4 _method) external;
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IModuleRegistry","name":"_registry","type":"address"},{"internalType":"contract ILockStorage","name":"_lockStorage","type":"address"},{"internalType":"address[]","name":"_toDisable","type":"address[]"},{"internalType":"address","name":"_versionManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"},{"internalType":"address","name":"_module","type":"address"}],"name":"addModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"toDisable","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"versionManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806319ab453c146100515780635a1db8c414610079578063c412967b146100a7578063fff3f2c9146100e0575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100e8565b005b6100776004803603604081101561008f57600080fd5b506001600160a01b038135811691602001351661050d565b6100c4600480360360208110156100bd57600080fd5b5035610511565b604080516001600160a01b039092168252519081900360200190f35b6100c4610538565b336001600160a01b03821614610145576040805162461bcd60e51b815260206004820152601d60248201527f53553a206f6e6c792077616c6c65742063616e2063616c6c20696e6974000000604482015290519081900360640190fd5b600154604080517f4a4fbeec0000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015291519190921691634a4fbeec916024808301926020929190829003018186803b1580156101ab57600080fd5b505afa1580156101bf573d6000803e3d6000fd5b505050506040513d60208110156101d557600080fd5b505115610229576040805162461bcd60e51b815260206004820152601160248201527f53553a2077616c6c6574206c6f636b6564000000000000000000000000000000604482015290519081900360640190fd5b600054600354604080517f0bcd4ebb0000000000000000000000000000000000000000000000000000000081526001600160a01b03928316600482015290519190921691630bcd4ebb916024808301926020929190829003018186803b15801561029257600080fd5b505afa1580156102a6573d6000803e3d6000fd5b505050506040513d60208110156102bc57600080fd5b50516102f95760405162461bcd60e51b81526004018080602001828103825260218152602001806105486021913960400191505060405180910390fd5b60035460408051631f17732d60e01b81526001600160a01b03928316600482015260016024820152905191831691631f17732d9160448082019260009290919082900301818387803b15801561034e57600080fd5b505af1158015610362573d6000803e3d6000fd5b5050600354604080517fe3495a390000000000000000000000000000000000000000000000000000000081526001600160a01b03868116600483015260016024830152915191909216935063e3495a399250604480830192600092919082900301818387803b1580156103d457600080fd5b505af11580156103e8573d6000803e3d6000fd5b5050505060005b6002548110156104a557816001600160a01b0316631f17732d6002838154811061041557fe5b6000918252602082200154604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b03909216600483015260248201839052516044808301939282900301818387803b15801561048157600080fd5b505af1158015610495573d6000803e3d6000fd5b5050600190920191506103ef9050565b5060408051631f17732d60e01b815230600482015260006024820181905291516001600160a01b03841692631f17732d926044808201939182900301818387803b1580156104f257600080fd5b505af1158015610506573d6000803e3d6000fd5b5050505050565b5050565b6002818154811061051e57fe5b6000918252602090912001546001600160a01b0316905081565b6003546001600160a01b03168156fe53553a2056657273696f6e4d616e61676572206e6f742072656769737465726564a26469706673582212208de444d11aab0ff3e88204a09cde807f7f6780f77b3d85c4c52fb49f69a3645164736f6c634300060c0033

Deployed Bytecode Sourcemap

1124:1794:6:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1980:814;;;;;;;;;;;;;;;;-1:-1:-1;1980:814:6;-1:-1:-1;;;;;1980:814:6;;:::i;:::-;;2843:73;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2843:73:6;;;;;;;;;;:::i;1252:26::-;;;;;;;;;;;;;;;;-1:-1:-1;1252:26:6;;:::i;:::-;;;;-1:-1:-1;;;;;1252:26:6;;;;;;;;;;;;;;1284:29;;;:::i;1980:814::-;2045:10;-1:-1:-1;;;;;2045:21:6;;;2037:63;;;;;-1:-1:-1;;;2037:63:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;2119:11;;:29;;;;;;-1:-1:-1;;;;;2119:29:6;;;;;;;;;:11;;;;;:20;;:29;;;;;;;;;;;;;;:11;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2119:29:6;2118:30;2110:60;;;;;-1:-1:-1;;;2110:60:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;2188:8;;2216:14;;2188:43;;;;;;-1:-1:-1;;;;;2216:14:6;;;2188:43;;;;;;:8;;;;;:27;;:43;;;;;;;;;;;;;;:8;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2188:43:6;2180:89;;;;-1:-1:-1;;;2180:89:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2343:14;;2310:54;;;-1:-1:-1;;;2310:54:6;;-1:-1:-1;;;;;2343:14:6;;;2310:54;;;;2343:14;2310:54;;;;;;:32;;;;;;:54;;;;;2343:14;;2310:54;;;;;;;;2343:14;2310:32;:54;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2445:14:6;;2429:57;;;;;;-1:-1:-1;;;;;2429:57:6;;;;;;;2445:14;2429:57;;;;;;2445:14;;;;;-1:-1:-1;2429:45:6;;-1:-1:-1;2429:57:6;;;;;2445:14;;2429:57;;;;;;;2445:14;;2429:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2532:9;2527:125;2551:9;:16;2547:20;;2527:125;;;2596:7;-1:-1:-1;;;;;2588:32:6;;2621:9;2631:1;2621:12;;;;;;;;;;;;;;;;;2588:53;;;;;;;;;;;-1:-1:-1;;;;;2621:12:6;;;2588:53;;;;;;;;;;;;;;;;2621:12;2588:53;;;;;2621:12;2588:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2569:3:6;;;;;-1:-1:-1;2527:125:6;;-1:-1:-1;2527:125:6;;-1:-1:-1;2733:54:6;;;-1:-1:-1;;;2733:54:6;;2774:4;2733:54;;;;2781:5;2733:54;;;;;;;;-1:-1:-1;;;;;2733:32:6;;;;;:54;;;;;;;;;;;2781:5;2733:32;:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1980:814;:::o;2843:73::-;;;:::o;1252:26::-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1252:26:6;;-1:-1:-1;1252:26:6;:::o;1284:29::-;;;-1:-1:-1;;;;;1284:29:6;;:::o

Swarm Source

ipfs://8de444d11aab0ff3e88204a09cde807f7f6780f77b3d85c4c52fb49f69a36451

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.