ETH Price: $3,409.90 (-2.58%)
Gas: 8 Gwei

Contract

0x3300f198988e4C9C63F75dF86De36421f06af8c4
 

Overview

ETH Balance

0.1 ETH

Eth Value

$340.99 (@ $3,409.90/ETH)

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deny173445662023-05-26 16:50:59418 days ago1685119859IN
0x3300f198...1f06af8c4
0 ETH0.0008197634.93707591
Rely173445642023-05-26 16:50:35418 days ago1685119835IN
0x3300f198...1f06af8c4
0 ETH0.0016688535.1856495
0x60806040173445602023-05-26 16:49:47418 days ago1685119787IN
 Create: SubProxy
0 ETH0.0193345636.66515213

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
195666552024-04-02 7:33:11106 days ago1712043191
0x3300f198...1f06af8c4
0.1 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SubProxy

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 1 : SubProxy.sol
// SPDX-FileCopyrightText: © 2023 Dai Foundation <www.daifoundation.org>
// SPDX-License-Identifier: AGPL-3.0-or-later
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero 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 Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.
pragma solidity =0.8.19;

/**
 * @title SubProxy: the SubDAO-level `PauseProxy`.
 * @dev This proxy uses `delegatecall` to execute calls from context isolated from the main governance contract.
 * Contracts that must be controlled by SubDAO governance must authorize the `SubProxy` contract instead of the
 * governance contract itself.
 * @author @amusingaxl
 */
contract SubProxy {
    /// @notice Addresses with owner access on this contract. `wards[usr]`
    mapping(address => uint256) public wards;

    /**
     * @notice `usr` was granted owner access.
     * @param usr The user address.
     */
    event Rely(address indexed usr);
    /**
     * @notice `usr` owner access was revoked.
     * @param usr The user address.
     */
    event Deny(address indexed usr);

    modifier auth() {
        require(wards[msg.sender] == 1, "SubProxy/not-authorized");
        _;
    }

    constructor() {
        wards[msg.sender] = 1;
        emit Rely(msg.sender);
    }

    /**
     * @notice Grants `usr` admin access to this contract.
     * @param usr The user address.
     */
    function rely(address usr) external auth {
        wards[usr] = 1;
        emit Rely(usr);
    }

    /**
     * @notice Revokes `usr` admin access from this contract.
     * @param usr The user address.
     */
    function deny(address usr) external auth {
        wards[usr] = 0;
        emit Deny(usr);
    }

    /**
     * @notice Executes a calldata-encoded call `args` in the context of `target`.
     * @param target The target contract.
     * @param args The calldata-encoded call.
     * @return out The result of the execution.
     */
    function exec(address target, bytes calldata args) external payable auth returns (bytes memory out) {
        bool ok;
        (ok, out) = target.delegatecall(args);
        require(ok, "SubProxy/delegatecall-error");
    }
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "dss-interfaces/=lib/dss-test/lib/dss-interfaces/src/",
    "dss-test/=lib/dss-test/src/",
    "forge-std/=lib/forge-std/src/"
  ],
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"usr","type":"address"}],"name":"Deny","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"usr","type":"address"}],"name":"Rely","type":"event"},{"inputs":[{"internalType":"address","name":"usr","type":"address"}],"name":"deny","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"args","type":"bytes"}],"name":"exec","outputs":[{"internalType":"bytes","name":"out","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"}],"name":"rely","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"wards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5060016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff167fdd0e34038ac38b2a1ce960229778ac48a8719bc900b6c4f8d0475c6e8b385a6060405160405180910390a2610825806100a76000396000f3fe60806040526004361061003f5760003560e01c806365fae35e146100445780639c52a7f11461006d578063be6002c214610096578063bf353dbb146100c6575b600080fd5b34801561005057600080fd5b5061006b600480360381019061006691906104d6565b610103565b005b34801561007957600080fd5b50610094600480360381019061008f91906104d6565b61020e565b005b6100b060048036038101906100ab9190610568565b610319565b6040516100bd9190610658565b60405180910390f35b3480156100d257600080fd5b506100ed60048036038101906100e891906104d6565b610456565b6040516100fa9190610693565b60405180910390f35b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414610184576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017b9061070b565b60405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508073ffffffffffffffffffffffffffffffffffffffff167fdd0e34038ac38b2a1ce960229778ac48a8719bc900b6c4f8d0475c6e8b385a6060405160405180910390a250565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461028f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102869061070b565b60405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508073ffffffffffffffffffffffffffffffffffffffff167f184450df2e323acec0ed3b5c7531b81f9b4cdef7914dfd4c0a4317416bb5251b60405160405180910390a250565b606060016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461039c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103939061070b565b60405180910390fd5b60008473ffffffffffffffffffffffffffffffffffffffff1684846040516103c592919061076a565b600060405180830381855af49150503d8060008114610400576040519150601f19603f3d011682016040523d82523d6000602084013e610405565b606091505b5080935081925050508061044e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610445906107cf565b60405180910390fd5b509392505050565b60006020528060005260406000206000915090505481565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104a382610478565b9050919050565b6104b381610498565b81146104be57600080fd5b50565b6000813590506104d0816104aa565b92915050565b6000602082840312156104ec576104eb61046e565b5b60006104fa848285016104c1565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261052857610527610503565b5b8235905067ffffffffffffffff81111561054557610544610508565b5b6020830191508360018202830111156105615761056061050d565b5b9250929050565b6000806000604084860312156105815761058061046e565b5b600061058f868287016104c1565b935050602084013567ffffffffffffffff8111156105b0576105af610473565b5b6105bc86828701610512565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b838110156106025780820151818401526020810190506105e7565b60008484015250505050565b6000601f19601f8301169050919050565b600061062a826105c8565b61063481856105d3565b93506106448185602086016105e4565b61064d8161060e565b840191505092915050565b60006020820190508181036000830152610672818461061f565b905092915050565b6000819050919050565b61068d8161067a565b82525050565b60006020820190506106a86000830184610684565b92915050565b600082825260208201905092915050565b7f53756250726f78792f6e6f742d617574686f72697a6564000000000000000000600082015250565b60006106f56017836106ae565b9150610700826106bf565b602082019050919050565b60006020820190508181036000830152610724816106e8565b9050919050565b600081905092915050565b82818337600083830152505050565b6000610751838561072b565b935061075e838584610736565b82840190509392505050565b6000610777828486610745565b91508190509392505050565b7f53756250726f78792f64656c656761746563616c6c2d6572726f720000000000600082015250565b60006107b9601b836106ae565b91506107c482610783565b602082019050919050565b600060208201905081810360008301526107e8816107ac565b905091905056fea2646970667358221220c9e0eee4a76255d9e2c7df45862d6555ca1f2fe09c071262011969e3f0d8fbf164736f6c63430008130033

