Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Contract Name:
Finder
Compiler Version
v0.8.4+commit.c7e474f2
Contract Source Code (Solidity)
/** *Submitted for verification at polygonscan.com on 2021-06-14 */ // Sources flattened with hardhat v2.1.1 https://hardhat.org // File @openzeppelin/contracts/utils/[email protected] pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // File @openzeppelin/contracts/access/[email protected] pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File contracts/oracle/interfaces/FinderInterface.sol pragma solidity ^0.8.0; /** * @title Provides addresses of the live contracts implementing certain interfaces. * @dev Examples are the Oracle or Store interfaces. */ interface FinderInterface { /** * @notice Updates the address of the contract that implements `interfaceName`. * @param interfaceName bytes32 encoding of the interface name that is either changed or registered. * @param implementationAddress address of the deployed contract that implements the interface. */ function changeImplementationAddress(bytes32 interfaceName, address implementationAddress) external; /** * @notice Gets the address of the contract that implements the given `interfaceName`. * @param interfaceName queried interface. * @return implementationAddress address of the deployed contract that implements the interface. */ function getImplementationAddress(bytes32 interfaceName) external view returns (address); } // File contracts/oracle/implementation/Finder.sol pragma solidity ^0.8.0; /** * @title Provides addresses of the live contracts implementing certain interfaces. * @dev Examples of interfaces with implementations that Finder locates are the Oracle and Store interfaces. */ contract Finder is FinderInterface, Ownable { mapping(bytes32 => address) public interfacesImplemented; event InterfaceImplementationChanged(bytes32 indexed interfaceName, address indexed newImplementationAddress); /** * @notice Updates the address of the contract that implements `interfaceName`. * @param interfaceName bytes32 of the interface name that is either changed or registered. * @param implementationAddress address of the implementation contract. */ function changeImplementationAddress(bytes32 interfaceName, address implementationAddress) external override onlyOwner { interfacesImplemented[interfaceName] = implementationAddress; emit InterfaceImplementationChanged(interfaceName, implementationAddress); } /** * @notice Gets the address of the contract that implements the given `interfaceName`. * @param interfaceName queried interface. * @return implementationAddress address of the defined interface. */ function getImplementationAddress(bytes32 interfaceName) external view override returns (address) { address implementationAddress = interfacesImplemented[interfaceName]; require(implementationAddress != address(0x0), "Implementation not found"); return implementationAddress; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"interfaceName","type":"bytes32"},{"indexed":true,"internalType":"address","name":"newImplementationAddress","type":"address"}],"name":"InterfaceImplementationChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"bytes32","name":"interfaceName","type":"bytes32"},{"internalType":"address","name":"implementationAddress","type":"address"}],"name":"changeImplementationAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"interfaceName","type":"bytes32"}],"name":"getImplementationAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"interfacesImplemented","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061043c806100616000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806331f9665e14610067578063715018a61461007c5780638da5cb5b14610084578063aafd5e40146100ad578063cc48f4db146100c0578063f2fde38b146100e9575b600080fd5b61007a6100753660046103a6565b6100fc565b005b61007a610188565b6000546001600160a01b03165b6040516001600160a01b03909116815260200160405180910390f35b6100916100bb36600461038e565b6101fc565b6100916100ce36600461038e565b6001602052600090815260409020546001600160a01b031681565b61007a6100f736600461036d565b610267565b6000546001600160a01b0316331461012f5760405162461bcd60e51b8152600401610126906103d1565b60405180910390fd5b60008281526001602052604080822080546001600160a01b0319166001600160a01b0385169081179091559051909184917fb29aa13e555039289e0513962835b00fcc6e4a265ae8f99e68e5b90d5406fe489190a35050565b6000546001600160a01b031633146101b25760405162461bcd60e51b8152600401610126906103d1565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000818152600160205260408120546001600160a01b0316806102615760405162461bcd60e51b815260206004820152601860248201527f496d706c656d656e746174696f6e206e6f7420666f756e6400000000000000006044820152606401610126565b92915050565b6000546001600160a01b031633146102915760405162461bcd60e51b8152600401610126906103d1565b6001600160a01b0381166102f65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610126565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b80356001600160a01b038116811461036857600080fd5b919050565b60006020828403121561037e578081fd5b61038782610351565b9392505050565b60006020828403121561039f578081fd5b5035919050565b600080604083850312156103b8578081fd5b823591506103c860208401610351565b90509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea2646970667358221220e94e266f032854b028bf29acf009d6d2c1491d1f82305c353042778582cd4cc864736f6c63430008040033
Deployed ByteCode Sourcemap
4679:1377:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5190:316;;;;;;:::i;:::-;;:::i;:::-;;2791:148;;;:::i;2140:87::-;2186:7;2213:6;-1:-1:-1;;;;;2213:6:0;2140:87;;;-1:-1:-1;;;;;1021:32:1;;;1003:51;;991:2;976:18;2140:87:0;;;;;;;5744:309;;;;;;:::i;:::-;;:::i;4730:56::-;;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;;;;;4730:56:0;;;3094:244;;;;;;:::i;:::-;;:::i;5190:316::-;2186:7;2213:6;-1:-1:-1;;;;;2213:6:0;772:10;2360:23;2352:68;;;;-1:-1:-1;;;2352:68:0;;;;;;;:::i;:::-;;;;;;;;;5352:36:::1;::::0;;;:21:::1;:36;::::0;;;;;:60;;-1:-1:-1;;;;;;5352:60:0::1;-1:-1:-1::0;;;;;5352:60:0;::::1;::::0;;::::1;::::0;;;5430:68;;5352:60;;:36;;5430:68:::1;::::0;5352:36;5430:68:::1;5190:316:::0;;:::o;2791:148::-;2186:7;2213:6;-1:-1:-1;;;;;2213:6:0;772:10;2360:23;2352:68;;;;-1:-1:-1;;;2352:68:0;;;;;;;:::i;:::-;2898:1:::1;2882:6:::0;;2861:40:::1;::::0;-1:-1:-1;;;;;2882:6:0;;::::1;::::0;2861:40:::1;::::0;2898:1;;2861:40:::1;2929:1;2912:19:::0;;-1:-1:-1;;;;;;2912:19:0::1;::::0;;2791:148::o;5744:309::-;5833:7;5885:36;;;:21;:36;;;;;;-1:-1:-1;;;;;5885:36:0;5940:37;5932:74;;;;-1:-1:-1;;;5932:74:0;;2035:2:1;5932:74:0;;;2017:21:1;2074:2;2054:18;;;2047:30;2113:26;2093:18;;;2086:54;2157:18;;5932:74:0;2007:174:1;5932:74:0;6024:21;5744:309;-1:-1:-1;;5744:309:0:o;3094:244::-;2186:7;2213:6;-1:-1:-1;;;;;2213:6:0;772:10;2360:23;2352:68;;;;-1:-1:-1;;;2352:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;3183:22:0;::::1;3175:73;;;::::0;-1:-1:-1;;;3175:73:0;;1267:2:1;3175:73:0::1;::::0;::::1;1249:21:1::0;1306:2;1286:18;;;1279:30;1345:34;1325:18;;;1318:62;-1:-1:-1;;;1396:18:1;;;1389:36;1442:19;;3175:73:0::1;1239:228:1::0;3175:73:0::1;3285:6;::::0;;3264:38:::1;::::0;-1:-1:-1;;;;;3264:38:0;;::::1;::::0;3285:6;::::1;::::0;3264:38:::1;::::0;::::1;3313:6;:17:::0;;-1:-1:-1;;;;;;3313:17:0::1;-1:-1:-1::0;;;;;3313:17:0;;;::::1;::::0;;;::::1;::::0;;3094:244::o;14:173:1:-;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:2;;177:1;174;167:12;111:2;63:124;;;:::o;192:196::-;251:6;304:2;292:9;283:7;279:23;275:32;272:2;;;325:6;317;310:22;272:2;353:29;372:9;353:29;:::i;:::-;343:39;262:126;-1:-1:-1;;;262:126:1:o;393:190::-;452:6;505:2;493:9;484:7;480:23;476:32;473:2;;;526:6;518;511:22;473:2;-1:-1:-1;554:23:1;;463:120;-1:-1:-1;463:120:1:o;588:264::-;656:6;664;717:2;705:9;696:7;692:23;688:32;685:2;;;738:6;730;723:22;685:2;779:9;766:23;756:33;;808:38;842:2;831:9;827:18;808:38;:::i;:::-;798:48;;675:177;;;;;:::o;1472:356::-;1674:2;1656:21;;;1693:18;;;1686:30;1752:34;1747:2;1732:18;;1725:62;1819:2;1804:18;;1646:182::o
Swarm Source
ipfs://e94e266f032854b028bf29acf009d6d2c1491d1f82305c353042778582cd4cc8
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.