{"compilation":{"language":"Solidity","compiler":"solc","compilerVersion":"0.6.12+commit.27d51765","compilerSettings":{"metadata":{"bytecodeHash":"ipfs","useLiteralContent":false},"optimizer":{"runs":200,"enabled":true},"evmVersion":"istanbul","remappings":["ds-test/=lib/ds-auth/lib/ds-test/src/","ds-thing/=lib/ds-value/lib/ds-thing/src/","ds-value/=lib/ds-value/src/","forge-std/=lib/forge-std/src/","psm/=lib/psm/src/","ds-token/=lib/ds-token/src/","ds-auth/=lib/ds-auth/src/","erc4626-tests/=lib/erc4626-tests/","ds-math/=lib/ds-token/lib/ds-math/src/","ds-note/=lib/ds-value/lib/ds-thing/lib/ds-note/src/","usddv2/=lib/psm/lib/usddv2/src/"]},"name":"GovActionsProxy","fullyQualifiedName":"src/gov/GovActionsProxy.sol:GovActionsProxy"},"sources":{"src/gov/GovActionsProxy.sol":{"content":"// SPDX-License-Identifier: AGPL-3.0-or-later\n//\n// govActionsProxy.sol\n//\n// Copyright (C) 2018-2022 Dai Foundation\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\npragma solidity ^0.6.12;\n\nimport {DSAuth} from \"./auth.sol\";\nimport {GovActions} from \"./GovActions.sol\";\n\ninterface PauseLike  {\n    function plot(address usr, bytes32 tag, bytes memory fax, uint eta) external;\n    function exec(address usr, bytes32 tag, bytes memory fax, uint eta) external;\n    function delay() external returns (uint256);\n}\n\ncontract GovActionsProxy is DSAuth {\n    // --- Data ---\n    address public pause;\n    GovActions public govActions;\n\n    // add events for schedule\n    event Schedule(address usr, bytes32 tag, bytes fax, uint256 eta);\n    event Cast(address usr, bytes32 tag, bytes fax, uint256 eta);\n\n    // --- Auth ---\n    function canCall(address caller, address code, bytes4 sig)\n    public\n    view\n    returns (bool)\n    {\n        return isAuthorized(caller, sig);\n    }\n\n    constructor() public {\n        govActions = new GovActions();\n    }\n\n    function setPause(address addr) public auth {\n        require(addr != address(0), \"Address is 0\");\n        pause = addr;\n    }\n\n    // --- Gov ---\n    function rely(address from, address to) public auth {\n        address      usr = address(govActions);\n        bytes32      tag;  assembly { tag := extcodehash(usr) }\n        bytes memory fax = abi.encodeWithSignature(\"rely(address,address)\", from, to);\n        uint         eta = now;\n\n        PauseLike(pause).plot(usr, tag, fax, eta);\n        PauseLike(pause).exec(usr, tag, fax, eta);\n    }\n\n    function deny(address from, address to) public auth {\n        address      usr = address(govActions);\n        bytes32      tag;  assembly { tag := extcodehash(usr) }\n        bytes memory fax = abi.encodeWithSignature(\"deny(address,address)\", from, to);\n        uint         eta = now;\n\n        PauseLike(pause).plot(usr, tag, fax, eta);\n        PauseLike(pause).exec(usr, tag, fax, eta);\n    }\n\n    function file(address who, bytes32 what, uint256 data) public auth {\n        address      usr = address(govActions);\n        bytes32      tag;  assembly { tag := extcodehash(usr) }\n        bytes memory fax = abi.encodeWithSignature(\"file(address,bytes32,uint256)\", who, what, data);\n        uint         eta = now;\n\n        PauseLike(pause).plot(usr, tag, fax, eta);\n        PauseLike(pause).exec(usr, tag, fax, eta);\n    }\n\n    function file(address who, bytes32 what, address data) public auth {\n        address      usr = address(govActions);\n        bytes32      tag;  assembly { tag := extcodehash(usr) }\n        bytes memory fax = abi.encodeWithSignature(\"file(address,bytes32,address)\", who, what, data);\n        uint         eta = now;\n\n        PauseLike(pause).plot(usr, tag, fax, eta);\n        PauseLike(pause).exec(usr, tag, fax, eta);\n    }\n\n    function file(address who, bytes32 ilk, bytes32 what, uint256 data) public auth {\n        address      usr = address(govActions);\n        bytes32      tag;  assembly { tag := extcodehash(usr) }\n        bytes memory fax = abi.encodeWithSignature(\"file(address,bytes32,bytes32,uint256)\", who, ilk, what, data);\n        uint         eta = now;\n\n        PauseLike(pause).plot(usr, tag, fax, eta);\n        PauseLike(pause).exec(usr, tag, fax, eta);\n    }\n\n    function file(address who, bytes32 ilk, bytes32 what, address data) public auth {\n        address      usr = address(govActions);\n        bytes32      tag;  assembly { tag := extcodehash(usr) }\n        bytes memory fax = abi.encodeWithSignature(\"file(address,bytes32,bytes32,address)\", who, ilk, what, data);\n        uint         eta = now;\n\n        PauseLike(pause).plot(usr, tag, fax, eta);\n        PauseLike(pause).exec(usr, tag, fax, eta);\n    }\n\n    function dripAndFile(address who, bytes32 what, uint256 data) public auth {\n        address      usr = address(govActions);\n        bytes32      tag;  assembly { tag := extcodehash(usr) }\n        bytes memory fax = abi.encodeWithSignature(\"dripAndFile(address,bytes32,uint256)\", who, what, data);\n        uint         eta = now;\n\n        PauseLike(pause).plot(usr, tag, fax, eta);\n        PauseLike(pause).exec(usr, tag, fax, eta);\n    }\n\n    function dripAndFile(address who, bytes32 ilk, bytes32 what, uint256 data) public auth {\n        address      usr = address(govActions);\n        bytes32      tag;  assembly { tag := extcodehash(usr) }\n        bytes memory fax = abi.encodeWithSignature(\"dripAndFile(address,bytes32,bytes32,uint256)\", who, ilk, what, data);\n        uint         eta = now;\n\n        PauseLike(pause).plot(usr, tag, fax, eta);\n        PauseLike(pause).exec(usr, tag, fax, eta);\n    }\n\n    function cage(address end) public auth {\n        address      usr = address(govActions);\n        bytes32      tag;  assembly { tag := extcodehash(usr) }\n        bytes memory fax = abi.encodeWithSignature(\"cage(address)\", end);\n        uint         eta = now;\n\n        PauseLike(pause).plot(usr, tag, fax, eta);\n        PauseLike(pause).exec(usr, tag, fax, eta);\n    }\n\n    function setPauseAuthority(address newAuthority) public auth {\n        address      usr = address(govActions);\n        bytes32      tag;  assembly { tag := extcodehash(usr) }\n        bytes memory fax = abi.encodeWithSignature(\"setAuthority(address,address)\", pause, newAuthority);\n        uint         eta = now;\n\n        PauseLike(pause).plot(usr, tag, fax, eta);\n        PauseLike(pause).exec(usr, tag, fax, eta);\n    }\n\n    function setDelay(uint newDelay) public auth {\n        address      usr = address(govActions);\n        bytes32      tag;  assembly { tag := extcodehash(usr) }\n        bytes memory fax = abi.encodeWithSignature(\"setDelay(address,uint256)\", pause, newDelay);\n        uint         eta = now;\n\n        PauseLike(pause).plot(usr, tag, fax, eta);\n        PauseLike(pause).exec(usr, tag, fax, eta);\n    }\n\n    function setAuthorityAndDelay(address newAuthority, uint newDelay) public auth {\n        address      usr = address(govActions);\n        bytes32      tag;  assembly { tag := extcodehash(usr) }\n        bytes memory fax = abi.encodeWithSignature(\"setAuthorityAndDelay(address,address,uint256)\", pause, newAuthority, newDelay);\n        uint         eta = now;\n\n        PauseLike(pause).plot(usr, tag, fax, eta);\n        PauseLike(pause).exec(usr, tag, fax, eta);\n    }\n\n    function init(address who, bytes32 ilk) public auth {\n        address      usr = address(govActions);\n        bytes32      tag;  assembly { tag := extcodehash(usr) }\n        bytes memory fax = abi.encodeWithSignature(\"init(address,bytes32)\", who, ilk);\n        uint         eta = now;\n\n        PauseLike(pause).plot(usr, tag, fax, eta);\n        PauseLike(pause).exec(usr, tag, fax, eta);\n    }\n\n    function customExec(address who, bytes memory data) public auth {\n        address      usr = address(govActions);\n        bytes32      tag;  assembly { tag := extcodehash(usr) }\n        bytes memory fax = abi.encodeWithSignature(\"customExec(address,bytes)\", who, data);\n        uint         eta = now;\n\n        PauseLike(pause).plot(usr, tag, fax, eta);\n        PauseLike(pause).exec(usr, tag, fax, eta);\n    }\n\n    function execSpell(address spell, bytes memory fax) public auth {\n        bytes32      tag;  assembly { tag := extcodehash(spell) }\n        uint         eta = now;\n\n        PauseLike(pause).plot(spell, tag, fax, eta);\n        PauseLike(pause).exec(spell, tag, fax, eta);\n    }\n\n    function schedule(address who, bytes memory data) public auth {\n        address      usr = address(govActions);\n        bytes32      tag;  assembly { tag := extcodehash(usr) }\n        bytes memory fax = abi.encodeWithSignature(\"customExec(address,bytes)\", who, data);\n        uint         eta = now + PauseLike(pause).delay();\n        PauseLike(pause).plot(usr, tag, fax, eta);\n        emit Schedule(usr, tag, fax, eta);\n    }\n\n    function cast(address who, bytes memory data, uint256 eta) public {\n        address      usr = address(govActions);\n        bytes32      tag;  assembly { tag := extcodehash(usr) }\n        bytes memory fax = abi.encodeWithSignature(\"customExec(address,bytes)\", who, data);\n        PauseLike(pause).exec(usr, tag, fax, eta);\n        emit Cast(usr, tag, fax, eta);\n    }\n}\n"},"src/gov/auth.sol":{"content":"// SPDX-License-Identifier: GNU-3\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\npragma solidity ^0.6.12;\n\ninterface DSAuthority {\n    function canCall(\n        address src, address dst, bytes4 sig\n    ) external view returns (bool);\n}\n\ncontract DSAuthEvents {\n    event LogSetAuthority (address indexed authority);\n    event LogSetOwner     (address indexed owner);\n}\n\ncontract DSAuth is DSAuthEvents {\n    DSAuthority  public  authority;\n    address      public  owner;\n\n    constructor() public {\n        owner = msg.sender;\n        emit LogSetOwner(msg.sender);\n    }\n\n    function setOwner(address owner_)\n        public\n        virtual\n        auth\n    {\n        owner = owner_;\n        emit LogSetOwner(owner);\n    }\n\n    function setAuthority(DSAuthority authority_)\n        public\n        virtual\n        auth\n    {\n        authority = authority_;\n        emit LogSetAuthority(address(authority));\n    }\n\n    modifier auth {\n        require(isAuthorized(msg.sender, msg.sig), \"ds-auth-unauthorized\");\n        _;\n    }\n\n    function isAuthorized(address src, bytes4 sig) internal view returns (bool) {\n        if (src == address(this)) {\n            return true;\n        } else if (src == owner) {\n            return true;\n        } else if (authority == DSAuthority(address(0))) {\n            return false;\n        } else {\n            return authority.canCall(src, address(this), sig);\n        }\n    }\n}\n"},"src/gov/GovActions.sol":{"content":"// SPDX-License-Identifier: AGPL-3.0-or-later\n//\n// govActions.sol\n//\n// Copyright (C) 2018-2022 Dai Foundation\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\npragma solidity ^0.6.12;\n\n\nabstract contract Setter {\n    function file(bytes32, address) public virtual;\n    function file(bytes32, uint) public virtual;\n    function file(bytes32, bytes32, uint) public virtual;\n    function file(bytes32, bytes32, address) public virtual;\n    function rely(address) public virtual;\n    function deny(address) public virtual;\n    function init(bytes32) public virtual;\n    function drip() public virtual;\n    function drip(bytes32) public virtual;\n}\n\nabstract contract EndLike {\n    function cage() public virtual;\n    function cage(bytes32) public virtual;\n}\n\nabstract contract PauseLike {\n    function setAuthority(address) public virtual;\n    function setDelay(uint) public virtual;\n}\n\ncontract GovActions {\n    function file(address who, bytes32 what, address data) public {\n        Setter(who).file(what, data);\n    }\n\n    function file(address who, bytes32 what, uint data) public {\n        Setter(who).file(what, data);\n    }\n\n    function file(address who, bytes32 ilk, bytes32 what, uint data) public {\n        Setter(who).file(ilk, what, data);\n    }\n\n    function file(address who, bytes32 ilk, bytes32 what, address data) public {\n        Setter(who).file(ilk, what, data);\n    }\n\n    function dripAndFile(address who, bytes32 what, uint data) public {\n        Setter(who).drip();\n        Setter(who).file(what, data);\n    }\n\n    function dripAndFile(address who, bytes32 ilk, bytes32 what, uint data) public {\n        Setter(who).drip(ilk);\n        Setter(who).file(ilk, what, data);\n    }\n\n    function rely(address who, address to) public {\n        Setter(who).rely(to);\n    }\n\n    function deny(address who, address to) public {\n        Setter(who).deny(to);\n    }\n\n    function init(address who, bytes32 ilk) public {\n        Setter(who).init(ilk);\n    }\n\n    function cage(address end) public {\n        EndLike(end).cage();\n    }\n\n    function setAuthority(address pause, address newAuthority) public {\n        PauseLike(pause).setAuthority(newAuthority);\n    }\n\n    function setDelay(address pause, uint newDelay) public {\n        PauseLike(pause).setDelay(newDelay);\n    }\n\n    function setAuthorityAndDelay(address pause, address newAuthority, uint newDelay) public {\n        PauseLike(pause).setAuthority(newAuthority);\n        PauseLike(pause).setDelay(newDelay);\n    }\n\n    function customExec(address usr, bytes memory data) public {\n        (bool ok, ) = usr.call(data);\n        require(ok, \"gov-actions-call-error\");\n    }\n}"}},"proxyResolution":{"isProxy":false,"proxyType":null,"implementations":[]},"matchId":"28548814","creationMatch":"exact_match","runtimeMatch":"exact_match","verifiedAt":"2026-05-04T23:16:22Z","match":"exact_match","chainId":"1","address":"0x3dbA111255d3888c723242320595588754Cf493e"}