More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 213 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
User Execute | 21217625 | 73 days ago | IN | 0 ETH | 0.01951718 | ||||
User Execute | 21217590 | 73 days ago | IN | 0 ETH | 0.0200078 | ||||
User Execute | 21188631 | 77 days ago | IN | 0 ETH | 0.04796433 | ||||
User Execute | 21087188 | 91 days ago | IN | 0 ETH | 0.01924091 | ||||
User Execute | 21087162 | 91 days ago | IN | 0 ETH | 0.02543646 | ||||
User Execute | 21087149 | 91 days ago | IN | 0 ETH | 0.02538167 | ||||
User Execute | 21087143 | 91 days ago | IN | 0 ETH | 0.02416705 | ||||
User Execute | 21071976 | 94 days ago | IN | 0 ETH | 0.02566408 | ||||
User Execute | 21071950 | 94 days ago | IN | 0 ETH | 0.02332136 | ||||
User Execute | 21071917 | 94 days ago | IN | 0 ETH | 0.02370391 | ||||
User Execute | 21071907 | 94 days ago | IN | 0 ETH | 0.01229781 | ||||
User Execute | 21071899 | 94 days ago | IN | 0 ETH | 0.02565138 | ||||
User Execute | 21014521 | 102 days ago | IN | 0 ETH | 0.02375389 | ||||
User Execute | 21014515 | 102 days ago | IN | 0 ETH | 0.02707651 | ||||
User Execute | 21014505 | 102 days ago | IN | 0 ETH | 0.0274692 | ||||
User Execute | 21014493 | 102 days ago | IN | 0 ETH | 0.00181605 | ||||
User Execute | 21014487 | 102 days ago | IN | 0 ETH | 0.03231122 | ||||
User Execute | 20994691 | 104 days ago | IN | 0 ETH | 0.02128633 | ||||
User Execute | 20994660 | 104 days ago | IN | 0 ETH | 0.02381024 | ||||
User Execute | 20994646 | 104 days ago | IN | 0 ETH | 0.02327208 | ||||
User Execute | 20965745 | 108 days ago | IN | 0 ETH | 0.04456323 | ||||
User Execute | 20965736 | 108 days ago | IN | 0 ETH | 0.00187686 | ||||
User Execute | 20965707 | 108 days ago | IN | 0 ETH | 0.00181768 | ||||
User Execute | 20965707 | 108 days ago | IN | 0 ETH | 0.03684666 | ||||
User Execute | 20965601 | 108 days ago | IN | 0 ETH | 0.04112225 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
16233196 | 772 days ago | Contract Creation | 0 ETH |
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.
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xeafE1c89...bbeA7bBcB The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Proxy
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// proxy.sol -- proxy contract for delegate calls // Copyright (C) 2019 Centrifuge // 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.0; import {Address} from "openzeppelin-contracts/utils/Address.sol"; interface RegistryLike { function cacheRead(bytes memory _code) external view returns (address); function cacheWrite(bytes memory _code) external returns (address target); } contract Proxy { mapping(address => uint256) public wards; mapping(address => uint256) public users; address public target; // target contract that can be called by users RegistryLike public registry; event UserAdded(address user); event UserRemoved(address user); event Rely(address indexed user); event Deny(address indexed user); event File(bytes32 what, address _target); modifier user() { require(users[msg.sender] == 1, "TinlakeProxy/user-not-authorized"); _; } modifier auth() { require(wards[msg.sender] == 1, "TinlakeProxy/ward-not-authorized"); _; } constructor(address owner, address usr, address target_) { wards[owner] = 1; emit Rely(owner); users[usr] = 1; emit UserAdded(usr); target = target_; emit File("target", target_); } // --- Administration --- function rely(address usr) external auth { wards[usr] = 1; emit Rely(usr); } function deny(address usr) external auth { wards[usr] = 0; emit Deny(usr); } function addUser(address usr) external auth { users[usr] = 1; emit UserAdded(usr); } function removeUser(address usr) external auth { users[usr] = 0; emit UserRemoved(usr); } function file(bytes32 what, address data) external auth { if (what == "target") target = data; else revert("TinlakeProxy/file-unrecognized-param"); emit File(what, data); } // --- Proxy --- function userExecute(address _target, bytes memory _data) public payable user returns (bytes memory response) { require(_target != address(0), "TinlakeProxy/target-address-required"); require(target == _target, "TinlakeProxy/target-not-authorized"); return _execute(_target, _data); } function _execute(address _target, bytes memory _data) internal returns (bytes memory response) { return Address.functionDelegateCall(_target, _data, "TinlakeProxy/delegate-call-failed"); } } // ProxyRegistry: This factory deploys new proxy instances through build() contract ProxyRegistry { event Created(address indexed sender, address indexed owner, address proxy); // deploys a new proxy instance function build(address usr, address target) public returns (address payable proxy) { proxy = build(msg.sender, usr, target); } // deploys a new proxy instance function build(address owner, address usr, address target) public returns (address payable proxyAddr) { Proxy proxy = new Proxy(owner, usr, target); emit Created(msg.sender, owner, address(proxy)); return payable(address(proxy)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
{ "remappings": [ "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"usr","type":"address"},{"internalType":"address","name":"target_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"Deny","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"what","type":"bytes32"},{"indexed":false,"internalType":"address","name":"_target","type":"address"}],"name":"File","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"Rely","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"}],"name":"UserAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"}],"name":"UserRemoved","type":"event"},{"inputs":[{"internalType":"address","name":"usr","type":"address"}],"name":"addUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"}],"name":"deny","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"what","type":"bytes32"},{"internalType":"address","name":"data","type":"address"}],"name":"file","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"registry","outputs":[{"internalType":"contract RegistryLike","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"}],"name":"rely","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"usr","type":"address"}],"name":"removeUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"target","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_target","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"userExecute","outputs":[{"internalType":"bytes","name":"response","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"users","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"wards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x6080604052600436106100915760003560e01c8063a87430ba11610059578063a87430ba14610155578063aba5f1b214610190578063bf353dbb146101b0578063d4b83992146101dd578063d4e8be83146101fd57600080fd5b8063421b2d8b1461009657806365fae35e146100b85780637b103999146100d857806398575188146101155780639c52a7f114610135575b600080fd5b3480156100a257600080fd5b506100b66100b13660046107a0565b61021d565b005b3480156100c457600080fd5b506100b66100d33660046107a0565b6102a9565b3480156100e457600080fd5b506003546100f8906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012157600080fd5b506100b66101303660046107a0565b61031d565b34801561014157600080fd5b506100b66101503660046107a0565b610398565b34801561016157600080fd5b506101826101703660046107a0565b60016020526000908152604090205481565b60405190815260200161010c565b6101a361019e3660046107d1565b61040b565b60405161010c91906108e3565b3480156101bc57600080fd5b506101826101cb3660046107a0565b60006020819052908152604090205481565b3480156101e957600080fd5b506002546100f8906001600160a01b031681565b34801561020957600080fd5b506100b66102183660046108f6565b610549565b336000908152602081905260409020546001146102555760405162461bcd60e51b815260040161024c90610922565b60405180910390fd5b6001600160a01b0381166000818152600160208181526040928390209190915590519182527f19ef9a4877199f89440a26acb26895ec02ed86f2df1aeaa90dc18041b892f71f91015b60405180910390a150565b336000908152602081905260409020546001146102d85760405162461bcd60e51b815260040161024c90610922565b6001600160a01b03811660008181526020819052604080822060019055517fdd0e34038ac38b2a1ce960229778ac48a8719bc900b6c4f8d0475c6e8b385a609190a250565b3360009081526020819052604090205460011461034c5760405162461bcd60e51b815260040161024c90610922565b6001600160a01b03811660008181526001602090815260408083209290925590519182527fe9dce8c992623ce791725b21e857e33248d1f190a25b5168313420eebdaae99d910161029e565b336000908152602081905260409020546001146103c75760405162461bcd60e51b815260040161024c90610922565b6001600160a01b038116600081815260208190526040808220829055517f184450df2e323acec0ed3b5c7531b81f9b4cdef7914dfd4c0a4317416bb5251b9190a250565b336000908152600160208190526040909120546060911461046e5760405162461bcd60e51b815260206004820181905260248201527f54696e6c616b6550726f78792f757365722d6e6f742d617574686f72697a6564604482015260640161024c565b6001600160a01b0383166104d05760405162461bcd60e51b8152602060048201526024808201527f54696e6c616b6550726f78792f7461726765742d616464726573732d726571756044820152631a5c995960e21b606482015260840161024c565b6002546001600160a01b038481169116146105385760405162461bcd60e51b815260206004820152602260248201527f54696e6c616b6550726f78792f7461726765742d6e6f742d617574686f72697a604482015261195960f21b606482015260840161024c565b6105428383610641565b9392505050565b336000908152602081905260409020546001146105785760405162461bcd60e51b815260040161024c90610922565b81651d185c99d95d60d21b036105a857600280546001600160a01b0319166001600160a01b0383161790556105fc565b60405162461bcd60e51b8152602060048201526024808201527f54696e6c616b6550726f78792f66696c652d756e7265636f676e697a65642d706044820152636172616d60e01b606482015260840161024c565b604080518381526001600160a01b03831660208201527f8fef588b5fc1afbf5b2f06c1a435d513f208da2e6704c3d8f0e0ec91167066ba910160405180910390a15050565b60606105428383604051806060016040528060218152602001610974602191396060600080856001600160a01b03168560405161067e9190610957565b600060405180830381855af49150503d80600081146106b9576040519150601f19603f3d011682016040523d82523d6000602084013e6106be565b606091505b50915091506106cf868383876106d9565b9695505050505050565b60608315610748578251600003610741576001600160a01b0385163b6107415760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161024c565b5081610752565b610752838361075a565b949350505050565b81511561076a5781518083602001fd5b8060405162461bcd60e51b815260040161024c91906108e3565b80356001600160a01b038116811461079b57600080fd5b919050565b6000602082840312156107b257600080fd5b61054282610784565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156107e457600080fd5b6107ed83610784565b9150602083013567ffffffffffffffff8082111561080a57600080fd5b818501915085601f83011261081e57600080fd5b813581811115610830576108306107bb565b604051601f8201601f19908116603f01168101908382118183101715610858576108586107bb565b8160405282815288602084870101111561087157600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60005b838110156108ae578181015183820152602001610896565b50506000910152565b600081518084526108cf816020860160208601610893565b601f01601f19169290920160200192915050565b60208152600061054260208301846108b7565b6000806040838503121561090957600080fd5b8235915061091960208401610784565b90509250929050565b6020808252818101527f54696e6c616b6550726f78792f776172642d6e6f742d617574686f72697a6564604082015260600190565b60008251610969818460208701610893565b919091019291505056fe54696e6c616b6550726f78792f64656c65676174652d63616c6c2d6661696c6564a264697066735822122047b63769755470ac3ed9277f76a9652ef8b17ca3caf59649232221ef878a44ed64736f6c63430008110033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.