Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
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 0xF1C0aCe1...8A349C1ce The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
SimpleUpgrader
Compiler Version
v0.8.3+commit.8d00100c
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-04-19 */ // 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.8.3; /** * @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; } /** * @title IModule * @notice Interface for a Module. * @author Julien Niset - <[email protected]>, Olivier VDB - <[email protected]> */ interface IModule { /** * @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; /** * @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 Returns whether the module implements a callback for a given static call method. * @param _methodId The method id. */ function supportsStaticCall(bytes4 _methodId) external view returns (bool _isSupported); } /** * @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); } /** * @title SimpleUpgrader * @notice Temporary module used to add/remove other modules. * @author Olivier VDB - <[email protected]>, Julien Niset - <[email protected]> */ contract SimpleUpgrader is IModule { IModuleRegistry private registry; address[] public toDisable; address[] public toEnable; // *************** Constructor ********************** // constructor( IModuleRegistry _registry, address[] memory _toDisable, address[] memory _toEnable ) { registry = _registry; toDisable = _toDisable; toEnable = _toEnable; } // *************** External/Public Functions ********************* // /** * @notice Perform the upgrade for a wallet. This method gets called when SimpleUpgrader is temporarily added as a module. * @param _wallet The target wallet. */ function init(address _wallet) external override { require(msg.sender == _wallet, "SU: only wallet can call init"); require(registry.isRegisteredModule(toEnable), "SU: module not registered"); uint256 i = 0; //add new modules for (; i < toEnable.length; i++) { IWallet(_wallet).authoriseModule(toEnable[i], true); } //remove old modules for (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 pure override { revert("SU: method not implemented"); } /** * @inheritdoc IModule */ function supportsStaticCall(bytes4 /*_methodId*/) external pure override returns (bool _isSupported) { return false; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IModuleRegistry","name":"_registry","type":"address"},{"internalType":"address[]","name":"_toDisable","type":"address[]"},{"internalType":"address[]","name":"_toEnable","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"addModule","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"name":"supportsStaticCall","outputs":[{"internalType":"bool","name":"_isSupported","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"toDisable","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"toEnable","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100575760003560e01c806319ab453c1461005c57806325b50934146100715780635a1db8c414610099578063c412967b146100ac578063d0d603e1146100d7575b600080fd5b61006f61006a366004610492565b6100ea565b005b61008461007f366004610505565b6103f1565b60405190151581526020015b60405180910390f35b61006f6100a73660046104b3565b6103f9565b6100bf6100ba36600461052d565b610441565b6040516001600160a01b039091168152602001610090565b6100bf6100e536600461052d565b61046b565b336001600160a01b038216146101475760405162461bcd60e51b815260206004820152601d60248201527f53553a206f6e6c792077616c6c65742063616e2063616c6c20696e697400000060448201526064015b60405180910390fd5b600054604051631aec629560e21b81526001600160a01b0390911690636bb18a549061017890600290600401610545565b60206040518083038186803b15801561019057600080fd5b505afa1580156101a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101c891906104e5565b6102145760405162461bcd60e51b815260206004820152601960248201527f53553a206d6f64756c65206e6f74207265676973746572656400000000000000604482015260640161013e565b60005b6002548110156102d057816001600160a01b0316631f17732d6002838154811061025157634e487b7160e01b600052603260045260246000fd5b60009182526020909120015460405160e083901b6001600160e01b03191681526001600160a01b03909116600482015260016024820152604401600060405180830381600087803b1580156102a557600080fd5b505af11580156102b9573d6000803e3d6000fd5b5050505080806102c890610595565b915050610217565b5060005b60015481101561038d57816001600160a01b0316631f17732d6001838154811061030e57634e487b7160e01b600052603260045260246000fd5b600091825260208220015460405160e084901b6001600160e01b03191681526001600160a01b0390911660048201526024810191909152604401600060405180830381600087803b15801561036257600080fd5b505af1158015610376573d6000803e3d6000fd5b50505050808061038590610595565b9150506102d4565b604051631f17732d60e01b8152306004820152600060248201526001600160a01b03831690631f17732d90604401600060405180830381600087803b1580156103d557600080fd5b505af11580156103e9573d6000803e3d6000fd5b505050505050565b60005b919050565b60405162461bcd60e51b815260206004820152601a60248201527f53553a206d6574686f64206e6f7420696d706c656d656e746564000000000000604482015260640161013e565b6001818154811061045157600080fd5b6000918252602090912001546001600160a01b0316905081565b6002818154811061045157600080fd5b80356001600160a01b03811681146103f457600080fd5b6000602082840312156104a3578081fd5b6104ac8261047b565b9392505050565b600080604083850312156104c5578081fd5b6104ce8361047b565b91506104dc6020840161047b565b90509250929050565b6000602082840312156104f6578081fd5b815180151581146104ac578182fd5b600060208284031215610516578081fd5b81356001600160e01b0319811681146104ac578182fd5b60006020828403121561053e578081fd5b5035919050565b6020808252825482820181905260008481528281209092916040850190845b818110156105895783546001600160a01b031683526001938401939285019201610564565b50909695505050505050565b60006000198214156105b557634e487b7160e01b81526011600452602481fd5b506001019056fea2646970667358221220052b0fbd55648bcaf8a8ff4f19967b0e841e4e4915986b5c3a8eae1301fbf55964736f6c63430008030033
Deployed Bytecode Sourcemap
4440:1796:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5165:688;;;;;;:::i;:::-;;:::i;:::-;;6100:133;;;;;;:::i;:::-;;:::i;:::-;;;2925:14:1;;2918:22;2900:41;;2888:2;2873:18;6100:133:0;;;;;;;;5907:139;;;;;;:::i;:::-;;:::i;4523:26::-;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;1663:55:1;;;1645:74;;1633:2;1618:18;4523:26:0;1600:125:1;4556:25:0;;;;;;:::i;:::-;;:::i;5165:688::-;5233:10;-1:-1:-1;;;;;5233:21:0;;;5225:63;;;;-1:-1:-1;;;5225:63:0;;3863:2:1;5225:63:0;;;3845:21:1;3902:2;3882:18;;;3875:30;3941:31;3921:18;;;3914:59;3990:18;;5225:63:0;;;;;;;;;5307:8;;:37;;-1:-1:-1;;;5307:37:0;;-1:-1:-1;;;;;5307:8:0;;;;:27;;:37;;5335:8;;5307:37;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5299:75;;;;-1:-1:-1;;;5299:75:0;;3154:2:1;5299:75:0;;;3136:21:1;3193:2;3173:18;;;3166:30;3232:27;3212:18;;;3205:55;3277:18;;5299:75:0;3126:175:1;5299:75:0;5387:9;5438:111;5449:8;:15;5445:19;;5438:111;;;5494:7;-1:-1:-1;;;;;5486:32:0;;5519:8;5528:1;5519:11;;;;;;-1:-1:-1;;;5519:11:0;;;;;;;;;;;;;;;;;;;5486:51;;;;;;-1:-1:-1;;;;;;5486:51:0;;;-1:-1:-1;;;;;5519:11:0;;;5486:51;;;1898:74:1;5519:11:0;1988:18:1;;;1981:50;1871:18;;5486:51:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5466:3;;;;;:::i;:::-;;;;5438:111;;;-1:-1:-1;5598:1:0;5589:119;5605:9;:16;5601:20;;5589:119;;;5651:7;-1:-1:-1;;;;;5643:32:0;;5676:9;5686:1;5676:12;;;;;;-1:-1:-1;;;5676:12:0;;;;;;;;;;;;;;;;;;5643:53;;;;;;-1:-1:-1;;;;;;5643:53:0;;;-1:-1:-1;;;;;5676:12:0;;;5643:53;;;1898:74:1;1988:18;;;1981:50;;;;1871:18;;5643:53:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5623:3;;;;;:::i;:::-;;;;5589:119;;;5791:54;;-1:-1:-1;;;5791:54:0;;5832:4;5791:54;;;1898:74:1;5839:5:0;1988:18:1;;;1981:50;-1:-1:-1;;;;;5791:32:0;;;;;1871:18:1;;5791:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5165:688;;:::o;6100:133::-;6182:17;6100:133;;;;:::o;5907:139::-;6002:36;;-1:-1:-1;;;6002:36:0;;3508:2:1;6002:36:0;;;3490:21:1;3547:2;3527:18;;;3520:30;3586:28;3566:18;;;3559:56;3632:18;;6002:36:0;3480:176:1;4523:26:0;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4523:26:0;;-1:-1:-1;4523:26:0;:::o;4556:25::-;;;;;;;;;;;;14:196:1;82:20;;-1:-1:-1;;;;;131:54:1;;121:65;;111:2;;200:1;197;190:12;215:196;;327:2;315:9;306:7;302:23;298:32;295:2;;;348:6;340;333:22;295:2;376:29;395:9;376:29;:::i;:::-;366:39;285:126;-1:-1:-1;;;285:126:1:o;416:270::-;;;545:2;533:9;524:7;520:23;516:32;513:2;;;566:6;558;551:22;513:2;594:29;613:9;594:29;:::i;:::-;584:39;;642:38;676:2;665:9;661:18;642:38;:::i;:::-;632:48;;503:183;;;;;:::o;691:297::-;;811:2;799:9;790:7;786:23;782:32;779:2;;;832:6;824;817:22;779:2;869:9;863:16;922:5;915:13;908:21;901:5;898:32;888:2;;949:6;941;934:22;993:306;;1104:2;1092:9;1083:7;1079:23;1075:32;1072:2;;;1125:6;1117;1110:22;1072:2;1156:23;;-1:-1:-1;;;;;;1208:32:1;;1198:43;;1188:2;;1260:6;1252;1245:22;1304:190;;1416:2;1404:9;1395:7;1391:23;1387:32;1384:2;;;1437:6;1429;1422:22;1384:2;-1:-1:-1;1465:23:1;;1374:120;-1:-1:-1;1374:120:1:o;2042:713::-;2210:2;2262:21;;;2332:13;;2235:18;;;2354:22;;;2042:713;2419:20;;;2462:19;;;2042:713;;2210:2;2407;2392:18;;;2042:713;2512:217;2526:6;2523:1;2520:13;2512:217;;;2591:13;;-1:-1:-1;;;;;2587:62:1;2575:75;;2717:1;2705:14;;;;2670:12;;;;2541:9;2512:217;;;-1:-1:-1;2746:3:1;;2190:565;-1:-1:-1;;;;;;2190:565:1:o;4019:236::-;;-1:-1:-1;;4079:17:1;;4076:2;;;-1:-1:-1;;;4119:33:1;;4175:4;4172:1;4165:15;4205:4;4126:3;4193:17;4076:2;-1:-1:-1;4247:1:1;4236:13;;4066:189::o
Swarm Source
ipfs://052b0fbd55648bcaf8a8ff4f19967b0e841e4e4915986b5c3a8eae1301fbf559
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.