Contract 0x51E2F57C346e189c5a41e785d1563f93CCb8FaA1

 

Contract Overview

Balance:
0 MATIC

MATIC Value:
$0.00

Token:
Ad
Ad
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x9d35c0ede8b939cb29fcee730d1d04b5acf6986188e17e9c870df9ad3d059c88Transfer Ownersh...185974292021-08-31 18:03:3597 days 8 hrs ago0xab0c9bc6bcbaad9391c530f33f9294dec38ae189 IN  0x51e2f57c346e189c5a41e785d1563f93ccb8faa10 MATIC0.00140283132
0xa749786bb591be1a90dcd82fb8d1544f313d6e883b89ecfff582803df773724eAdd Smart Pool185504702021-08-30 10:09:1098 days 16 hrs ago0xab0c9bc6bcbaad9391c530f33f9294dec38ae189 IN  0x51e2f57c346e189c5a41e785d1563f93ccb8faa10 MATIC0.0007372
0x7cd20aca65315fcba9033ccbdd31e0a299a945e0f09804db21d4b8a7c8f2aa8fAdd Smart Pool185180052021-08-29 10:45:3699 days 15 hrs ago0xab0c9bc6bcbaad9391c530f33f9294dec38ae189 IN  0x51e2f57c346e189c5a41e785d1563f93ccb8faa10 MATIC0.0009082
0x490b1123209da30f57e53e307263d931abd0b9d0f3c7215d84e3775f139de5790x60806040185154652021-08-29 8:56:0299 days 17 hrs ago0xab0c9bc6bcbaad9391c530f33f9294dec38ae189 IN  Contract Creation0 MATIC0.0802845
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SmartPoolRegistry

Compiler Version
v0.6.4+commit.1dca32f3

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at polygonscan.com on 2021-08-29
*/

/**
 *Submitted for verification at Etherscan.io on 2020-12-15
*/

// File: @openzeppelin/contracts/GSN/Context.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.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 GSN 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 payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

// File: @openzeppelin/contracts/access/Ownable.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.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.
 */
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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view 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: localhost/contracts/IRegistry.sol

pragma solidity 0.6.4;

interface IRegistry {
    function inRegistry(address _pool) external view returns(bool);
    function entries(uint256 _index) external view returns(address);
    function addSmartPool(address _smartPool) external;
    function removeSmartPool(uint256 _index) external;
    function removeSmartPoolByAddress(address _address) external;
}
// File: localhost/contracts/Registry.sol

pragma solidity 0.6.4;



contract SmartPoolRegistry is IRegistry, Ownable {
    mapping(address => bool) public override inRegistry;
    address[] public override entries;

    function addSmartPool(address _smartPool) external override onlyOwner {
        require(!inRegistry[_smartPool], "SmartPoolRegistry.addSmartPool: POOL_ALREADY_IN_REGISTRY");
        entries.push(_smartPool);
        inRegistry[_smartPool] = true;
    }

    function removeSmartPool(uint256 _index) public override onlyOwner {
        address registryAddress = entries[_index];

        inRegistry[registryAddress] = false;

        // Move last to index location
        entries[_index] = entries[entries.length - 1];
        // Pop last one off
        entries.pop();
    }
    
    function removeSmartPoolByAddress(address _address) external override onlyOwner {
        // Search for pool and remove it if found. Otherwise do nothing
        for(uint256 i = 0; i < entries.length; i ++) {
            if(_address == entries[i]) {
                removeSmartPool(i);
                break;
            }
        }   
    }
}

Contract Security Audit

Contract ABI

