ETH Price: $3,392.26 (+1.57%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

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

Contract Name:
SyntheticTokenV1

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 8 : SyntheticTokenV1.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;

import {IERC20} from "../token/IERC20.sol";

import {SafeMath} from "../lib/SafeMath.sol";
import {Amount} from "../lib/Amount.sol";

import {SyntheticStorage} from "./SyntheticStorage.sol";

import {Adminable} from "../lib/Adminable.sol";

contract SyntheticTokenV1 is Adminable, SyntheticStorage, IERC20 {

    using SafeMath for uint256;
    using Amount for Amount.Principal;

    /* ========== Events ========== */

    event MinterAdded(address _minter, uint256 _limit);

    event MinterRemoved(address _minter);

    event MinterLimitUpdated(address _minter, uint256 _limit);

    event InitCalled();

    /* ========== Modifiers ========== */

    modifier onlyMinter() {
        require(
            _minters[msg.sender] == true,
            "SyntheticToken: only callable by minter"
        );
        _;
    }

    /* ========== Init Function ========== */

    /**
     * @dev Initialise the synthetic token
     *
     * @param name The name of the token
     * @param symbol The symbol of the token
     * @param version The version number of this token
     */
    function init(
        string memory name,
        string memory symbol,
        string memory version
    )
        public
        onlyAdmin
    {
        _name = name;
        _symbol = symbol;
        _version = version;

        DOMAIN_SEPARATOR = initDomainSeparator(name, version);

        emit InitCalled();
    }

    /* ========== View Functions ========== */

    function name()
        external
        view
        returns (string memory)
    {
        return _name;
    }

    function symbol()
        external
        view
        returns (string memory)
    {
        return _symbol;
    }

    function decimals()
        external
        pure
        returns (uint8)
    {
        return 18;
    }

    function version()
        external
        view
        returns (string memory)
    {
        return _version;
    }

    function totalSupply()
        public
        view
        returns (uint256)
    {
        return _totalSupply;
    }

    function balanceOf(
        address account
    )
        public
        view
        returns (uint256)
    {
        return _balances[account];
    }

    function allowance(
        address owner,
        address spender
    )
        public
        view
        returns (uint256)
    {
        return _allowances[owner][spender];
    }

    function getAllMinters()
        external
        view
        returns (address[] memory)
    {
        return _mintersArray;
    }

    function isValidMinter(
        address _minter
    )
        external
        view
        returns (bool)
    {
        return _minters[_minter];
    }

    function getMinterIssued(
        address _minter
    )
        external
        view
        returns (Amount.Principal memory)
    {
        return _minterIssued[_minter];
    }

    function getMinterLimit(
        address _minter
    )
        external
        view
        returns (uint256)
    {
        return _minterLimits[_minter];
    }

    /* ========== Admin Functions ========== */

    /**
     * @dev Add a new minter to the synthetic token.
     *
     * @param _minter The address of the minter to add
     * @param _limit The starting limit for how much this synth can mint
     */
    function addMinter(
        address _minter,
        uint256 _limit
    )
        external
        onlyAdmin
    {
        require(
            _minters[_minter] != true,
            "SyntheticToken: Minter already exists"
        );

        _mintersArray.push(_minter);
        _minters[_minter] = true;
        _minterLimits[_minter] = _limit;

        emit MinterAdded(_minter, _limit);
    }

    /**
     * @dev Remove a minter from the synthetic token
     *
     * @param _minter Address to remove the minter
     */
    function removeMinter(
        address _minter
    )
        external
        onlyAdmin
    {
        require(
            _minters[_minter] == true,
            "SyntheticToken: minter does not exist"
        );

        for (uint i = 0; i < _mintersArray.length; i++) {
            if (address(_mintersArray[i]) == _minter) {
                delete _mintersArray[i];
                _mintersArray[i] = _mintersArray[_mintersArray.length - 1];
                _mintersArray.length--;

                break;
            }
        }

        delete _minters[_minter];
        delete _minterLimits[_minter];

        emit MinterRemoved(_minter);
    }

    /**
     * @dev Update the limit of the minter
     *
     * @param _minter The address of the minter to set
     * @param _limit The new limit to set for this address
     */
    function updateMinterLimit(
        address _minter,
        uint256 _limit
    )
        public
        onlyAdmin
    {
        require(
            _minters[_minter] == true,
            "SyntheticToken: minter does not exist"
        );

        _minterLimits[_minter] = _limit;

        emit MinterLimitUpdated(_minter, _limit);
    }

    /* ========== Minter Functions ========== */

    /**
     * @dev Mint synthetic tokens
     *
     * @notice Can only be called by a valid minter.
     *
     * @param to The destination to mint the synth to
     * @param value The amount of synths to mint
     */
    function mint(
        address to,
        uint256 value
    )
        external
        onlyMinter
    {
        Amount.Principal memory issuedAmount = _minterIssued[msg.sender].add(
            Amount.Principal({ sign: true, value: value })
        );

        require(
            issuedAmount.value <= _minterLimits[msg.sender] || issuedAmount.sign == false,
            "SyntheticToken: minter limit reached"
        );

        _minterIssued[msg.sender] = issuedAmount;
        _mint(to, value);
    }

    /**
     * @dev Burn synthetic tokens
     *
     * @notice Can only be called by a valid minter.
     *
     * @param from The destination to burn the synth from
     * @param value The amount of the synth to burn
     */
    function burn(
        address from,
        uint256 value
    )
        external
        onlyMinter
    {
        _minterIssued[msg.sender] = _minterIssued[msg.sender].sub(
            Amount.Principal({ sign: true, value: value })
        );

        _burn(from, value);
    }

    /**
     * @dev Transfer any collateral held to another address
     *
     * @param token The address of the token to transfer
     * @param to The destination to send the collateral to
     * @param value The amount of the tokens to transfer
     */
    function transferCollateral(
        address token,
        address to,
        uint256 value
    )
        external
        onlyMinter
        returns (bool)
    {
        return IERC20(token).transfer(
            to,
            value
        );
    }

    /* ========== ERC20 Functions ========== */

    function transfer(
        address recipient,
        uint256 amount
    )
        public
        returns (bool)
    {
        _transfer(msg.sender, recipient, amount);
        return true;
    }

    function approve(
        address spender,
        uint256 amount
    )
        public
        returns (bool)
    {
        _approve(msg.sender, spender, amount);
        return true;
    }

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    )
        public
        returns (bool)
    {
        _transfer(sender, recipient, amount);
        _approve(
            sender,
            msg.sender,
            _allowances[sender][msg.sender].sub(amount)
        );

        return true;
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over `owner`'s tokens,
     * assuming the latter's signed approval.
     *
     * IMPORTANT: The same issues Erc20 `approve` has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the Eip712-formatted function arguments.
     * - The signature must use `owner`'s current nonce.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8   v,
        bytes32 r,
        bytes32 s
    )
        public
    {

        require(
            deadline == 0 || deadline >= block.timestamp,
            "SyntheticToken: Permit expired"
        );

        require(
            spender != address(0),
            "SyntheticToken: spender cannot be 0x0"
        );

        require(
            value > 0,
            "SyntheticToken: approval value must be greater than 0"
        );

        bytes32 digest = keccak256(
            abi.encodePacked(
                "\x19\x01",
                DOMAIN_SEPARATOR,
                keccak256(
                    abi.encode(
                    PERMIT_TYPEHASH,
                    owner,
                    spender,
                    value,
                    permitNonces[owner]++,
                    deadline
                )
            )
        ));

        address recoveredAddress = ecrecover(
            digest,
            v,
            r,
            s
        );

        require(
            recoveredAddress != address(0) && owner == recoveredAddress,
            "SyntheticToken: Signature invalid"
        );

    }

    /* ========== Internal Functions ========== */

    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    )
        internal
    {
        require(
            sender != address(0),
            "SyntheticToken: transfer from the zero address"
        );

        require(
            recipient != address(0),
            "SyntheticToken: transfer to the zero address"
        );

        _balances[sender] = _balances[sender].sub(amount);

        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    function _mint(
        address account,
        uint256 amount
    )
        internal
    {
        require(
            account != address(0),
            "SyntheticToken: mint to the zero address"
        );

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

    function _burn(
        address account,
        uint256 amount
    )
        internal
    {
        require(
            account != address(0),
            "SyntheticToken: burn from the zero address"
        );

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

    function _approve(
        address owner,
        address spender,
        uint256 amount
    )
        internal
    {
        require(
            owner != address(0),
            "SyntheticToken: approve from the zero address"
        );

        require(
            spender != address(0),
            "SyntheticToken: approve to the zero address"
        );

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /* ========== Private Functions ========== */

    /**
     * @dev Initializes EIP712 DOMAIN_SEPARATOR based on the current contract and chain ID.
     */
    function initDomainSeparator(
        string memory name,
        string memory version
    )
        private
        returns (bytes32)
    {
        uint256 chainID;
        /* solium-disable-next-line */
        assembly {
            chainID := chainid()
        }

        return keccak256(
            abi.encode(
                keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                keccak256(bytes(name)),
                keccak256(bytes(version)),
                chainID,
                address(this)
            )
        );
    }
}

File 2 of 8 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.5.16;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(
        address recipient,
        uint256 amount
    )
        external
        returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(
        address owner,
        address spender
    )
        external
        view
        returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: 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
     *
     * Emits an {Approval} event.
     */
    function approve(
        address spender,
        uint256 amount
    )
        external
        returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    )
        external
        returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(
        address indexed from,
        address indexed to,
        uint256 value
    );

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
}

File 3 of 8 : SafeMath.sol
pragma solidity ^0.5.16;

library SafeMath {
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {

        require(b > 0, "SafeMath: division by zero");
        uint256 c = a / b;

        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        uint256 c = a - b;

        return c;
    }

    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }
}

