ETH Price: $2,052.40 (+5.73%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Init133777722021-10-08 10:49:451589 days ago1633690185IN
Opium: Registry V1
0 ETH0.0111962270

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x1CaD268F...2332a3a35
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
Registry

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2021-02-25
*/

/**

  Source code of Opium Protocol
  Web https://opium.network
  Telegram https://t.me/opium_network
  Twitter https://twitter.com/opium_network

 */

// File: LICENSE

/**

The software and documentation available in this repository (the "Software") is protected by copyright law and accessible pursuant to the license set forth below. Copyright © 2020 Blockeys BV. All rights reserved.

Permission is hereby granted, free of charge, to any person or organization obtaining the Software (the “Licensee”) to privately study, review, and analyze the Software. Licensee shall not use the Software for any other purpose. Licensee shall not modify, transfer, assign, share, or sub-license the Software or any derivative works of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

// File: contracts/Errors/RegistryErrors.sol

pragma solidity 0.5.16;

contract RegistryErrors {
    string constant internal ERROR_REGISTRY_ONLY_INITIALIZER = "REGISTRY:ONLY_INITIALIZER";
    string constant internal ERROR_REGISTRY_ONLY_OPIUM_ADDRESS_ALLOWED = "REGISTRY:ONLY_OPIUM_ADDRESS_ALLOWED";
    
    string constant internal ERROR_REGISTRY_CANT_BE_ZERO_ADDRESS = "REGISTRY:CANT_BE_ZERO_ADDRESS";

    string constant internal ERROR_REGISTRY_ALREADY_SET = "REGISTRY:ALREADY_SET";
}

// File: contracts/Registry.sol

pragma solidity 0.5.16;


/// @title Opium.Registry contract keeps addresses of deployed Opium contracts set to allow them route and communicate to each other
contract Registry is RegistryErrors {

    // Address of Opium.TokenMinter contract
    address private minter;

    // Address of Opium.Core contract
    address private core;

    // Address of Opium.OracleAggregator contract
    address private oracleAggregator;

    // Address of Opium.SyntheticAggregator contract
    address private syntheticAggregator;

    // Address of Opium.TokenSpender contract
    address private tokenSpender;

    // Address of Opium commission receiver
    address private opiumAddress;

    // Address of Opium contract set deployer
    address public initializer;

    /// @notice This modifier restricts access to functions, which could be called only by initializer
    modifier onlyInitializer() {
        require(msg.sender == initializer, ERROR_REGISTRY_ONLY_INITIALIZER);
        _;
    }

    /// @notice Sets initializer
    constructor() public {
        initializer = msg.sender;
    }

    // SETTERS

    /// @notice Sets Opium.TokenMinter, Opium.Core, Opium.OracleAggregator, Opium.SyntheticAggregator, Opium.TokenSpender, Opium commission receiver addresses and allows to do it only once
    /// @param _minter address Address of Opium.TokenMinter
    /// @param _core address Address of Opium.Core
    /// @param _oracleAggregator address Address of Opium.OracleAggregator
    /// @param _syntheticAggregator address Address of Opium.SyntheticAggregator
    /// @param _tokenSpender address Address of Opium.TokenSpender
    /// @param _opiumAddress address Address of Opium commission receiver
    function init(
        address _minter,
        address _core,
        address _oracleAggregator,
        address _syntheticAggregator,
        address _tokenSpender,
        address _opiumAddress
    ) external onlyInitializer {
        require(
            minter == address(0) &&
            core == address(0) &&
            oracleAggregator == address(0) &&
            syntheticAggregator == address(0) &&
            tokenSpender == address(0) &&
            opiumAddress == address(0),
            ERROR_REGISTRY_ALREADY_SET
        );

        require(
            _minter != address(0) &&
            _core != address(0) &&
            _oracleAggregator != address(0) &&
            _syntheticAggregator != address(0) &&
            _tokenSpender != address(0) &&
            _opiumAddress != address(0),
            ERROR_REGISTRY_CANT_BE_ZERO_ADDRESS
        );

        minter = _minter;
        core = _core;
        oracleAggregator = _oracleAggregator;
        syntheticAggregator = _syntheticAggregator;
        tokenSpender = _tokenSpender;
        opiumAddress = _opiumAddress;
    }

    /// @notice Allows opium commission receiver address to change itself
    /// @param _opiumAddress address New opium commission receiver address
    function changeOpiumAddress(address _opiumAddress) external {
        require(opiumAddress == msg.sender, ERROR_REGISTRY_ONLY_OPIUM_ADDRESS_ALLOWED);
        require(_opiumAddress != address(0), ERROR_REGISTRY_CANT_BE_ZERO_ADDRESS);
        opiumAddress = _opiumAddress;
    }

    // GETTERS

    /// @notice Returns address of Opium.TokenMinter
    /// @param result address Address of Opium.TokenMinter
    function getMinter() external view returns (address result) {
        return minter;
    }

    /// @notice Returns address of Opium.Core
    /// @param result address Address of Opium.Core
    function getCore() external view returns (address result) {
        return core;
    }

    /// @notice Returns address of Opium.OracleAggregator
    /// @param result address Address of Opium.OracleAggregator
    function getOracleAggregator() external view returns (address result) {
        return oracleAggregator;
    }

    /// @notice Returns address of Opium.SyntheticAggregator
    /// @param result address Address of Opium.SyntheticAggregator
    function getSyntheticAggregator() external view returns (address result) {
        return syntheticAggregator;
    }

    /// @notice Returns address of Opium.TokenSpender
    /// @param result address Address of Opium.TokenSpender
    function getTokenSpender() external view returns (address result) {
        return tokenSpender;
    }

    /// @notice Returns address of Opium commission receiver
    /// @param result address Address of Opium commission receiver
    function getOpiumAddress() external view returns (address result) {
        return opiumAddress;
    }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"constant":false,"inputs":[{"internalType":"address","name":"_opiumAddress","type":"address"}],"name":"changeOpiumAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getCore","outputs":[{"internalType":"address","name":"result","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getMinter","outputs":[{"internalType":"address","name":"result","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getOpiumAddress","outputs":[{"internalType":"address","name":"result","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getOracleAggregator","outputs":[{"internalType":"address","name":"result","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getSyntheticAggregator","outputs":[{"internalType":"address","name":"result","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTokenSpender","outputs":[{"internalType":"address","name":"result","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_minter","type":"address"},{"internalType":"address","name":"_core","type":"address"},{"internalType":"address","name":"_oracleAggregator","type":"address"},{"internalType":"address","name":"_syntheticAggregator","type":"address"},{"internalType":"address","name":"_tokenSpender","type":"address"},{"internalType":"address","name":"_opiumAddress","type":"address"}],"name":"init","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"initializer","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]

0x608060405234801561001057600080fd5b50600680546001600160a01b03191633179055610664806100326000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063beb5bd8111610066578063beb5bd811461013a578063d34ac2bc14610142578063da4fbe521461014a578063ec45d8ae14610152578063f36675171461015a57610093565b80638177644c1461009857806399e133f9146100bc5780639ce110d71461010c578063ae62976614610114575b600080fd5b6100a0610162565b604080516001600160a01b039092168252519081900360200190f35b61010a600480360360c08110156100d257600080fd5b506001600160a01b038135811691602081013582169160408201358116916060810135821691608082013581169160a0013516610171565b005b6100a061048f565b61010a6004803603602081101561012a57600080fd5b50356001600160a01b031661049e565b6100a06105c1565b6100a06105d0565b6100a06105df565b6100a06105ee565b6100a06105fd565b6003546001600160a01b031690565b60065460408051808201909152601981527f52454749535452593a4f4e4c595f494e495449414c495a4552000000000000006020820152906001600160a01b0316331461023c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156102015781810151838201526020016101e9565b50505050905090810190601f16801561022e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000546001600160a01b031615801561025f57506001546001600160a01b0316155b801561027457506002546001600160a01b0316155b801561028957506003546001600160a01b0316155b801561029e57506004546001600160a01b0316155b80156102b357506005546001600160a01b0316155b60405180604001604052806014815260200173149151d254d514964e9053149150511657d4d15560621b8152509061032c5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156102015781810151838201526020016101e9565b506001600160a01b0386161580159061034d57506001600160a01b03851615155b801561036157506001600160a01b03841615155b801561037557506001600160a01b03831615155b801561038957506001600160a01b03821615155b801561039d57506001600160a01b03811615155b6040518060400160405280601d81526020017f52454749535452593a43414e545f42455f5a45524f5f414444524553530000008152509061041f5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156102015781810151838201526020016101e9565b50600080546001600160a01b03199081166001600160a01b0398891617909155600180548216968816969096179095556002805486169487169490941790935560038054851692861692909217909155600480548416918516919091179055600580549092169216919091179055565b6006546001600160a01b031681565b600554604080516060810190915260238082526001600160a01b039290921633149161060d6020830139906105145760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156102015781810151838201526020016101e9565b5060408051808201909152601d81527f52454749535452593a43414e545f42455f5a45524f5f4144445245535300000060208201526001600160a01b03821661059e5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156102015781810151838201526020016101e9565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031690565b6002546001600160a01b031690565b6001546001600160a01b031690565b6005546001600160a01b031690565b6000546001600160a01b03169056fe52454749535452593a4f4e4c595f4f5049554d5f414444524553535f414c4c4f574544a265627a7a723158206c19295a41bfcdd3962a0e73bb7665f8fabd548423a10359544eddb6bf9f17af64736f6c63430005100032

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063beb5bd8111610066578063beb5bd811461013a578063d34ac2bc14610142578063da4fbe521461014a578063ec45d8ae14610152578063f36675171461015a57610093565b80638177644c1461009857806399e133f9146100bc5780639ce110d71461010c578063ae62976614610114575b600080fd5b6100a0610162565b604080516001600160a01b039092168252519081900360200190f35b61010a600480360360c08110156100d257600080fd5b506001600160a01b038135811691602081013582169160408201358116916060810135821691608082013581169160a0013516610171565b005b6100a061048f565b61010a6004803603602081101561012a57600080fd5b50356001600160a01b031661049e565b6100a06105c1565b6100a06105d0565b6100a06105df565b6100a06105ee565b6100a06105fd565b6003546001600160a01b031690565b60065460408051808201909152601981527f52454749535452593a4f4e4c595f494e495449414c495a4552000000000000006020820152906001600160a01b0316331461023c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156102015781810151838201526020016101e9565b50505050905090810190601f16801561022e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000546001600160a01b031615801561025f57506001546001600160a01b0316155b801561027457506002546001600160a01b0316155b801561028957506003546001600160a01b0316155b801561029e57506004546001600160a01b0316155b80156102b357506005546001600160a01b0316155b60405180604001604052806014815260200173149151d254d514964e9053149150511657d4d15560621b8152509061032c5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156102015781810151838201526020016101e9565b506001600160a01b0386161580159061034d57506001600160a01b03851615155b801561036157506001600160a01b03841615155b801561037557506001600160a01b03831615155b801561038957506001600160a01b03821615155b801561039d57506001600160a01b03811615155b6040518060400160405280601d81526020017f52454749535452593a43414e545f42455f5a45524f5f414444524553530000008152509061041f5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156102015781810151838201526020016101e9565b50600080546001600160a01b03199081166001600160a01b0398891617909155600180548216968816969096179095556002805486169487169490941790935560038054851692861692909217909155600480548416918516919091179055600580549092169216919091179055565b6006546001600160a01b031681565b600554604080516060810190915260238082526001600160a01b039290921633149161060d6020830139906105145760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156102015781810151838201526020016101e9565b5060408051808201909152601d81527f52454749535452593a43414e545f42455f5a45524f5f4144445245535300000060208201526001600160a01b03821661059e5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156102015781810151838201526020016101e9565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031690565b6002546001600160a01b031690565b6001546001600160a01b031690565b6005546001600160a01b031690565b6000546001600160a01b03169056fe52454749535452593a4f4e4c595f4f5049554d5f414444524553535f414c4c4f574544a265627a7a723158206c19295a41bfcdd3962a0e73bb7665f8fabd548423a10359544eddb6bf9f17af64736f6c63430005100032

Deployed Bytecode Sourcemap

1935:4569:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1935:4569:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5913:118;;;:::i;:::-;;;;-1:-1:-1;;;;;5913:118:0;;;;;;;;;;;;;;3528:1136;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;3528:1136:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2528:26;;;:::i;4823:280::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4823:280:0;-1:-1:-1;;;;;4823:280:0;;:::i;6155:104::-;;;:::i;5663:112::-;;;:::i;5443:88::-;;;:::i;6397:104::-;;;:::i;5243:92::-;;;:::i;5913:118::-;6004:19;;-1:-1:-1;;;;;6004:19:0;5913:118;:::o;3528:1136::-;2727:11;;2740:31;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2727:11:0;2713:10;:25;2705:67;;;;-1:-1:-1;;;2705:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2705:67:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3814:1:0;3796:6;-1:-1:-1;;;;;3796:6:0;:20;:55;;;;-1:-1:-1;3833:4:0;;-1:-1:-1;;;;;3833:4:0;:18;3796:55;:102;;;;-1:-1:-1;3868:16:0;;-1:-1:-1;;;;;3868:16:0;:30;3796:102;:152;;;;-1:-1:-1;3915:19:0;;-1:-1:-1;;;;;3915:19:0;:33;3796:152;:195;;;;-1:-1:-1;3965:12:0;;-1:-1:-1;;;;;3965:12:0;:26;3796:195;:238;;;;-1:-1:-1;4008:12:0;;-1:-1:-1;;;;;4008:12:0;:26;3796:238;4049:26;;;;;;;;;;;;;-1:-1:-1;;;4049:26:0;;;3774:312;;;;;-1:-1:-1;;;3774:312:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;3774:312:0;-1:-1:-1;;;;;;4121:21:0;;;;;;:57;;-1:-1:-1;;;;;;4159:19:0;;;;4121:57;:105;;;;-1:-1:-1;;;;;;4195:31:0;;;;4121:105;:156;;;;-1:-1:-1;;;;;;4243:34:0;;;;4121:156;:200;;;;-1:-1:-1;;;;;;4294:27:0;;;;4121:200;:244;;;;-1:-1:-1;;;;;;4338:27:0;;;;4121:244;4380:35;;;;;;;;;;;;;;;;;4099:327;;;;;-1:-1:-1;;;4099:327:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;4099:327:0;-1:-1:-1;4439:6:0;:16;;-1:-1:-1;;;;;;4439:16:0;;;-1:-1:-1;;;;;4439:16:0;;;;;;;-1:-1:-1;4466:12:0;;;;;;;;;;;;;;4489:16;:36;;;;;;;;;;;;;;4536:19;:42;;;;;;;;;;;;;;4589:12;:28;;;;;;;;;;;;;4628:12;:28;;;;;;;;;;;;;3528:1136::o;2528:26::-;;;-1:-1:-1;;;;;2528:26:0;;:::o;4823:280::-;4902:12;;4930:41;;;;;;;;;;;;;-1:-1:-1;;;;;4902:12:0;;;;4918:10;4902:26;;4930:41;;;;;4894:78;;;;;-1:-1:-1;;;4894:78:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;4894:78:0;-1:-1:-1;5020:35:0;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4991:27:0;;4983:73;;;;-1:-1:-1;;;4983:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;4983:73:0;-1:-1:-1;5067:12:0;:28;;-1:-1:-1;;;;;;5067:28:0;-1:-1:-1;;;;;5067:28:0;;;;;;;;;;4823:280::o;6155:104::-;6239:12;;-1:-1:-1;;;;;6239:12:0;6155:104;:::o;5663:112::-;5751:16;;-1:-1:-1;;;;;5751:16:0;5663:112;:::o;5443:88::-;5519:4;;-1:-1:-1;;;;;5519:4:0;5443:88;:::o;6397:104::-;6481:12;;-1:-1:-1;;;;;6481:12:0;6397:104;:::o;5243:92::-;5287:14;5321:6;-1:-1:-1;;;;;5321:6:0;5243:92;:::o

Swarm Source

bzzr://6c19295a41bfcdd3962a0e73bb7665f8fabd548423a10359544eddb6bf9f17af

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.