[{"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":"address","name":"_smartPool","type":"address"}],"name":"addSmartPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"entries","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"inRegistry","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"removeSmartPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"removeSmartPoolByAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405260006100146100b760201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3506100bf565b600033905090565b610d20806100ce6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063b30906d41161005b578063b30906d414610169578063e4ec552b146101d7578063e64b4f2314610233578063f2fde38b1461026157610088565b8063715018a61461008d5780637d0ffe6b146100975780638da5cb5b146100db578063a92f971914610125575b600080fd5b6100956102a5565b005b6100d9600480360360208110156100ad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061042d565b005b6100e3610593565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101676004803603602081101561013b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105bc565b005b6101956004803603602081101561017f57600080fd5b81019080803590602001909291905050506107e5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610219600480360360208110156101ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610821565b604051808215151515815260200191505060405180910390f35b61025f6004803603602081101561024957600080fd5b8101908080359060200190929190505050610841565b005b6102a36004803603602081101561027757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a77565b005b6102ad610c84565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461036e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610435610c84565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008090505b60028054905081101561058f576002818154811061051657fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156105825761057d81610841565b61058f565b80806001019150506104fc565b5050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6105c4610c84565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610685576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610728576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180610cb36038913960400191505060405180910390fd5b6002819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600281815481106107f257fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915054906101000a900460ff1681565b610849610c84565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461090a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60006002828154811061091957fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506002600160028054905003815481106109b357fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600283815481106109eb57fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506002805480610a3e57fe5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590555050565b610a7f610c84565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b40576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610bc6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610c8d6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003390509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536d617274506f6f6c52656769737472792e616464536d617274506f6f6c3a20504f4f4c5f414c52454144595f494e5f5245474953545259a2646970667358221220c7d3543519b2f75d58e1c5249e89e4972464fed9d85721d81f15592233accc3e64736f6c63430006040033

Deployed ByteCode Sourcemap

3895:1110:0:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;3895:1110:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;2849:148:0;;;:::i;:::-;;4653:349;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;4653:349:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;2207:79;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;4051:256;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;4051:256:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;4009:33;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;4009:33:0;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3951:51;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;3951:51:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;4315:326;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;4315:326:0;;;;;;;;;;;;;;;;;:::i;:::-;;3152:244;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;3152:244:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;2849:148;2429:12;:10;:12::i;:::-;2419:22;;:6;;;;;;;;;;;:22;;;2411:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2956:1:::1;2919:40;;2940:6;::::0;::::1;;;;;;;;;2919:40;;;;;;;;;;;;2987:1;2970:6:::0;::::1;:19;;;;;;;;;;;;;;;;;;2849:148::o:0;4653:349::-;2429:12;:10;:12::i;:::-;2419:22;;:6;;;;;;;;;;;:22;;;2411:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4821:9:::1;4833:1:::0;4821:13:::1;;4817:175;4840:7;:14;;;;4836:1;:18;4817:175;;;4892:7;4900:1;4892:10;;;;;;;;;;;;;;;;;;;;;;;;;4880:22;;:8;:22;;;4877:104;;;4923:18;4939:1;4923:15;:18::i;:::-;4960:5;;4877:104;4856:4;;;;;;;4817:175;;;;4653:349:::0;:::o;2207:79::-;2245:7;2272:6;;;;;;;;;;;2265:13;;2207:79;:::o;4051:256::-;2429:12;:10;:12::i;:::-;2419:22;;:6;;;;;;;;;;;:22;;;2411:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4141:10:::1;:22;4152:10;4141:22;;;;;;;;;;;;;;;;;;;;;;;;;4140:23;4132:92;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4235:7;4248:10;4235:24;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;4235:24:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4295:4;4270:10:::0;:22:::1;4281:10;4270:22;;;;;;;;;;;;;;;;:29;;;;;;;;;;;;;;;;;;4051:256:::0;:::o;4009:33::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;3951:51::-;;;;;;;;;;;;;;;;;;;;;;:::o;4315:326::-;2429:12;:10;:12::i;:::-;2419:22;;:6;;;;;;;;;;;:22;;;2411:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4393:23:::1;4419:7;4427:6;4419:15;;;;;;;;;;;;;;;;;;;;;;;;;4393:41;;4477:5;4447:10;:27;4458:15;4447:27;;;;;;;;;;;;;;;;:35;;;;;;;;;;;;;;;;;;4553:7;4578:1;4561:7;:14;;;;:18;4553:27;;;;;;;;;;;;;;;;;;;;;;;;;4535:7;4543:6;4535:15;;;;;;;;;;;;;;;;:45;;;;;;;;;;;;;;;;;;4620:7;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2489:1;4315:326:::0;:::o;3152:244::-;2429:12;:10;:12::i;:::-;2419:22;;:6;;;;;;;;;;;:22;;;2411:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3261:1:::1;3241:22;;:8;:22;;;;3233:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3351:8;3322:38;;3343:6;::::0;::::1;;;;;;;;;3322:38;;;;;;;;;;;;3380:8;3371:6;::::0;:17:::1;;;;;;;;;;;;;;;;;;3152:244:::0;:::o;728:106::-;781:15;816:10;809:17;;728:106;:::o

Swarm Source

ipfs://c7d3543519b2f75d58e1c5249e89e4972464fed9d85721d81f15592233accc3e
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.