File 4 of 8 : Amount.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;

import {SafeMath} from "../lib/SafeMath.sol";
import {Math} from "../lib/Math.sol";

library Amount {

    using Math for uint256;
    using SafeMath for uint256;

    // ============ Constants ============

    uint256 constant BASE = 10**18;

    // A Principal Amount is an amount that's been adjusted by an index

    struct Principal {
        bool sign; // true if positive
        uint256 value;
    }

    function zero()
        internal
        pure
        returns (Principal memory)
    {
        return Principal({
            sign: false,
            value: 0
        });
    }

    function sub(
        Principal memory a,
        Principal memory b
    )
        internal
        pure
        returns (Principal memory)
    {
        return add(a, negative(b));
    }

    function add(
        Principal memory a,
        Principal memory b
    )
        internal
        pure
        returns (Principal memory)
    {
        Principal memory result;

        if (a.sign == b.sign) {
            result.sign = a.sign;
            result.value = SafeMath.add(a.value, b.value);
        } else {
            if (a.value >= b.value) {
                result.sign = a.sign;
                result.value = SafeMath.sub(a.value, b.value);
            } else {
                result.sign = b.sign;
                result.value = SafeMath.sub(b.value, a.value);
            }
        }
        return result;
    }

    function equals(
        Principal memory a,
        Principal memory b
    )
        internal
        pure
        returns (bool)
    {
        if (a.value == b.value) {
            if (a.value == 0) {
                return true;
            }
            return a.sign == b.sign;
        }
        return false;
    }

    function negative(
        Principal memory a
    )
        internal
        pure
        returns (Principal memory)
    {
        return Principal({
            sign: !a.sign,
            value: a.value
        });
    }

    function calculateAdjusted(
        Principal memory a,
        uint256 index
    )
        internal
        pure
        returns (uint256)
    {
        return Math.getPartial(a.value, index, BASE);
    }

    function calculatePrincipal(
        uint256 value,
        uint256 index,
        bool sign
    )
        internal
        pure
        returns (Principal memory)
    {
        return Principal({
            sign: sign,
            value: Math.getPartial(value, BASE, index)
        });
    }

}