Deployed Bytecode

0x60806040526004361061003f5760003560e01c806365fae35e146100445780639c52a7f11461006d578063be6002c214610096578063bf353dbb146100c6575b600080fd5b34801561005057600080fd5b5061006b600480360381019061006691906104d6565b610103565b005b34801561007957600080fd5b50610094600480360381019061008f91906104d6565b61020e565b005b6100b060048036038101906100ab9190610568565b610319565b6040516100bd9190610658565b60405180910390f35b3480156100d257600080fd5b506100ed60048036038101906100e891906104d6565b610456565b6040516100fa9190610693565b60405180910390f35b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414610184576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161017b9061070b565b60405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508073ffffffffffffffffffffffffffffffffffffffff167fdd0e34038ac38b2a1ce960229778ac48a8719bc900b6c4f8d0475c6e8b385a6060405160405180910390a250565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461028f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102869061070b565b60405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508073ffffffffffffffffffffffffffffffffffffffff167f184450df2e323acec0ed3b5c7531b81f9b4cdef7914dfd4c0a4317416bb5251b60405160405180910390a250565b606060016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461039c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103939061070b565b60405180910390fd5b60008473ffffffffffffffffffffffffffffffffffffffff1684846040516103c592919061076a565b600060405180830381855af49150503d8060008114610400576040519150601f19603f3d011682016040523d82523d6000602084013e610405565b606091505b5080935081925050508061044e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610445906107cf565b60405180910390fd5b509392505050565b60006020528060005260406000206000915090505481565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104a382610478565b9050919050565b6104b381610498565b81146104be57600080fd5b50565b6000813590506104d0816104aa565b92915050565b6000602082840312156104ec576104eb61046e565b5b60006104fa848285016104c1565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261052857610527610503565b5b8235905067ffffffffffffffff81111561054557610544610508565b5b6020830191508360018202830111156105615761056061050d565b5b9250929050565b6000806000604084860312156105815761058061046e565b5b600061058f868287016104c1565b935050602084013567ffffffffffffffff8111156105b0576105af610473565b5b6105bc86828701610512565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b838110156106025780820151818401526020810190506105e7565b60008484015250505050565b6000601f19601f8301169050919050565b600061062a826105c8565b61063481856105d3565b93506106448185602086016105e4565b61064d8161060e565b840191505092915050565b60006020820190508181036000830152610672818461061f565b905092915050565b6000819050919050565b61068d8161067a565b82525050565b60006020820190506106a86000830184610684565b92915050565b600082825260208201905092915050565b7f53756250726f78792f6e6f742d617574686f72697a6564000000000000000000600082015250565b60006106f56017836106ae565b9150610700826106bf565b602082019050919050565b60006020820190508181036000830152610724816106e8565b9050919050565b600081905092915050565b82818337600083830152505050565b6000610751838561072b565b935061075e838584610736565b82840190509392505050565b6000610777828486610745565b91508190509392505050565b7f53756250726f78792f64656c656761746563616c6c2d6572726f720000000000600082015250565b60006107b9601b836106ae565b91506107c482610783565b602082019050919050565b600060208201905081810360008301526107e8816107ac565b905091905056fea2646970667358221220c9e0eee4a76255d9e2c7df45862d6555ca1f2fe09c071262011969e3f0d8fbf164736f6c63430008130033

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
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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.