Contract 0xDD30BCA5F7deeC10F5e2860edb696Bf83ef0F74b

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x27bfd79de273ddc7d3392843f2035eb635daac47d447a971e71ddb9d3d2925b30x60806040191046112021-10-14 20:47:3510 days 5 hrs ago0x4bbd9d6ddca736d5f3340906db404952fe537757 IN  Contract Creation0 FTM0.140541754295
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x27bfd79de273ddc7d3392843f2035eb635daac47d447a971e71ddb9d3d2925b3191046112021-10-14 20:47:3510 days 5 hrs ago 0x4bbd9d6ddca736d5f3340906db404952fe537757  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VaultRegistry

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 3 : VaultRegistry.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.6;

import "./lib/Governable.sol";

contract VaultRegistry is Governable {

    /// @notice List of protocol vaults. 
    address[] public vaults;

    /// @notice Names for each vault.
    mapping(address => string) public vaultName;

    /// @notice If a vault has been registered or not.
    mapping(address => bool) public isVaultRegistered;

    /// @notice Addresses allowed to update the registry.
    mapping(address => bool) public keepers;

    /// @notice Emitted on update to the registry.
    event RegistryUpdated(address indexed vault, string name);

    modifier onlyGovernanceOrKeeper {
        require(msg.sender == governance() || keepers[msg.sender], "VaultRegistry: Caller not governance or keeper");
        _;
    }

    constructor(address _store) Governable(_store) {} 

    /// @notice Adds a new vault to the registry
    /// @param _vault Vault to add.
    /// @param _name Name of the added vault.
    function addVault(
        address _vault,
        string memory _name
    ) public onlyGovernanceOrKeeper {
        require(!isVaultRegistered[_vault], "VaultRegistry: Vault already registered");
        vaults.push(_vault);
        vaultName[_vault] = _name;
        isVaultRegistered[_vault] = true;
        emit RegistryUpdated(_vault, _name);
    }

    /// @notice Updates the name of a vault in the registry.
    /// @param _vault Vault to update the name of.
    /// @param _newName New name to give to the vault.
    function updateVaultName(
        address _vault,
        string memory _newName
    ) public onlyGovernanceOrKeeper {
        require(isVaultRegistered[_vault], "VaultRegistry: Vault is not registered");
        vaultName[_vault] = _newName;
        emit RegistryUpdated(_vault, _newName);
    }

    /// @notice Adds vaults to the registry in batches.
    /// @param _vaults Vaults to add to the registry.
    /// @param _names Names of the added vaults.
    function batchAddVaults(
        address[] memory _vaults,
        string[] memory _names
    ) public onlyGovernanceOrKeeper {
        require(_names.length == _vaults.length, "VaultRegistry: Name length does not match with vaults length");
        for(uint256 i = 0; i < _vaults.length; i++) {
            require(!isVaultRegistered[_vaults[i]], "VaultRegistry: Vault already registered");
            vaults.push(_vaults[i]);
            vaultName[_vaults[i]] = _names[i];
            emit RegistryUpdated(_vaults[i], _names[i]);
        }
    }

    /// @notice Adds a keeper to the registry.
    /// @param _keeper Address of the keeper to add.
    function addKeeper(address _keeper) public onlyGovernance {
        keepers[_keeper] = true;
    }

    /// @notice Removes a keeper from the registry.
    /// @param _keeper Address of the keeper to remove from the registry,
    function removeKeeper( address _keeper) public onlyGovernance {
        keepers[_keeper] = false;
    }

    /// @notice Returns all vaults that are in the registry.
    /// @return All registered vaults.
    function allVaults() public view returns (address[] memory) {
        return (vaults);
    }
}

File 2 of 3 : Governable.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "../Storage.sol";

/**
 * @dev Contract for access control where the governance address specified
 * in the Storage contract can be granted access to specific functions
 * on a contract that inherits this contract.
 */

contract Governable {

  Storage public store;

  constructor(address _store) {
    require(_store != address(0), "Governable: New storage shouldn't be empty");
    store = Storage(_store);
  }

  modifier onlyGovernance() {
    require(store.isGovernance(msg.sender), "Governable: Not governance");
    _;
  }

  function setStorage(address _store) public onlyGovernance {
    require(_store != address(0), "Governable: New storage shouldn't be empty");
    store = Storage(_store);
  }

  function governance() public view returns (address) {
    return store.governance();
  }
}

