ETH Price: $3,559.79 (+6.70%)

Contract

0x239a4858884A60996762637794a6FfE465F9220c
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

TokenTracker

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Latest 2 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
92873592020-01-15 18:31:251777 days ago1579113085  Contract Creation0 ETH
92873532020-01-15 18:29:421777 days ago1579112982  Contract Creation0 ETH
Loading...
Loading

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

Contract Name:
SetToken

Compiler Version
v0.5.7+commit.6da8b019

Optimization Enabled:
Yes with 200 runs

Other Settings:
byzantium EvmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2019-05-09
*/

// File: openzeppelin-solidity/contracts/token/ERC20/IERC20.sol

pragma solidity ^0.5.2;

/**
 * @title ERC20 interface
 * @dev see https://eips.ethereum.org/EIPS/eip-20
 */
interface IERC20 {
    function transfer(address to, uint256 value) external returns (bool);

    function approve(address spender, uint256 value) external returns (bool);

    function transferFrom(address from, address to, uint256 value) external returns (bool);

    function totalSupply() external view returns (uint256);

    function balanceOf(address who) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);

    event Transfer(address indexed from, address indexed to, uint256 value);

    event Approval(address indexed owner, address indexed spender, uint256 value);
}

// File: openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol

pragma solidity ^0.5.2;


/**
 * @title ERC20Detailed token
 * @dev The decimals are only for visualization purposes.
 * All the operations are done using the smallest and indivisible token unit,
 * just as on Ethereum all the operations are done in wei.
 */
