Source Code
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Transfer | 23741821 | 99 days ago | 0.1 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
SubProxy
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 200 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// 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.16;
/**
* @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");
}
}{
"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/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
"dss-vest/=lib-0_6_x/dss-vest/src/",
"token-tests/=lib/token-tests/src/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "london",
"viaIR": false,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"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"}]Contract Creation Code
608060405234801561001057600080fd5b503360008181526020819052604080822060019055517fdd0e34038ac38b2a1ce960229778ac48a8719bc900b6c4f8d0475c6e8b385a609190a261044e806100596000396000f3fe60806040526004361061003f5760003560e01c806365fae35e146100445780639c52a7f114610066578063be6002c214610086578063bf353dbb146100af575b600080fd5b34801561005057600080fd5b5061006461005f3660046102de565b6100ea565b005b34801561007257600080fd5b506100646100813660046102de565b610167565b610099610094366004610300565b6101da565b6040516100a69190610383565b60405180910390f35b3480156100bb57600080fd5b506100dc6100ca3660046102de565b60006020819052908152604090205481565b6040519081526020016100a6565b336000908152602081905260409020546001146101225760405162461bcd60e51b8152600401610119906103d1565b60405180910390fd5b6001600160a01b03811660008181526020819052604080822060019055517fdd0e34038ac38b2a1ce960229778ac48a8719bc900b6c4f8d0475c6e8b385a609190a250565b336000908152602081905260409020546001146101965760405162461bcd60e51b8152600401610119906103d1565b6001600160a01b038116600081815260208190526040808220829055517f184450df2e323acec0ed3b5c7531b81f9b4cdef7914dfd4c0a4317416bb5251b9190a250565b3360009081526020819052604090205460609060011461020c5760405162461bcd60e51b8152600401610119906103d1565b6000846001600160a01b03168484604051610228929190610408565b600060405180830381855af49150503d8060008114610263576040519150601f19603f3d011682016040523d82523d6000602084013e610268565b606091505b5092509050806102ba5760405162461bcd60e51b815260206004820152601b60248201527f53756250726f78792f64656c656761746563616c6c2d6572726f7200000000006044820152606401610119565b509392505050565b80356001600160a01b03811681146102d957600080fd5b919050565b6000602082840312156102f057600080fd5b6102f9826102c2565b9392505050565b60008060006040848603121561031557600080fd5b61031e846102c2565b9250602084013567ffffffffffffffff8082111561033b57600080fd5b818601915086601f83011261034f57600080fd5b81358181111561035e57600080fd5b87602082850101111561037057600080fd5b6020830194508093505050509250925092565b600060208083528351808285015260005b818110156103b057858101830151858201604001528201610394565b506000604082860101526040601f19601f8301168501019250505092915050565b60208082526017908201527f53756250726f78792f6e6f742d617574686f72697a6564000000000000000000604082015260600190565b818382376000910190815291905056fea26469706673582212201e4098c7531cd26b54137cd56ee5961671ce6ced9d3e59e87e8155b7bce9bf4064736f6c63430008100033
Deployed Bytecode
0x60806040526004361061003f5760003560e01c806365fae35e146100445780639c52a7f114610066578063be6002c214610086578063bf353dbb146100af575b600080fd5b34801561005057600080fd5b5061006461005f3660046102de565b6100ea565b005b34801561007257600080fd5b506100646100813660046102de565b610167565b610099610094366004610300565b6101da565b6040516100a69190610383565b60405180910390f35b3480156100bb57600080fd5b506100dc6100ca3660046102de565b60006020819052908152604090205481565b6040519081526020016100a6565b336000908152602081905260409020546001146101225760405162461bcd60e51b8152600401610119906103d1565b60405180910390fd5b6001600160a01b03811660008181526020819052604080822060019055517fdd0e34038ac38b2a1ce960229778ac48a8719bc900b6c4f8d0475c6e8b385a609190a250565b336000908152602081905260409020546001146101965760405162461bcd60e51b8152600401610119906103d1565b6001600160a01b038116600081815260208190526040808220829055517f184450df2e323acec0ed3b5c7531b81f9b4cdef7914dfd4c0a4317416bb5251b9190a250565b3360009081526020819052604090205460609060011461020c5760405162461bcd60e51b8152600401610119906103d1565b6000846001600160a01b03168484604051610228929190610408565b600060405180830381855af49150503d8060008114610263576040519150601f19603f3d011682016040523d82523d6000602084013e610268565b606091505b5092509050806102ba5760405162461bcd60e51b815260206004820152601b60248201527f53756250726f78792f64656c656761746563616c6c2d6572726f7200000000006044820152606401610119565b509392505050565b80356001600160a01b03811681146102d957600080fd5b919050565b6000602082840312156102f057600080fd5b6102f9826102c2565b9392505050565b60008060006040848603121561031557600080fd5b61031e846102c2565b9250602084013567ffffffffffffffff8082111561033b57600080fd5b818601915086601f83011261034f57600080fd5b81358181111561035e57600080fd5b87602082850101111561037057600080fd5b6020830194508093505050509250925092565b600060208083528351808285015260005b818110156103b057858101830151858201604001528201610394565b506000604082860101526040601f19601f8301168501019250505092915050565b60208082526017908201527f53756250726f78792f6e6f742d617574686f72697a6564000000000000000000604082015260600190565b818382376000910190815291905056fea26469706673582212201e4098c7531cd26b54137cd56ee5961671ce6ced9d3e59e87e8155b7bce9bf4064736f6c63430008100033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$1,871,117.35
Net Worth in ETH
911.935041
Token Allocations
USDS
99.99%
ETH
0.01%
PLUME
0.00%
Multichain Portfolio | 34 Chains
Loading...
Loading
Loading...
Loading
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.