File 3 of 3 : Storage.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract Storage {

  address public governance;
  address public controller;

  constructor() {
    governance = msg.sender;
  }

  modifier onlyGovernance() {
    require(isGovernance(msg.sender), "Storage: Not governance");
    _;
  }

  function setGovernance(address _governance) public onlyGovernance {
    require(_governance != address(0), "Storage: New governance shouldn't be empty");
    governance = _governance;
  }

  function setController(address _controller) public onlyGovernance {
    require(_controller != address(0), "Storage: New controller shouldn't be empty");
    controller = _controller;
  }

  function isGovernance(address account) public view returns (bool) {
    return account == governance;
  }

  function isController(address account) public view returns (bool) {
    return account == controller;
  }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_store","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"RegistryUpdated","type":"event"},{"inputs":[{"internalType":"address","name":"_keeper","type":"address"}],"name":"addKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"string","name":"_name","type":"string"}],"name":"addVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allVaults","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_vaults","type":"address[]"},{"internalType":"string[]","name":"_names","type":"string[]"}],"name":"batchAddVaults","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isVaultRegistered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"keepers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_keeper","type":"address"}],"name":"removeKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_store","type":"address"}],"name":"setStorage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"store","outputs":[{"internalType":"contract Storage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"string","name":"_newName","type":"string"}],"name":"updateVaultName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"vaultName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"vaults","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5060405161123438038061123483398101604081905261002f916100c3565b806001600160a01b03811661009d5760405162461bcd60e51b815260206004820152602a60248201527f476f7665726e61626c653a204e65772073746f726167652073686f756c646e276044820152697420626520656d70747960b01b606482015260840160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055506100f3565b6000602082840312156100d557600080fd5b81516001600160a01b03811681146100ec57600080fd5b9392505050565b611132806101026000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80635aa6e6751161008c5780637a0c2b70116100665780637a0c2b70146101d65780638c64ea4a146101e95780639137c1a7146101fc578063975057e71461020f57600080fd5b80635aa6e67514610183578063698c315f146101a35780636d5f9b33146101b657600080fd5b8063063effeb146100d45780630e1c2e61146100f2578063105a88e31461010757806314ae9f2e1461013a5780633bbd64bc1461014d5780634032b72b14610170575b600080fd5b6100dc610222565b6040516100e99190610e91565b60405180910390f35b610105610100366004610d47565b610284565b005b61012a610115366004610d06565b60036020526000908152604090205460ff1681565b60405190151581526020016100e9565b610105610148366004610d06565b6103df565b61012a61015b366004610d06565b60046020526000908152604090205460ff1681565b61010561017e366004610d06565b610497565b61018b610552565b6040516001600160a01b0390911681526020016100e9565b6101056101b1366004610d97565b6105de565b6101c96101c4366004610d06565b610854565b6040516100e99190610ede565b6101056101e4366004610d47565b6108ee565b61018b6101f7366004610e78565b610a1a565b61010561020a366004610d06565b610a44565b60005461018b906001600160a01b031681565b6060600180548060200260200160405190810160405280929190818152602001828054801561027a57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161025c575b5050505050905090565b61028c610552565b6001600160a01b0316336001600160a01b031614806102ba57503360009081526004602052604090205460ff165b6102df5760405162461bcd60e51b81526004016102d690610fb1565b60405180910390fd5b6001600160a01b03821660009081526003602052604090205460ff16156103185760405162461bcd60e51b81526004016102d690610f33565b600180548082019091557fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319166001600160a01b0384169081179091556000908152600260209081526040909120825161037f92840190610b66565b506001600160a01b03821660008181526003602052604090819020805460ff19166001179055517f156966d16bce19fbc75c727558e31e4403e5ba46ec14419522068eb2b30aed87906103d3908490610ede565b60405180910390a25050565b6000546040516337b87c3960e21b81523360048201526001600160a01b039091169063dee1f0e49060240160206040518083038186803b15801561042257600080fd5b505afa158015610436573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045a9190610e56565b6104765760405162461bcd60e51b81526004016102d690610f7a565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6000546040516337b87c3960e21b81523360048201526001600160a01b039091169063dee1f0e49060240160206040518083038186803b1580156104da57600080fd5b505afa1580156104ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105129190610e56565b61052e5760405162461bcd60e51b81526004016102d690610f7a565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b60008060009054906101000a90046001600160a01b03166001600160a01b0316635aa6e6756040518163ffffffff1660e01b815260040160206040518083038186803b1580156105a157600080fd5b505afa1580156105b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d99190610d2a565b905090565b6105e6610552565b6001600160a01b0316336001600160a01b0316148061061457503360009081526004602052604090205460ff165b6106305760405162461bcd60e51b81526004016102d690610fb1565b81518151146106a75760405162461bcd60e51b815260206004820152603c60248201527f5661756c7452656769737472793a204e616d65206c656e67746820646f65732060448201527f6e6f74206d617463682077697468207661756c7473206c656e6774680000000060648201526084016102d6565b60005b825181101561084f57600360008483815181106106c9576106c96110b8565b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff161561070d5760405162461bcd60e51b81526004016102d690610f33565b6001838281518110610721576107216110b8565b60209081029190910181015182546001810184556000938452919092200180546001600160a01b0319166001600160a01b039092169190911790558151829082908110610770576107706110b8565b60200260200101516002600085848151811061078e5761078e6110b8565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002090805190602001906107c9929190610b66565b508281815181106107dc576107dc6110b8565b60200260200101516001600160a01b03167f156966d16bce19fbc75c727558e31e4403e5ba46ec14419522068eb2b30aed87838381518110610820576108206110b8565b60200260200101516040516108359190610ede565b60405180910390a2806108478161108f565b9150506106aa565b505050565b6002602052600090815260409020805461086d90611054565b80601f016020809104026020016040519081016040528092919081815260200182805461089990611054565b80156108e65780601f106108bb576101008083540402835291602001916108e6565b820191906000526020600020905b8154815290600101906020018083116108c957829003601f168201915b505050505081565b6108f6610552565b6001600160a01b0316336001600160a01b0316148061092457503360009081526004602052604090205460ff165b6109405760405162461bcd60e51b81526004016102d690610fb1565b6001600160a01b03821660009081526003602052604090205460ff166109b75760405162461bcd60e51b815260206004820152602660248201527f5661756c7452656769737472793a205661756c74206973206e6f7420726567696044820152651cdd195c995960d21b60648201526084016102d6565b6001600160a01b038216600090815260026020908152604090912082516109e092840190610b66565b50816001600160a01b03167f156966d16bce19fbc75c727558e31e4403e5ba46ec14419522068eb2b30aed87826040516103d39190610ede565b60018181548110610a2a57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546040516337b87c3960e21b81523360048201526001600160a01b039091169063dee1f0e49060240160206040518083038186803b158015610a8757600080fd5b505afa158015610a9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610abf9190610e56565b610adb5760405162461bcd60e51b81526004016102d690610f7a565b6001600160a01b038116610b445760405162461bcd60e51b815260206004820152602a60248201527f476f7665726e61626c653a204e65772073746f726167652073686f756c646e276044820152697420626520656d70747960b01b60648201526084016102d6565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b828054610b7290611054565b90600052602060002090601f016020900481019282610b945760008555610bda565b82601f10610bad57805160ff1916838001178555610bda565b82800160010185558215610bda579182015b82811115610bda578251825591602001919060010190610bbf565b50610be6929150610bea565b5090565b5b80821115610be65760008155600101610beb565b600082601f830112610c1057600080fd5b81356020610c25610c2083611030565b610fff565b80838252828201915082860187848660051b8901011115610c4557600080fd5b6000805b86811015610c8857823567ffffffffffffffff811115610c67578283fd5b610c758b88838d0101610c96565b8652509385019391850191600101610c49565b509198975050505050505050565b600082601f830112610ca757600080fd5b813567ffffffffffffffff811115610cc157610cc16110ce565b610cd4601f8201601f1916602001610fff565b818152846020838601011115610ce957600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215610d1857600080fd5b8135610d23816110e4565b9392505050565b600060208284031215610d3c57600080fd5b8151610d23816110e4565b60008060408385031215610d5a57600080fd5b8235610d65816110e4565b9150602083013567ffffffffffffffff811115610d8157600080fd5b610d8d85828601610c96565b9150509250929050565b60008060408385031215610daa57600080fd5b823567ffffffffffffffff80821115610dc257600080fd5b818501915085601f830112610dd657600080fd5b81356020610de6610c2083611030565b8083825282820191508286018a848660051b8901011115610e0657600080fd5b600096505b84871015610e32578035610e1e816110e4565b835260019690960195918301918301610e0b565b5096505086013592505080821115610e4957600080fd5b50610d8d85828601610bff565b600060208284031215610e6857600080fd5b81518015158114610d2357600080fd5b600060208284031215610e8a57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b81811015610ed25783516001600160a01b031683529284019291840191600101610ead565b50909695505050505050565b600060208083528351808285015260005b81811015610f0b57858101830151858201604001528201610eef565b81811115610f1d576000604083870101525b50601f01601f1916929092016040019392505050565b60208082526027908201527f5661756c7452656769737472793a205661756c7420616c7265616479207265676040820152661a5cdd195c995960ca1b606082015260800190565b6020808252601a908201527f476f7665726e61626c653a204e6f7420676f7665726e616e6365000000000000604082015260600190565b6020808252602e908201527f5661756c7452656769737472793a2043616c6c6572206e6f7420676f7665726e60408201526d30b731b29037b91035b2b2b832b960911b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715611028576110286110ce565b604052919050565b600067ffffffffffffffff82111561104a5761104a6110ce565b5060051b60200190565b600181811c9082168061106857607f821691505b6020821081141561108957634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156110b157634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146110f957600080fd5b5056fea264697066735822122054d7ac6c763cecff0124ab0d4d781ba0dc56ad04bd989e6261317dfe8c553d1364736f6c634300080600330000000000000000000000003710ce7e2e4887bd6a9215f780c78f7462544efe

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000003710ce7e2e4887bd6a9215f780c78f7462544efe

-----Decoded View---------------
Arg [0] : _store (address): 0x3710ce7e2e4887bd6a9215f780c78f7462544efe

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000003710ce7e2e4887bd6a9215f780c78f7462544efe


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
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.