contract ERC20Detailed is IERC20 {
    string private _name;
    string private _symbol;
    uint8 private _decimals;

    constructor (string memory name, string memory symbol, uint8 decimals) public {
        _name = name;
        _symbol = symbol;
        _decimals = decimals;
    }

    /**
     * @return the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @return the symbol of the token.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @return the number of decimals of the token.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }
}

// File: openzeppelin-solidity/contracts/math/SafeMath.sol

pragma solidity ^0.5.2;

/**
 * @title SafeMath
 * @dev Unsigned math operations with safety checks that revert on error
 */
library SafeMath {
    /**
     * @dev Multiplies two unsigned integers, reverts on overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b);

        return c;
    }

    /**
     * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Adds two unsigned integers, reverts on overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a);

        return c;
    }

    /**
     * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
     * reverts when dividing by zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0);
        return a % b;
    }
}

// File: openzeppelin-solidity/contracts/token/ERC20/ERC20.sol

pragma solidity ^0.5.2;



/**
 * @title Standard ERC20 token
 *
 * @dev Implementation of the basic standard token.
 * https://eips.ethereum.org/EIPS/eip-20
 * Originally based on code by FirstBlood:
 * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
 *
 * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for
 * all accounts just by listening to said events. Note that this isn't required by the specification, and other
 * compliant implementations may not do it.
 */
contract ERC20 is IERC20 {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowed;

    uint256 private _totalSupply;

    /**
     * @dev Total number of tokens in existence
     */
    function totalSupply() public view returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev Gets the balance of the specified address.
     * @param owner The address to query the balance of.
     * @return A uint256 representing the amount owned by the passed address.
     */
    function balanceOf(address owner) public view returns (uint256) {
        return _balances[owner];
    }

    /**
     * @dev Function to check the amount of tokens that an owner allowed to a spender.
     * @param owner address The address which owns the funds.
     * @param spender address The address which will spend the funds.
     * @return A uint256 specifying the amount of tokens still available for the spender.
     */
    function allowance(address owner, address spender) public view returns (uint256) {
        return _allowed[owner][spender];
    }

    /**
     * @dev Transfer token to a specified address
     * @param to The address to transfer to.
     * @param value The amount to be transferred.
     */
    function transfer(address to, uint256 value) public returns (bool) {
        _transfer(msg.sender, to, value);
        return true;
    }

    /**
     * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
     * Beware that changing an allowance with this method brings the risk that someone may use both the old
     * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
     * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     */
    function approve(address spender, uint256 value) public returns (bool) {
        _approve(msg.sender, spender, value);
        return true;
    }

    /**
     * @dev Transfer tokens from one address to another.
     * Note that while this function emits an Approval event, this is not required as per the specification,
     * and other compliant implementations may not emit the event.
     * @param from address The address which you want to send tokens from
     * @param to address The address which you want to transfer to
     * @param value uint256 the amount of tokens to be transferred
     */
    function transferFrom(address from, address to, uint256 value) public returns (bool) {
        _transfer(from, to, value);
        _approve(from, msg.sender, _allowed[from][msg.sender].sub(value));
        return true;
    }

    /**
     * @dev Increase the amount of tokens that an owner allowed to a spender.
     * approve should be called when _allowed[msg.sender][spender] == 0. To increment
     * allowed value is better to use this function to avoid 2 calls (and wait until
     * the first transaction is mined)
     * From MonolithDAO Token.sol
     * Emits an Approval event.
     * @param spender The address which will spend the funds.
     * @param addedValue The amount of tokens to increase the allowance by.
     */
    function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
        _approve(msg.sender, spender, _allowed[msg.sender][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Decrease the amount of tokens that an owner allowed to a spender.
     * approve should be called when _allowed[msg.sender][spender] == 0. To decrement
     * allowed value is better to use this function to avoid 2 calls (and wait until
     * the first transaction is mined)
     * From MonolithDAO Token.sol
     * Emits an Approval event.
     * @param spender The address which will spend the funds.
     * @param subtractedValue The amount of tokens to decrease the allowance by.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
        _approve(msg.sender, spender, _allowed[msg.sender][spender].sub(subtractedValue));
        return true;
    }

    /**
     * @dev Transfer token for a specified addresses
     * @param from The address to transfer from.
     * @param to The address to transfer to.
     * @param value The amount to be transferred.
     */
    function _transfer(address from, address to, uint256 value) internal {
        require(to != address(0));

        _balances[from] = _balances[from].sub(value);
        _balances[to] = _balances[to].add(value);
        emit Transfer(from, to, value);
    }

    /**
     * @dev Internal function that mints an amount of the token and assigns it to
     * an account. This encapsulates the modification of balances such that the
     * proper events are emitted.
     * @param account The account that will receive the created tokens.
     * @param value The amount that will be created.
     */
    function _mint(address account, uint256 value) internal {
        require(account != address(0));

        _totalSupply = _totalSupply.add(value);
        _balances[account] = _balances[account].add(value);
        emit Transfer(address(0), account, value);
    }

    /**
     * @dev Internal function that burns an amount of the token of a given
     * account.
     * @param account The account whose tokens will be burnt.
     * @param value The amount that will be burnt.
     */
    function _burn(address account, uint256 value) internal {
        require(account != address(0));

        _totalSupply = _totalSupply.sub(value);
        _balances[account] = _balances[account].sub(value);
        emit Transfer(account, address(0), value);
    }

    /**
     * @dev Approve an address to spend another addresses' tokens.
     * @param owner The address that owns the tokens.
     * @param spender The address that will spend the tokens.
     * @param value The number of tokens that can be spent.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        require(spender != address(0));
        require(owner != address(0));

        _allowed[owner][spender] = value;
        emit Approval(owner, spender, value);
    }

    /**
     * @dev Internal function that burns an amount of the token of a given
     * account, deducting from the sender's allowance for said account. Uses the
     * internal burn function.
     * Emits an Approval event (reflecting the reduced allowance).
     * @param account The account whose tokens will be burnt.
     * @param value The amount that will be burnt.
     */
    function _burnFrom(address account, uint256 value) internal {
        _burn(account, value);
        _approve(account, msg.sender, _allowed[account][msg.sender].sub(value));
    }
}

// File: contracts/lib/CommonValidationsLibrary.sol

/*
    Copyright 2018 Set Labs Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/

pragma solidity 0.5.7;


library CommonValidationsLibrary {

    /**
     * Ensures that an address array is not empty.
     *
     * @param  _addressArray       Address array input
     */
    function validateNonEmpty(
        address[] calldata _addressArray
    )
        external
        pure
    {
        require(
            _addressArray.length > 0,
            "Address array length must be > 0"
        );
    }

    /**
     * Ensures that an address array and uint256 array are equal length
     *
     * @param  _addressArray       Address array input
     * @param  _uint256Array       Uint256 array input
     */
    function validateEqualLength(
        address[] calldata _addressArray,
        uint256[] calldata _uint256Array
    )
        external
        pure
    {
        require(
            _addressArray.length == _uint256Array.length,
            "Input length mismatch"
        );
    }
}

// File: contracts/lib/CommonMath.sol

/*
    Copyright 2018 Set Labs Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/

pragma solidity 0.5.7;



library CommonMath {
    using SafeMath for uint256;

    /**
     * Calculates and returns the maximum value for a uint256
     *
     * @return  The maximum value for uint256
     */
    function maxUInt256()
        internal
        pure
        returns (uint256)
    {
        return 2 ** 256 - 1;
    }

    /**
    * @dev Performs the power on a specified value, reverts on overflow.
    */
    function safePower(
        uint256 a,
        uint256 pow
    )
        internal
        pure
        returns (uint256)
    {
        require(a > 0);

        uint256 result = 1;
        for (uint256 i = 0; i < pow; i++){
            uint256 previousResult = result;

            // Using safemath multiplication prevents overflows
            result = previousResult.mul(a);
        }

        return result;
    }

    /**
     * Checks for rounding errors and returns value of potential partial amounts of a principal
     *
     * @param  _principal       Number fractional amount is derived from
     * @param  _numerator       Numerator of fraction
     * @param  _denominator     Denominator of fraction
     * @return uint256          Fractional amount of principal calculated
     */
    function getPartialAmount(
        uint256 _principal,
        uint256 _numerator,
        uint256 _denominator
    )
        internal
        pure
        returns (uint256)
    {
        // Get remainder of partial amount (if 0 not a partial amount)
        uint256 remainder = mulmod(_principal, _numerator, _denominator);

        // Return if not a partial amount
        if (remainder == 0) {
            return _principal.mul(_numerator).div(_denominator);
        }

        // Calculate error percentage
        uint256 errPercentageTimes1000000 = remainder.mul(1000000).div(_numerator.mul(_principal));

        // Require error percentage is less than 0.1%.
        require(
            errPercentageTimes1000000 < 1000,
            "CommonMath.getPartialAmount: Rounding error exceeds bounds"
        );

        return _principal.mul(_numerator).div(_denominator);
    }

}

// File: contracts/core/interfaces/ISetFactory.sol

/*
    Copyright 2018 Set Labs Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/

pragma solidity 0.5.7;


/**
 * @title ISetFactory
 * @author Set Protocol
 *
 * The ISetFactory interface provides operability for authorized contracts
 * to interact with SetTokenFactory
 */
interface ISetFactory {

    /* ============ External Functions ============ */

    /**
     * Return core address
     *
     * @return address        core address
     */
    function core()
        external
        returns (address);

    /**
     * Deploys a new Set Token and adds it to the valid list of SetTokens
     *
     * @param  _components           The address of component tokens
     * @param  _units                The units of each component token
     * @param  _naturalUnit          The minimum unit to be issued or redeemed
     * @param  _name                 The bytes32 encoded name of the new Set
     * @param  _symbol               The bytes32 encoded symbol of the new Set
     * @param  _callData             Byte string containing additional call parameters
     * @return setTokenAddress       The address of the new Set
     */
    function createSet(
        address[] calldata _components,
        uint[] calldata _units,
        uint256 _naturalUnit,
        bytes32 _name,
        bytes32 _symbol,
        bytes calldata _callData
    )
        external
        returns (address);
}

// File: contracts/core/tokens/SetToken.sol

/*
    Copyright 2018 Set Labs Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/

pragma solidity 0.5.7;








/**
 * @title SetToken
 * @author Set Protocol
 *
 * Implementation of the basic Set token.
 */
contract SetToken is
    ERC20,
    ERC20Detailed
{
    using SafeMath for uint256;

    /* ============ State Variables ============ */

    uint256 public naturalUnit;
    address[] public components;
    uint256[] public units;

    // Mapping of componentHash to isComponent
    mapping(address => bool) internal isComponent;

    // Address of the Factory contract that created the SetToken
    address public factory;

    /* ============ Constructor ============ */

    /**
     * Constructor function for Set token
     *
     * As looping operations are expensive, checking for duplicates will be on the onus of the application developer
     *
     * @param _factory          The factory used to create the Set Token
     * @param _components       A list of component address which you want to include
     * @param _units            A list of quantities of each component (corresponds to the Set of _components)
     * @param _naturalUnit      The minimum multiple of Sets that can be issued or redeemed
     * @param _name             The Set's name
     * @param _symbol           The Set's symbol
     */
    constructor(
        address _factory,
        address[] memory _components,
        uint256[] memory _units,
        uint256 _naturalUnit,
        string memory _name,
        string memory _symbol
    )
        public
        ERC20Detailed(
            _name,
            _symbol,
            18
        )
    {
        // Storing count and unit counts to local variable to save on invocation
        uint256 unitCount = _units.length;

        // Require naturalUnit passed is greater than 0
        require(
            _naturalUnit > 0,
            "SetToken.constructor: Natural unit must be positive"
        );

        // Confirm an empty _components array is not passed
        CommonValidationsLibrary.validateNonEmpty(_components);

        // Confirm there is one quantity for every token address
        CommonValidationsLibrary.validateEqualLength(_components, _units);

        // NOTE: It will be the onus of developers to check whether the addressExists
        // are in fact ERC20 addresses
        uint8 minDecimals = 18;
        uint8 currentDecimals;
        for (uint256 i = 0; i < unitCount; i++) {
            // Check that all units are non-zero
            uint256 currentUnits = _units[i];
            require(
                currentUnits > 0,
                "SetToken.constructor: Units must be positive"
            );

            // Check that all addresses are non-zero
            address currentComponent = _components[i];
            require(
                currentComponent != address(0),
                "SetToken.constructor: Invalid component address"
            );

            // Figure out which of the components has the minimum decimal value
            /* solium-disable-next-line security/no-low-level-calls */
            (bool success, ) = currentComponent.call(abi.encodeWithSignature("decimals()"));
            if (success) {
                currentDecimals = ERC20Detailed(currentComponent).decimals();
                minDecimals = currentDecimals < minDecimals ? currentDecimals : minDecimals;
            } else {
                // If one of the components does not implement decimals, we assume the worst
                // and set minDecimals to 0
                minDecimals = 0;
            }

            // Check the component has not already been added
            require(
                !tokenIsComponent(currentComponent),
                "SetToken.constructor: Duplicated component"
            );

            // Add component to isComponent mapping
            isComponent[currentComponent] = true;

            // Add component data to components and units state variables
            components.push(currentComponent);
            units.push(currentUnits);
        }

        // This is the minimum natural unit possible for a Set with these components.
        require(
            _naturalUnit >= CommonMath.safePower(10, uint256(18).sub(minDecimals)),
            "SetToken.constructor: Invalid natural unit"
        );

        factory = _factory;
        naturalUnit = _naturalUnit;
    }

    /* ============ Public Functions ============ */

    /*
     * Mint set token for given address.
     * Can only be called by authorized contracts.
     *
     * @param  _issuer      The address of the issuing account
     * @param  _quantity    The number of sets to attribute to issuer
     */
    function mint(
        address _issuer,
        uint256 _quantity
    )
        external
    {
        // Check that function caller is Core
        require(
            msg.sender == ISetFactory(factory).core(),
            "SetToken.mint: Sender must be core"
        );

        _mint(_issuer, _quantity);
    }

    /*
     * Burn set token for given address.
     * Can only be called by authorized contracts.
     *
     * @param  _from        The address of the redeeming account
     * @param  _quantity    The number of sets to burn from redeemer
     */
    function burn(
        address _from,
        uint256 _quantity
    )
        external
    {
        // Check that function caller is Core
        require(
            msg.sender == ISetFactory(factory).core(),
            "SetToken.burn: Sender must be core"
        );

        _burn(_from, _quantity);
    }

    /*
     * Get addresses of all components in the Set
     *
     * @return  componentAddresses       Array of component tokens
     */
    function getComponents()
        external
        view
        returns (address[] memory)
    {
        return components;
    }

    /*
     * Get units of all tokens in Set
     *
     * @return  units       Array of component units
     */
    function getUnits()
        external
        view
        returns (uint256[] memory)
    {
        return units;
    }

    /*
     * Validates address is member of Set's components
     *
     * @param  _tokenAddress     Address of token being checked
     * @return  bool             Whether token is member of Set's components
     */
    function tokenIsComponent(
        address _tokenAddress
    )
        public
        view
        returns (bool)
    {
        return isComponent[_tokenAddress];
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"getUnits","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenAddress","type":"address"}],"name":"tokenIsComponent","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_issuer","type":"address"},{"name":"_quantity","type":"uint256"}],"name":"mint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"naturalUnit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getComponents","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_quantity","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"factory","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"components","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"units","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_factory","type":"address"},{"name":"_components","type":"address[]"},{"name":"_units","type":"uint256[]"},{"name":"_naturalUnit","type":"uint256"},{"name":"_name","type":"string"},{"name":"_symbol","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101305760003560e060020a9004806370a08231116100b1578063a9059cbb11610075578063a9059cbb146103ce578063c45a0155146103fa578063c5d574fe1461041e578063dd62ed3e1461043b578063e5fba6cc1461046957610130565b806370a082311461034057806395d89b411461036657806399d50d5d1461036e5780639dc29fac14610376578063a457c2d7146103a257610130565b806323b872dd116100f857806323b872dd1461028a578063313ce567146102c057806339509351146102de57806340c10f191461030a57806342a7cfd51461033857610130565b8063027aa9f51461013557806306fdde031461018d578063095ea7b31461020a57806318160ddd1461024a57806318c53aca14610264575b600080fd5b61013d610486565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610179578181015183820152602001610161565b505050509050019250505060405180910390f35b6101956104de565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101cf5781810151838201526020016101b7565b50505050905090810190601f1680156101fc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102366004803603604081101561022057600080fd5b50600160a060020a03813516906020013561056b565b604080519115158252519081900360200190f35b610252610582565b60408051918252519081900360200190f35b6102366004803603602081101561027a57600080fd5b5035600160a060020a0316610588565b610236600480360360608110156102a057600080fd5b50600160a060020a038135811691602081013590911690604001356105a6565b6102c86105fd565b6040805160ff9092168252519081900360200190f35b610236600480360360408110156102f457600080fd5b50600160a060020a038135169060200135610606565b6103366004803603604081101561032057600080fd5b50600160a060020a038135169060200135610642565b005b61025261072f565b6102526004803603602081101561035657600080fd5b5035600160a060020a0316610735565b610195610750565b61013d6107b1565b6103366004803603604081101561038c57600080fd5b50600160a060020a038135169060200135610812565b610236600480360360408110156103b857600080fd5b50600160a060020a0381351690602001356108fb565b610236600480360360408110156103e457600080fd5b50600160a060020a038135169060200135610937565b610402610944565b60408051600160a060020a039092168252519081900360200190f35b6104026004803603602081101561043457600080fd5b5035610953565b6102526004803603604081101561045157600080fd5b50600160a060020a038135811691602001351661097a565b6102526004803603602081101561047f57600080fd5b50356109a5565b606060088054806020026020016040519081016040528092919081815260200182805480156104d457602002820191906000526020600020905b8154815260200190600101908083116104c0575b5050505050905090565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104d45780601f1061053f576101008083540402835291602001916104d4565b820191906000526020600020905b81548152906001019060200180831161054d57509395945050505050565b60006105783384846109c3565b5060015b92915050565b60025490565b600160a060020a031660009081526009602052604090205460ff1690565b60006105b3848484610a4b565b600160a060020a0384166000908152600160209081526040808320338085529252909120546105f39186916105ee908663ffffffff610b1616565b6109c3565b5060019392505050565b60055460ff1690565b336000818152600160209081526040808320600160a060020a038716845290915281205490916105789185906105ee908663ffffffff610b2b16565b600a60009054906101000a9004600160a060020a0316600160a060020a031663f2f4eb266040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561069557600080fd5b505af11580156106a9573d6000803e3d6000fd5b505050506040513d60208110156106bf57600080fd5b5051600160a060020a03163314610721576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610d1c6022913960400191505060405180910390fd5b61072b8282610b44565b5050565b60065481565b600160a060020a031660009081526020819052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104d45780601f1061053f576101008083540402835291602001916104d4565b606060078054806020026020016040519081016040528092919081815260200182805480156104d457602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116107eb575050505050905090565b600a60009054906101000a9004600160a060020a0316600160a060020a031663f2f4eb266040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561086557600080fd5b505af1158015610879573d6000803e3d6000fd5b505050506040513d602081101561088f57600080fd5b5051600160a060020a031633146108f1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610cfa6022913960400191505060405180910390fd5b61072b8282610bec565b336000818152600160209081526040808320600160a060020a038716845290915281205490916105789185906105ee908663ffffffff610b1616565b6000610578338484610a4b565b600a54600160a060020a031681565b6007818154811061096057fe5b600091825260209091200154600160a060020a0316905081565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b600881815481106109b257fe5b600091825260209091200154905081565b600160a060020a0382166109d657600080fd5b600160a060020a0383166109e957600080fd5b600160a060020a03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600160a060020a038216610a5e57600080fd5b600160a060020a038316600090815260208190526040902054610a87908263ffffffff610b1616565b600160a060020a038085166000908152602081905260408082209390935590841681522054610abc908263ffffffff610b2b16565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082821115610b2557600080fd5b50900390565b600082820183811015610b3d57600080fd5b9392505050565b600160a060020a038216610b5757600080fd5b600254610b6a908263ffffffff610b2b16565b600255600160a060020a038216600090815260208190526040902054610b96908263ffffffff610b2b16565b600160a060020a0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600160a060020a038216610bff57600080fd5b600254610c12908263ffffffff610b1616565b600255600160a060020a038216600090815260208190526040902054610c3e908263ffffffff610b1616565b600160a060020a038316600081815260208181526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35050565b6000808311610ca157600080fd5b600160005b83811015610cca5781610cbf818763ffffffff610cd216565b925050600101610ca6565b509392505050565b600082610ce15750600061057c565b82820282848281610cee57fe5b0414610b3d57600080fdfe536574546f6b656e2e6275726e3a2053656e646572206d75737420626520636f7265536574546f6b656e2e6d696e743a2053656e646572206d75737420626520636f7265a165627a7a723058209bbec0486907d15e401abc5be646dd467c071b1a41ab735871e18498efc0722c0029

Libraries Used


Deployed Bytecode Sourcemap

19109:6489:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;19109:6489:0;;;;;;;;-1:-1:-1;;;19109:6489:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25063:124;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;25063:124:0;;;;;;;;;;;;;;;;;1552:83;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1552:83:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6751:148;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;6751:148:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;4904:91;;;:::i;:::-;;;;;;;;;;;;;;;;25419:176;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;25419:176:0;-1:-1:-1;;;;;25419:176:0;;:::i;7372:228::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;7372:228:0;;;;;;;;;;;;;;;;;:::i;1868:83::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;8126:203;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;8126:203:0;;;;;;;;:::i;23738:327::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;23738:327:0;;;;;;;;:::i;:::-;;19259:26;;;:::i;5214:106::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;5214:106:0;-1:-1:-1;;;;;5214:106:0;;:::i;1702:87::-;;;:::i;24803:134::-;;;:::i;24328:323::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;24328:323:0;;;;;;;;:::i;8860:213::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;8860:213:0;;;;;;;;:::i;5964:140::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;5964:140:0;;;;;;;;:::i;19525:22::-;;;:::i;:::-;;;;-1:-1:-1;;;;;19525:22:0;;;;;;;;;;;;;;19292:27;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;19292:27:0;;:::i;5659:131::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;5659:131:0;;;;;;;;;;:::i;19326:22::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;19326:22:0;;:::i;25063:124::-;25133:16;25174:5;25167:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25063:124;:::o;1552:83::-;1622:5;1615:12;;;;;;;;-1:-1:-1;;1615:12:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1589:13;;1615:12;;1622:5;;1615:12;;1622:5;1615:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1615:12:0;;1552:83;-1:-1:-1;;;;;1552:83:0:o;6751:148::-;6816:4;6833:36;6842:10;6854:7;6863:5;6833:8;:36::i;:::-;-1:-1:-1;6887:4:0;6751:148;;;;;:::o;4904:91::-;4975:12;;4904:91;:::o;25419:176::-;-1:-1:-1;;;;;25561:26:0;25532:4;25561:26;;;:11;:26;;;;;;;;;25419:176::o;7372:228::-;7451:4;7468:26;7478:4;7484:2;7488:5;7468:9;:26::i;:::-;-1:-1:-1;;;;;7532:14:0;;;;;;:8;:14;;;;;;;;7520:10;7532:26;;;;;;;;;7505:65;;7514:4;;7532:37;;7563:5;7532:37;:30;:37;:::i;:::-;7505:8;:65::i;:::-;-1:-1:-1;7588:4:0;7372:228;;;;;:::o;1868:83::-;1934:9;;;;1868:83;:::o;8126:203::-;8232:10;8206:4;8253:20;;;:8;:20;;;;;;;;-1:-1:-1;;;;;8253:29:0;;;;;;;;;;8206:4;;8223:76;;8244:7;;8253:45;;8287:10;8253:45;:33;:45;:::i;23738:327::-;23942:7;;;;;;;;;-1:-1:-1;;;;;23942:7:0;-1:-1:-1;;;;;23930:25:0;;:27;;;;;-1:-1:-1;;;23930:27:0;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;23930:27:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;23930:27:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;23930:27:0;-1:-1:-1;;;;;23916:41:0;:10;:41;23894:125;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24032:25;24038:7;24047:9;24032:5;:25::i;:::-;23738:327;;:::o;19259:26::-;;;;:::o;5214:106::-;-1:-1:-1;;;;;5296:16:0;5269:7;5296:16;;;;;;;;;;;;5214:106::o;1702:87::-;1774:7;1767:14;;;;;;;;-1:-1:-1;;1767:14:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1741:13;;1767:14;;1774:7;;1767:14;;1774:7;1767:14;;;;;;;;;;;;;;;;;;;;;;;;24803:134;24878:16;24919:10;24912:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;24912:17:0;;;;;;;;;;;;;;;;;;;;;;24803:134;:::o;24328:323::-;24530:7;;;;;;;;;-1:-1:-1;;;;;24530:7:0;-1:-1:-1;;;;;24518:25:0;;:27;;;;;-1:-1:-1;;;24518:27:0;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;24518:27:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;24518:27:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;24518:27:0;-1:-1:-1;;;;;24504:41:0;:10;:41;24482:125;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24620:23;24626:5;24633:9;24620:5;:23::i;8860:213::-;8971:10;8945:4;8992:20;;;:8;:20;;;;;;;;-1:-1:-1;;;;;8992:29:0;;;;;;;;;;8945:4;;8962:81;;8983:7;;8992:50;;9026:15;8992:50;:33;:50;:::i;5964:140::-;6025:4;6042:32;6052:10;6064:2;6068:5;6042:9;:32::i;19525:22::-;;;-1:-1:-1;;;;;19525:22:0;;:::o;19292:27::-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;19292:27:0;;-1:-1:-1;19292:27:0;:::o;5659:131::-;-1:-1:-1;;;;;5758:15:0;;;5731:7;5758:15;;;:8;:15;;;;;;;;:24;;;;;;;;;;;;;5659:131::o;19326:22::-;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19326:22:0;:::o;10959:254::-;-1:-1:-1;;;;;11052:21:0;;11044:30;;;;;;-1:-1:-1;;;;;11093:19:0;;11085:28;;;;;;-1:-1:-1;;;;;11126:15:0;;;;;;;:8;:15;;;;;;;;:24;;;;;;;;;;;;;:32;;;11174:31;;;;;;;;;;;;;;;;;10959:254;;;:::o;9300:262::-;-1:-1:-1;;;;;9388:16:0;;9380:25;;;;;;-1:-1:-1;;;;;9436:15:0;;:9;:15;;;;;;;;;;;:26;;9456:5;9436:26;:19;:26;:::i;:::-;-1:-1:-1;;;;;9418:15:0;;;:9;:15;;;;;;;;;;;:44;;;;9489:13;;;;;;;:24;;9507:5;9489:24;:17;:24;:::i;:::-;-1:-1:-1;;;;;9473:13:0;;;:9;:13;;;;;;;;;;;;:40;;;;9529:25;;;;;;;9473:13;;9529:25;;;;;;;;;;;;;9300:262;;;:::o;3270:150::-;3328:7;3361:1;3356;:6;;3348:15;;;;;;-1:-1:-1;3386:5:0;;;3270:150::o;3508:::-;3566:7;3598:5;;;3622:6;;;;3614:15;;;;;;3649:1;3508:150;-1:-1:-1;;;3508:150:0:o;9914:269::-;-1:-1:-1;;;;;9989:21:0;;9981:30;;;;;;10039:12;;:23;;10056:5;10039:23;:16;:23;:::i;:::-;10024:12;:38;-1:-1:-1;;;;;10094:18:0;;:9;:18;;;;;;;;;;;:29;;10117:5;10094:29;:22;:29;:::i;:::-;-1:-1:-1;;;;;10073:18:0;;:9;:18;;;;;;;;;;;:50;;;;10139:36;;;;;;;10073:18;;:9;;10139:36;;;;;;;;;;9914:269;;:::o;10417:::-;-1:-1:-1;;;;;10492:21:0;;10484:30;;;;;;10542:12;;:23;;10559:5;10542:23;:16;:23;:::i;:::-;10527:12;:38;-1:-1:-1;;;;;10597:18:0;;:9;:18;;;;;;;;;;;:29;;10620:5;10597:29;:22;:29;:::i;:::-;-1:-1:-1;;;;;10576:18:0;;:9;:18;;;;;;;;;;;:50;;;;10642:36;;;;;;;10576:9;;10642:36;;;;;;;;;;;10417:269;;:::o;14534:435::-;14652:7;14689:1;14685;:5;14677:14;;;;;;14721:1;14704:14;14733:203;14757:3;14753:1;:7;14733:203;;;14806:6;14903:21;14806:6;14922:1;14903:21;:18;:21;:::i;:::-;14894:30;-1:-1:-1;;14762:3:0;;14733:203;;;-1:-1:-1;14955:6:0;14534:435;-1:-1:-1;;;14534:435:0:o;2261:433::-;2319:7;2563:6;2559:47;;-1:-1:-1;2593:1:0;2586:8;;2559:47;2630:5;;;2634:1;2630;:5;:1;2654:5;;;;;:10;2646:19;;;;

Swarm Source

bzzr://9bbec0486907d15e401abc5be646dd467c071b1a41ab735871e18498efc0722c

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.