File 5 of 8 : Math.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;

import {SafeMath} from "./SafeMath.sol";

/**
 * @title Math
 *
 * Library for non-standard Math functions
 */
library Math {
    using SafeMath for uint256;

    // ============ Library Functions ============

    /*
     * Return target * (numerator / denominator).
     */
    function getPartial(
        uint256 target,
        uint256 numerator,
        uint256 denominator
    )
        internal
        pure
        returns (uint256)
    {
        return target.mul(numerator).div(denominator);
    }

    function to128(
        uint256 number
    )
        internal
        pure
        returns (uint128)
    {
        uint128 result = uint128(number);
        require(
            result == number,
            "Math: Unsafe cast to uint128"
        );
        return result;
    }

    function min(
        uint256 a,
        uint256 b
    )
        internal
        pure
        returns (uint256)
    {
        return a < b ? a : b;
    }

    function max(
        uint256 a,
        uint256 b
    )
        internal
        pure
        returns (uint256)
    {
        return a > b ? a : b;
    }
}

File 6 of 8 : SyntheticStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;

import {Amount} from "../lib/Amount.sol";

contract SyntheticStorageV1 {

    /* solium-disable-next-line */
    bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;

    /**
     * @dev ERC20 Properties
     */
    string  internal _name;
    string  internal _symbol;
    uint256 internal _totalSupply;
    string  internal _version;

    mapping (address => uint256)                      internal _balances;
    mapping (address => mapping (address => uint256)) internal _allowances;

    /**
     * @dev Permittable Properties
     */
    bytes32                      public DOMAIN_SEPARATOR;
    mapping (address => uint256) public permitNonces;

    /**
     * @dev Minter Properties
     */
    address[]                            internal _mintersArray;
    mapping(address => bool)             internal _minters;
    mapping(address => uint256)          internal _minterLimits;
    mapping(address => Amount.Principal) internal _minterIssued;
}

contract SyntheticStorage is SyntheticStorageV1 { /* solium-disable-line no-empty-blocks */ }

File 7 of 8 : Adminable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;

import { Storage } from "./Storage.sol";

/**
 * @title Adminable
 * @author dYdX
 *
 * @dev EIP-1967 Proxy Admin contract.
 */
contract Adminable {
    /**
     * @dev Storage slot with the admin of the contract.
     *  This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1.
     */
    bytes32 internal constant ADMIN_SLOT =
    0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    /**
    * @dev Modifier to check whether the `msg.sender` is the admin.
    *  If it is, it will run the function. Otherwise, it will revert.
    */
    modifier onlyAdmin() {
        require(
            msg.sender == getAdmin(),
            "Adminable: caller is not admin"
        );
        _;
    }

    /**
     * @return The EIP-1967 proxy admin
     */
    function getAdmin()
        public
        view
        returns (address)
    {
        return address(uint160(uint256(Storage.load(ADMIN_SLOT))));
    }
}

File 8 of 8 : Storage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;

library Storage {

    /**
     * @dev Performs an SLOAD and returns the data in the slot.
     */
    function load(
        bytes32 slot
    )
        internal
        view
        returns (bytes32)
    {
        bytes32 result;
        /* solium-disable-next-line security/no-inline-assembly */
        assembly {
            result := sload(slot)
        }
        return result;
    }

    /**
     * @dev Performs an SSTORE to save the value to the slot.
     */
    function store(
        bytes32 slot,
        bytes32 value
    )
        internal
    {
        /* solium-disable-next-line security/no-inline-assembly */
        assembly {
            sstore(slot, value)
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[],"name":"InitCalled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"MinterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"MinterLimitUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_minter","type":"address"}],"name":"MinterRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_minter","type":"address"},{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"addMinter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"getAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAllMinters","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"getMinterIssued","outputs":[{"components":[{"internalType":"bool","name":"sign","type":"bool"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct Amount.Principal","name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"getMinterLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"version","type":"string"}],"name":"init","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"isValidMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"mint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"permitNonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"removeMinter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferCollateral","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_minter","type":"address"},{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"updateMinterLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061018e5760003560e01c806370a08231116100de578063a9059cbb11610097578063cb70ea6f11610071578063cb70ea6f1461032b578063cd60f59f1461034b578063d505accf1461035e578063dd62ed3e146103715761018e565b8063a9059cbb146102f2578063b67e9df714610305578063ca1f908c146103185761018e565b806370a0823114610289578063761248b41461029c57806383ba6b59146102af57806395d89b41146102c25780639dc29fac146102ca578063a045442c146102dd5761018e565b806330adf81f1161014b57806340c10f191161012557806340c10f191461024657806341e461a01461025957806354fd4d501461026c5780636e9960c3146102745761018e565b806330adf81f14610221578063313ce567146102295780633644e5151461023e5761018e565b806306fdde0314610193578063095ea7b3146101b157806318160ddd146101d1578063191d0ffc146101e657806323b872dd146101f95780633092afd51461020c575b600080fd5b61019b610384565b6040516101a89190611f5e565b60405180910390f35b6101c46101bf3660046116bc565b61041b565b6040516101a89190611e5e565b6101d9610432565b6040516101a89190611e6c565b6101d96101f436600461157b565b610438565b6101c46102073660046115d3565b61044a565b61021f61021a36600461157b565b6104a2565b005b6101d9610670565b610231610694565b6040516101a8919061208d565b6101d9610699565b61021f6102543660046116bc565b61069f565b61021f61026736600461170a565b6107a2565b61019b610851565b61027c6108b2565b6040516101a89190611e24565b6101d961029736600461157b565b6108e2565b61021f6102aa3660046116bc565b6108fd565b6101d96102bd36600461157b565b610a20565b61019b610a3b565b61021f6102d83660046116bc565b610a9b565b6102e5610b52565b6040516101a89190611e4d565b6101c46103003660046116bc565b610bb3565b6101c461031336600461157b565b610bc0565b61021f6103263660046116bc565b610bde565b61033e61033936600461157b565b610ca0565b6040516101a8919061207f565b6101c46103593660046115d3565b610ce0565b61021f61036c366004611620565b610d9c565b6101d961037f366004611599565b610f4f565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104105780601f106103e557610100808354040283529160200191610410565b820191906000526020600020905b8154815290600101906020018083116103f357829003601f168201915b505050505090505b90565b6000610428338484610f7a565b5060015b92915050565b60025490565b60076020526000908152604090205481565b600061045784848461102e565b6001600160a01b038416600090815260056020908152604080832033808552925290912054610497918691610492908663ffffffff61112a16565b610f7a565b5060015b9392505050565b6104aa6108b2565b6001600160a01b0316336001600160a01b0316146104e35760405162461bcd60e51b81526004016104da90611fbf565b60405180910390fd5b6001600160a01b03811660009081526009602052604090205460ff1615156001146105205760405162461bcd60e51b81526004016104da90611fff565b60005b60085481101561060757816001600160a01b03166008828154811061054457fe5b6000918252602090912001546001600160a01b031614156105ff576008818154811061056c57fe5b600091825260209091200180546001600160a01b031916905560088054600019810190811061059757fe5b600091825260209091200154600880546001600160a01b0390921691839081106105bd57fe5b600091825260209091200180546001600160a01b0319166001600160a01b039290921691909117905560088054906105f9906000198301611428565b50610607565b600101610523565b506001600160a01b0381166000908152600960209081526040808320805460ff19169055600a90915280822091909155517fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb6669290610665908390611e24565b60405180910390a150565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601290565b60065481565b3360009081526009602052604090205460ff1615156001146106d35760405162461bcd60e51b81526004016104da9061202f565b6106db61144c565b60408051808201825260018082526020808301869052336000908152600b82528490208451808601909552805460ff16151585529091015490830152610727919063ffffffff61115216565b336000908152600a60209081526040909120549082015191925010158061074d57508051155b6107695760405162461bcd60e51b81526004016104da9061200f565b336000908152600b602090815260409091208251815460ff19169015151781559082015160019091015561079d83836111e4565b505050565b6107aa6108b2565b6001600160a01b0316336001600160a01b0316146107da5760405162461bcd60e51b81526004016104da90611fbf565b82516107ed906000906020860190611463565b508151610801906001906020850190611463565b508051610815906003906020840190611463565b5061082083826112a4565b6006556040517fb23c63f0c6329c76654460081d0e472398de222eb135c8c94c8d259055a7d58890600090a1505050565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104105780601f106103e557610100808354040283529160200191610410565b60006108dd7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103611302565b905090565b6001600160a01b031660009081526004602052604090205490565b6109056108b2565b6001600160a01b0316336001600160a01b0316146109355760405162461bcd60e51b81526004016104da90611fbf565b6001600160a01b03821660009081526009602052604090205460ff161515600114156109735760405162461bcd60e51b81526004016104da90611fcf565b6008805460018082019092557ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b0385169081179091556000908152600960209081526040808320805460ff1916909417909355600a9052819020829055517f96c1d7caf640fe379bdec5a79548e10ba60accd05456f6505c11bc85a3a7b59d90610a149084908490611e32565b60405180910390a15050565b6001600160a01b03166000908152600a602052604090205490565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156104105780601f106103e557610100808354040283529160200191610410565b3360009081526009602052604090205460ff161515600114610acf5760405162461bcd60e51b81526004016104da9061202f565b60408051808201825260018082526020808301859052336000908152600b82528490208451808601909552805460ff16151585529091015490830152610b1b919063ffffffff61130616565b336000908152600b602090815260409091208251815460ff1916901515178155910151600190910155610b4e8282611320565b5050565b6060600880548060200260200160405190810160405280929190818152602001828054801561041057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b8c575050505050905090565b600061042833848461102e565b6001600160a01b031660009081526009602052604090205460ff1690565b610be66108b2565b6001600160a01b0316336001600160a01b031614610c165760405162461bcd60e51b81526004016104da90611fbf565b6001600160a01b03821660009081526009602052604090205460ff161515600114610c535760405162461bcd60e51b81526004016104da90611fff565b6001600160a01b0382166000908152600a602052604090819020829055517fb42794da95e8b03e4d501f15cb1325391cceb50ad6d6b0dcc76abe4bdaab610c90610a149084908490611e32565b610ca861144c565b506001600160a01b03166000908152600b60209081526040918290208251808401909352805460ff1615158352600101549082015290565b3360009081526009602052604081205460ff161515600114610d145760405162461bcd60e51b81526004016104da9061202f565b60405163a9059cbb60e01b81526001600160a01b0385169063a9059cbb90610d429086908690600401611e32565b602060405180830381600087803b158015610d5c57600080fd5b505af1158015610d70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610d9491908101906116ec565b949350505050565b831580610da95750428410155b610dc55760405162461bcd60e51b81526004016104da90611f8f565b6001600160a01b038616610deb5760405162461bcd60e51b81526004016104da90611fef565b60008511610e0b5760405162461bcd60e51b81526004016104da90611f7f565b6006546001600160a01b03881660009081526007602090815260408083208054600181019091559051929392610e6c927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928d928d928d92918d9101611e7a565b60405160208183030381529060405280519060200120604051602001610e93929190611de8565b604051602081830303815290604052805190602001209050600060018286868660405160008152602001604052604051610ed09493929190611f20565b6020604051602081039080840390855afa158015610ef2573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590610f285750806001600160a01b0316896001600160a01b0316145b610f445760405162461bcd60e51b81526004016104da90611fdf565b505050505050505050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b6001600160a01b038316610fa05760405162461bcd60e51b81526004016104da9061205f565b6001600160a01b038216610fc65760405162461bcd60e51b81526004016104da9061203f565b6001600160a01b0380841660008181526005602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590611021908590611e6c565b60405180910390a3505050565b6001600160a01b0383166110545760405162461bcd60e51b81526004016104da9061204f565b6001600160a01b03821661107a5760405162461bcd60e51b81526004016104da9061201f565b6001600160a01b0383166000908152600460205260409020546110a3908263ffffffff61112a16565b6001600160a01b0380851660009081526004602052604080822093909355908416815220546110d8908263ffffffff6113dc16565b6001600160a01b0380841660008181526004602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611021908590611e6c565b60008282111561114c5760405162461bcd60e51b81526004016104da90611faf565b50900390565b61115a61144c565b61116261144c565b8251845115159015151415611195578351151581526020808501519084015161118b91906113dc565b602082015261049b565b82602001518460200151106111be578351151581526020808501519084015161118b919061112a565b825115158152602080840151908501516111d8919061112a565b60208201529392505050565b6001600160a01b03821661120a5760405162461bcd60e51b81526004016104da9061206f565b60025461121d908263ffffffff6113dc16565b6002556001600160a01b038216600090815260046020526040902054611249908263ffffffff6113dc16565b6001600160a01b0383166000818152600460205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611298908590611e6c565b60405180910390a35050565b60405160009046906112b590611e19565b60405180910390208480519060200120848051906020012083306040516020016112e3959493929190611ed4565b6040516020818303038152906040528051906020012091505092915050565b5490565b61130e61144c565b61049b8361131b84611401565b611152565b6001600160a01b0382166113465760405162461bcd60e51b81526004016104da90611f6f565b6001600160a01b03821660009081526004602052604090205461136f908263ffffffff61112a16565b6001600160a01b03831660009081526004602052604090205560025461139b908263ffffffff61112a16565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611298908590611e6c565b60008282018381101561049b5760405162461bcd60e51b81526004016104da90611f9f565b61140961144c565b5060408051808201909152815115815260208083015190820152919050565b81548183558181111561079d5760008381526020902061079d9181019083016114e1565b604080518082019091526000808252602082015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106114a457805160ff19168380011785556114d1565b828001600101855582156114d1579182015b828111156114d15782518255916020019190600101906114b6565b506114dd9291506114e1565b5090565b61041891905b808211156114dd57600081556001016114e7565b803561042c81612166565b805161042c8161217d565b803561042c81612186565b600082601f83011261152d57600080fd5b813561154061153b826120c2565b61209b565b9150808252602083016020830185838301111561155c57600080fd5b611567838284612124565b50505092915050565b803561042c8161218f565b60006020828403121561158d57600080fd5b6000610d9484846114fb565b600080604083850312156115ac57600080fd5b60006115b885856114fb565b92505060206115c9858286016114fb565b9150509250929050565b6000806000606084860312156115e857600080fd5b60006115f486866114fb565b9350506020611605868287016114fb565b925050604061161686828701611511565b9150509250925092565b600080600080600080600060e0888a03121561163b57600080fd5b60006116478a8a6114fb565b97505060206116588a828b016114fb565b96505060406116698a828b01611511565b955050606061167a8a828b01611511565b945050608061168b8a828b01611570565b93505060a061169c8a828b01611511565b92505060c06116ad8a828b01611511565b91505092959891949750929550565b600080604083850312156116cf57600080fd5b60006116db85856114fb565b92505060206115c985828601611511565b6000602082840312156116fe57600080fd5b6000610d948484611506565b60008060006060848603121561171f57600080fd5b833567ffffffffffffffff81111561173657600080fd5b6117428682870161151c565b935050602084013567ffffffffffffffff81111561175f57600080fd5b61176b8682870161151c565b925050604084013567ffffffffffffffff81111561178857600080fd5b6116168682870161151c565b60006117a083836117a8565b505060200190565b6117b181612102565b82525050565b60006117c2826120f0565b6117cc81856120f4565b93506117d7836120ea565b8060005b838110156118055781516117ef8882611794565b97506117fa836120ea565b9250506001016117db565b509495945050505050565b6117b18161210d565b6117b181610418565b6117b161182e82610418565b610418565b600061183e826120f0565b61184881856120f4565b9350611858818560208601612130565b6118618161215c565b9093019392505050565b6000611878602a836120f4565b7f53796e746865746963546f6b656e3a206275726e2066726f6d20746865207a65815269726f206164647265737360b01b602082015260400192915050565b60006118c46035836120f4565b7f53796e746865746963546f6b656e3a20617070726f76616c2076616c7565206d81527407573742062652067726561746572207468616e203605c1b602082015260400192915050565b600061191b601e836120f4565b7f53796e746865746963546f6b656e3a205065726d697420657870697265640000815260200192915050565b60006119546002836120fd565b61190160f01b815260020192915050565b6000611972601b836120f4565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b60006119ab601e836120f4565b7f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815260200192915050565b60006119e4601e836120f4565b7f41646d696e61626c653a2063616c6c6572206973206e6f742061646d696e0000815260200192915050565b6000611a1d6025836120f4565b7f53796e746865746963546f6b656e3a204d696e74657220616c72656164792065815264786973747360d81b602082015260400192915050565b6000611a646021836120f4565b7f53796e746865746963546f6b656e3a205369676e617475726520696e76616c698152601960fa1b602082015260400192915050565b6000611aa76025836120f4565b7f53796e746865746963546f6b656e3a207370656e6465722063616e6e6f742062815264065203078360dc1b602082015260400192915050565b6000611aee6052836120fd565b7f454950373132446f6d61696e28737472696e67206e616d652c737472696e672081527f76657273696f6e2c75696e7432353620636861696e49642c6164647265737320602082015271766572696679696e67436f6e74726163742960701b604082015260520192915050565b6000611b686025836120f4565b7f53796e746865746963546f6b656e3a206d696e74657220646f6573206e6f7420815264195e1a5cdd60da1b602082015260400192915050565b6000611baf6024836120f4565b7f53796e746865746963546f6b656e3a206d696e746572206c696d69742072656181526318da195960e21b602082015260400192915050565b6000611bf5602c836120f4565b7f53796e746865746963546f6b656e3a207472616e7366657220746f207468652081526b7a65726f206164647265737360a01b602082015260400192915050565b6000611c436027836120f4565b7f53796e746865746963546f6b656e3a206f6e6c792063616c6c61626c652062798152661036b4b73a32b960c91b602082015260400192915050565b6000611c8c602b836120f4565b7f53796e746865746963546f6b656e3a20617070726f766520746f20746865207a81526a65726f206164647265737360a81b602082015260400192915050565b6000611cd9602e836120f4565b7f53796e746865746963546f6b656e3a207472616e736665722066726f6d20746881526d65207a65726f206164647265737360901b602082015260400192915050565b6000611d29602d836120f4565b7f53796e746865746963546f6b656e3a20617070726f76652066726f6d2074686581526c207a65726f206164647265737360981b602082015260400192915050565b6000611d786028836120f4565b7f53796e746865746963546f6b656e3a206d696e7420746f20746865207a65726f815267206164647265737360c01b602082015260400192915050565b80516040830190611dc68482611810565b506020820151611dd96020850182611819565b50505050565b6117b18161211e565b6000611df382611947565b9150611dff8285611822565b602082019150611e0f8284611822565b5060200192915050565b600061042c82611ae1565b6020810161042c82846117a8565b60408101611e4082856117a8565b61049b6020830184611819565b6020808252810161049b81846117b7565b6020810161042c8284611810565b6020810161042c8284611819565b60c08101611e888289611819565b611e9560208301886117a8565b611ea260408301876117a8565b611eaf6060830186611819565b611ebc6080830185611819565b611ec960a0830184611819565b979650505050505050565b60a08101611ee28288611819565b611eef6020830187611819565b611efc6040830186611819565b611f096060830185611819565b611f1660808301846117a8565b9695505050505050565b60808101611f2e8287611819565b611f3b6020830186611ddf565b611f486040830185611819565b611f556060830184611819565b95945050505050565b6020808252810161049b8184611833565b6020808252810161042c8161186b565b6020808252810161042c816118b7565b6020808252810161042c8161190e565b6020808252810161042c81611965565b6020808252810161042c8161199e565b6020808252810161042c816119d7565b6020808252810161042c81611a10565b6020808252810161042c81611a57565b6020808252810161042c81611a9a565b6020808252810161042c81611b5b565b6020808252810161042c81611ba2565b6020808252810161042c81611be8565b6020808252810161042c81611c36565b6020808252810161042c81611c7f565b6020808252810161042c81611ccc565b6020808252810161042c81611d1c565b6020808252810161042c81611d6b565b6040810161042c8284611db5565b6020810161042c8284611ddf565b60405181810167ffffffffffffffff811182821017156120ba57600080fd5b604052919050565b600067ffffffffffffffff8211156120d957600080fd5b506020601f91909101601f19160190565b60200190565b5190565b90815260200190565b919050565b600061042c82612112565b151590565b6001600160a01b031690565b60ff1690565b82818337506000910152565b60005b8381101561214b578181015183820152602001612133565b83811115611dd95750506000910152565b601f01601f191690565b61216f81612102565b811461217a57600080fd5b50565b61216f8161210d565b61216f81610418565b61216f8161211e56fea365627a7a723158209c378ee5d9e0fce4bbd603a35221211e300a7e0655dd89cd0f323a11a01cad986c6578706572696d656e74616cf564736f6c63430005100040

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

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.