ETH Price: $1,975.69 (-4.87%)

Contract

0xc670FFBfa21c37481FB4EF2eA2249B9B78D2B073
 

Overview

ETH Balance

0.132919830052802992 ETH

Eth Value

$262.61 (@ $1,975.69/ETH)

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Cancel Buy Token...187219362023-12-05 18:29:59821 days ago1701800999IN
0xc670FFBf...B78D2B073
0 ETH0.0031571481.13957194
Place Buy Token ...187219002023-12-05 18:22:47821 days ago1701800567IN
0xc670FFBf...B78D2B073
0.02814984 ETH0.0075745388.93848074
Place Buy Token ...187218902023-12-05 18:20:47821 days ago1701800447IN
0xc670FFBf...B78D2B073
0.00269983 ETH0.0077214490.66346073
Match Orders160555462022-11-26 17:07:111196 days ago1669482431IN
0xc670FFBf...B78D2B073
0 ETH0.001101249.68932991
Place Buy Token ...160554292022-11-26 16:43:471196 days ago1669481027IN
0xc670FFBf...B78D2B073
0.00028 ETH0.0009144110.73687814
Place Buy Token ...134659742021-10-22 7:02:491596 days ago1634886169IN
0xc670FFBf...B78D2B073
0.13022 ETH0.0070549259.12808476
Cancel Sell Toke...126629032021-06-19 5:24:091721 days ago1624080249IN
0xc670FFBf...B78D2B073
0 ETH0.0006946510
Match Multiple O...126627502021-06-19 4:46:571721 days ago1624078017IN
0xc670FFBf...B78D2B073
0 ETH0.0008798211
Place Buy Token ...126627472021-06-19 4:45:291721 days ago1624077929IN
0xc670FFBf...B78D2B073
0.00943692 ETH0.0013124711
Cancel Buy Token...116972542021-01-21 6:48:191870 days ago1611211699IN
0xc670FFBf...B78D2B073
0 ETH0.0011280643
Match Multiple O...116660972021-01-16 11:52:341875 days ago1610797954IN
0xc670FFBf...B78D2B073
0 ETH0.006565241
Place Buy Token ...116658152021-01-16 10:52:391875 days ago1610794359IN
0xc670FFBf...B78D2B073
3.92947 ETH0.0050368657.00000145
Match Multiple O...114036702020-12-07 5:06:181915 days ago1607317578IN
0xc670FFBf...B78D2B073
0 ETH0.0013091815.1
Match Multiple O...113988792020-12-06 11:27:431916 days ago1607254063IN
0xc670FFBf...B78D2B073
0 ETH0.0017167519.8
Match Multiple O...111455042020-10-28 13:51:491955 days ago1603893109IN
0xc670FFBf...B78D2B073
0 ETH0.0096600795
Match Multiple O...111452482020-10-28 12:55:541955 days ago1603889754IN
0xc670FFBf...B78D2B073
0 ETH0.0186447280
Place Buy Token ...110606202020-10-15 13:23:591968 days ago1602768239IN
0xc670FFBf...B78D2B073
6.28276 ETH0.0051517358.3
Match Multiple O...108816072020-09-17 19:24:311995 days ago1600370671IN
0xc670FFBf...B78D2B073
0 ETH0.03876708440
Place Buy Token ...108815932020-09-17 19:21:171995 days ago1600370477IN
0xc670FFBf...B78D2B073
4.55683 ETH0.04356443493
Match Multiple O...108815782020-09-17 19:17:481995 days ago1600370268IN
0xc670FFBf...B78D2B073
0 ETH0.03920939445
Place Buy Token ...108815762020-09-17 19:17:451995 days ago1600370265IN
0xc670FFBf...B78D2B073
12.59371 ETH0.04374117495
Match Multiple O...108815012020-09-17 19:01:271995 days ago1600369287IN
0xc670FFBf...B78D2B073
0 ETH0.02879021493
Match Multiple O...108811492020-09-17 17:44:591996 days ago1600364699IN
0xc670FFBf...B78D2B073
0 ETH0.02631288493
Match Multiple O...108807692020-09-17 16:22:411996 days ago1600359761IN
0xc670FFBf...B78D2B073
0 ETH0.0345245500
Place Buy Token ...108794682020-09-17 11:40:251996 days ago1600342825IN
0xc670FFBf...B78D2B073
74.08588 ETH0.051658500
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer187219362023-12-05 18:29:59821 days ago1701800999
0xc670FFBf...B78D2B073
0.02814984 ETH
Transfer160555462022-11-26 17:07:111196 days ago1669482431
0xc670FFBf...B78D2B073
0.00028 ETH
-126627502021-06-19 4:46:571721 days ago1624078017
0xc670FFBf...B78D2B073
0.00943692 ETH
-116972542021-01-21 6:48:191870 days ago1611211699
0xc670FFBf...B78D2B073
0.36622927 ETH
-116660972021-01-16 11:52:341875 days ago1610797954
0xc670FFBf...B78D2B073
3.56324072 ETH
-116660972021-01-16 11:52:341875 days ago1610797954
0xc670FFBf...B78D2B073
2.22160696 ETH
-114036702020-12-07 5:06:181915 days ago1607317578
0xc670FFBf...B78D2B073
0.00404644 ETH
-113988792020-12-06 11:27:431916 days ago1607254063
0xc670FFBf...B78D2B073
0.01885642 ETH
-111455042020-10-28 13:51:491955 days ago1603893109
0xc670FFBf...B78D2B073
4.03825016 ETH
-111452482020-10-28 12:55:541955 days ago1603889754
0xc670FFBf...B78D2B073
0.00436 ETH
-111452482020-10-28 12:55:541955 days ago1603889754
0xc670FFBf...B78D2B073
0.0000013 ETH
-111452482020-10-28 12:55:541955 days ago1603889754
0xc670FFBf...B78D2B073
0.0000029 ETH
-108816072020-09-17 19:24:311995 days ago1600370671
0xc670FFBf...B78D2B073
4.55683 ETH
-108815782020-09-17 19:17:481995 days ago1600370268
0xc670FFBf...B78D2B073
12.59371 ETH
-108815012020-09-17 19:01:271995 days ago1600369287
0xc670FFBf...B78D2B073
41.78308885 ETH
-108811492020-09-17 17:44:591996 days ago1600364699
0xc670FFBf...B78D2B073
32.30279114 ETH
-108807692020-09-17 16:22:411996 days ago1600359761
0xc670FFBf...B78D2B073
74.08588 ETH
-108598432020-09-14 11:33:531999 days ago1600083233
0xc670FFBf...B78D2B073
3.24576709 ETH
-108598302020-09-14 11:30:441999 days ago1600083044
0xc670FFBf...B78D2B073
17.49053 ETH
-108597892020-09-14 11:19:261999 days ago1600082366
0xc670FFBf...B78D2B073
8.11037869 ETH
-108340582020-09-10 12:38:592003 days ago1599741539
0xc670FFBf...B78D2B073
12.08237868 ETH
-108340582020-09-10 12:38:592003 days ago1599741539
0xc670FFBf...B78D2B073
43.53300414 ETH
-108340582020-09-10 12:38:592003 days ago1599741539
0xc670FFBf...B78D2B073
21.40984985 ETH
-108088922020-09-06 15:46:312007 days ago1599407191
0xc670FFBf...B78D2B073
21.32606347 ETH
-108074672020-09-06 10:36:312007 days ago1599388591
0xc670FFBf...B78D2B073
8.55779 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

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

Contract Source Code Verified (Exact Match)

Contract Name:
Exchange

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-11-14
*/

// File: contracts/generic/Restricted.sol

/*
    Generic contract to authorise calls to certain functions only from a given address.
    The address authorised must be a contract (multisig or not, depending on the permission), except for local test

    deployment works as:
           1. contract deployer account deploys contracts
           2. constructor grants "PermissionGranter" permission to deployer account
           3. deployer account executes initial setup (no multiSig)
           4. deployer account grants PermissionGranter permission for the MultiSig contract
                (e.g. StabilityBoardProxy or PreTokenProxy)
           5. deployer account revokes its own PermissionGranter permission
*/

pragma solidity 0.4.24;


contract Restricted {

    // NB: using bytes32 rather than the string type because it's cheaper gas-wise:
    mapping (address => mapping (bytes32 => bool)) public permissions;

    event PermissionGranted(address indexed agent, bytes32 grantedPermission);
    event PermissionRevoked(address indexed agent, bytes32 revokedPermission);

    modifier restrict(bytes32 requiredPermission) {
        require(permissions[msg.sender][requiredPermission], "msg.sender must have permission");
        _;
    }

    constructor(address permissionGranterContract) public {
        require(permissionGranterContract != address(0), "permissionGranterContract must be set");
        permissions[permissionGranterContract]["PermissionGranter"] = true;
        emit PermissionGranted(permissionGranterContract, "PermissionGranter");
    }

    function grantPermission(address agent, bytes32 requiredPermission) public {
        require(permissions[msg.sender]["PermissionGranter"],
            "msg.sender must have PermissionGranter permission");
        permissions[agent][requiredPermission] = true;
        emit PermissionGranted(agent, requiredPermission);
    }

    function grantMultiplePermissions(address agent, bytes32[] requiredPermissions) public {
        require(permissions[msg.sender]["PermissionGranter"],
            "msg.sender must have PermissionGranter permission");
        uint256 length = requiredPermissions.length;
        for (uint256 i = 0; i < length; i++) {
            grantPermission(agent, requiredPermissions[i]);
        }
    }

    function revokePermission(address agent, bytes32 requiredPermission) public {
        require(permissions[msg.sender]["PermissionGranter"],
            "msg.sender must have PermissionGranter permission");
        permissions[agent][requiredPermission] = false;
        emit PermissionRevoked(agent, requiredPermission);
    }

    function revokeMultiplePermissions(address agent, bytes32[] requiredPermissions) public {
        uint256 length = requiredPermissions.length;
        for (uint256 i = 0; i < length; i++) {
            revokePermission(agent, requiredPermissions[i]);
        }
    }

}

// File: contracts/generic/SafeMath.sol

/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error

    TODO: check against ds-math: https://blog.dapphub.com/ds-math/
    TODO: move roundedDiv to a sep lib? (eg. Math.sol)
    TODO: more unit tests!
*/
pragma solidity 0.4.24;


library SafeMath {
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a * b;
        require(a == 0 || c / a == b, "mul overflow");
        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "div by 0"); // Solidity automatically throws for div by 0 but require to emit reason
        uint256 c = a / b;
        // require(a == b * c + a % b); // There is no case in which this doesn't hold
        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "sub underflow");
        return a - b;
    }

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

    // Division, round to nearest integer, round half up
    function roundedDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "div by 0"); // Solidity automatically throws for div by 0 but require to emit reason
        uint256 halfB = (b % 2 == 0) ? (b / 2) : (b / 2 + 1);
        return (a % b >= halfB) ? (a / b + 1) : (a / b);
    }

    // Division, always rounds up
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "div by 0"); // Solidity automatically throws for div by 0 but require to emit reason
        return (a % b != 0) ? (a / b + 1) : (a / b);
    }

    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 ? b : a;
    }    
}

// File: contracts/Rates.sol

/*
 Generic symbol / WEI rates contract.
 only callable by trusted price oracles.
 Being regularly called by a price oracle
    TODO: trustless/decentrilezed price Oracle
    TODO: shall we use blockNumber instead of now for lastUpdated?
    TODO: consider if we need storing rates with variable decimals instead of fixed 4
    TODO: could we emit 1 RateChanged event from setMultipleRates (symbols and newrates arrays)?
*/
pragma solidity 0.4.24;




contract Rates is Restricted {
    using SafeMath for uint256;

    struct RateInfo {
        uint rate; // how much 1 WEI worth 1 unit , i.e. symbol/ETH rate
                    // 0 rate means no rate info available
        uint lastUpdated;
    }

    // mapping currency symbol => rate. all rates are stored with 2 decimals. i.e. EUR/ETH = 989.12 then rate = 98912
    mapping(bytes32 => RateInfo) public rates;

    event RateChanged(bytes32 symbol, uint newRate);

    constructor(address permissionGranterContract) public Restricted(permissionGranterContract) {} // solhint-disable-line no-empty-blocks

    function setRate(bytes32 symbol, uint newRate) external restrict("RatesFeeder") {
        rates[symbol] = RateInfo(newRate, now);
        emit RateChanged(symbol, newRate);
    }

    function setMultipleRates(bytes32[] symbols, uint[] newRates) external restrict("RatesFeeder") {
        require(symbols.length == newRates.length, "symobls and newRates lengths must be equal");
        for (uint256 i = 0; i < symbols.length; i++) {
            rates[symbols[i]] = RateInfo(newRates[i], now);
            emit RateChanged(symbols[i], newRates[i]);
        }
    }

    function convertFromWei(bytes32 bSymbol, uint weiValue) external view returns(uint value) {
        require(rates[bSymbol].rate > 0, "rates[bSymbol] must be > 0");
        return weiValue.mul(rates[bSymbol].rate).roundedDiv(1000000000000000000);
    }

    function convertToWei(bytes32 bSymbol, uint value) external view returns(uint weiValue) {
        // next line would revert with div by zero but require to emit reason
        require(rates[bSymbol].rate > 0, "rates[bSymbol] must be > 0");
        /* TODO: can we make this not loosing max scale? */
        return value.mul(1000000000000000000).roundedDiv(rates[bSymbol].rate);
    }

}

// File: contracts/interfaces/TransferFeeInterface.sol

/*
 *  transfer fee calculation interface
 *
 */
pragma solidity 0.4.24;


interface TransferFeeInterface {
    function calculateTransferFee(address from, address to, uint amount) external view returns (uint256 fee);
}

// File: contracts/interfaces/ERC20Interface.sol

/*
 * ERC20 interface
 * see https://github.com/ethereum/EIPs/issues/20
 */
pragma solidity 0.4.24;


interface ERC20Interface {
    event Approval(address indexed _owner, address indexed _spender, uint _value);
    event Transfer(address indexed from, address indexed to, uint amount);

    function transfer(address to, uint value) external returns (bool); // solhint-disable-line no-simple-event-func-name
    function transferFrom(address from, address to, uint value) external returns (bool);
    function approve(address spender, uint value) external returns (bool);
    function balanceOf(address who) external view returns (uint);
    function allowance(address _owner, address _spender) external view returns (uint remaining);

}

// File: contracts/interfaces/TokenReceiver.sol

/*
 *  receiver contract interface
 * see https://github.com/ethereum/EIPs/issues/677
 */
pragma solidity 0.4.24;


interface TokenReceiver {
    function transferNotification(address from, uint256 amount, uint data) external;
}

// File: contracts/interfaces/AugmintTokenInterface.sol

/* Augmint Token interface (abstract contract)

TODO: overload transfer() & transferFrom() instead of transferWithNarrative() & transferFromWithNarrative()
      when this fix available in web3& truffle also uses that web3: https://github.com/ethereum/web3.js/pull/1185
TODO: shall we use bytes for narrative?
 */
pragma solidity 0.4.24;







contract AugmintTokenInterface is Restricted, ERC20Interface {
    using SafeMath for uint256;

    string public name;
    string public symbol;
    bytes32 public peggedSymbol;
    uint8 public decimals;

    uint public totalSupply;
    mapping(address => uint256) public balances; // Balances for each account
    mapping(address => mapping (address => uint256)) public allowed; // allowances added with approve()

    TransferFeeInterface public feeAccount;
    mapping(bytes32 => bool) public delegatedTxHashesUsed; // record txHashes used by delegatedTransfer

    event TransferFeesChanged(uint transferFeePt, uint transferFeeMin, uint transferFeeMax);
    event Transfer(address indexed from, address indexed to, uint amount);
    event AugmintTransfer(address indexed from, address indexed to, uint amount, string narrative, uint fee);
    event TokenIssued(uint amount);
    event TokenBurned(uint amount);
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);

    function transfer(address to, uint value) external returns (bool); // solhint-disable-line no-simple-event-func-name
    function transferFrom(address from, address to, uint value) external returns (bool);
    function approve(address spender, uint value) external returns (bool);

    function delegatedTransfer(address from, address to, uint amount, string narrative,
                                    uint maxExecutorFeeInToken, /* client provided max fee for executing the tx */
                                    bytes32 nonce, /* random nonce generated by client */
                                    /* ^^^^ end of signed data ^^^^ */
                                    bytes signature,
                                    uint requestedExecutorFeeInToken /* the executor can decide to request lower fee */
                                ) external;

    function delegatedTransferAndNotify(address from, TokenReceiver target, uint amount, uint data,
                                    uint maxExecutorFeeInToken, /* client provided max fee for executing the tx */
                                    bytes32 nonce, /* random nonce generated by client */
                                    /* ^^^^ end of signed data ^^^^ */
                                    bytes signature,
                                    uint requestedExecutorFeeInToken /* the executor can decide to request lower fee */
                                ) external;

    function increaseApproval(address spender, uint addedValue) external;
    function decreaseApproval(address spender, uint subtractedValue) external;

    function issueTo(address to, uint amount) external; // restrict it to "MonetarySupervisor" in impl.;
    function burn(uint amount) external;

    function transferAndNotify(TokenReceiver target, uint amount, uint data) external;

    function transferWithNarrative(address to, uint256 amount, string narrative) external;
    function transferFromWithNarrative(address from, address to, uint256 amount, string narrative) external;

    function setName(string _name) external;
    function setSymbol(string _symbol) external;

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

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


}

// File: contracts/Exchange.sol

/* Augmint's Internal Exchange

  For flows see: https://github.com/Augmint/augmint-contracts/blob/master/docs/exchangeFlow.png

    TODO:
        - change to wihtdrawal pattern, see: https://github.com/Augmint/augmint-contracts/issues/17
        - deduct fee
        - consider take funcs (frequent rate changes with takeBuyToken? send more and send back remainder?)
        - use Rates interface?
*/
pragma solidity 0.4.24;






contract Exchange is Restricted {
    using SafeMath for uint256;

    AugmintTokenInterface public augmintToken;
    Rates public rates;

    struct Order {
        uint64 index;
        address maker;

        // % of published current peggedSymbol/ETH rates published by Rates contract. Stored as parts per million
        // I.e. 1,000,000 = 100% (parity), 990,000 = 1% below parity
        uint32 price;

        // buy order: amount in wei
        // sell order: token amount
        uint amount;
    }

    uint64 public orderCount;
    mapping(uint64 => Order) public buyTokenOrders;
    mapping(uint64 => Order) public sellTokenOrders;

    uint64[] private activeBuyOrders;
    uint64[] private activeSellOrders;

    /* used to stop executing matchMultiple when running out of gas.
        actual is much less, just leaving enough matchMultipleOrders() to finish TODO: fine tune & test it*/
    uint32 private constant ORDER_MATCH_WORST_GAS = 100000;

    event NewOrder(uint64 indexed orderId, address indexed maker, uint32 price, uint tokenAmount, uint weiAmount);

    event OrderFill(address indexed tokenBuyer, address indexed tokenSeller, uint64 buyTokenOrderId,
        uint64 sellTokenOrderId, uint publishedRate, uint32 price, uint weiAmount, uint tokenAmount);

    event CancelledOrder(uint64 indexed orderId, address indexed maker, uint tokenAmount, uint weiAmount);

    event RatesContractChanged(Rates newRatesContract);

    constructor(address permissionGranterContract, AugmintTokenInterface _augmintToken, Rates _rates)
    public Restricted(permissionGranterContract) {
        augmintToken = _augmintToken;
        rates = _rates;
    }

    /* to allow upgrade of Rates  contract */
    function setRatesContract(Rates newRatesContract)
    external restrict("StabilityBoard") {
        rates = newRatesContract;
        emit RatesContractChanged(newRatesContract);
    }

    function placeBuyTokenOrder(uint32 price) external payable returns (uint64 orderId) {
        require(price > 0, "price must be > 0");
        require(msg.value > 0, "msg.value must be > 0");

        orderId = ++orderCount;
        buyTokenOrders[orderId] = Order(uint64(activeBuyOrders.length), msg.sender, price, msg.value);
        activeBuyOrders.push(orderId);

        emit NewOrder(orderId, msg.sender, price, 0, msg.value);
    }

    /* this function requires previous approval to transfer tokens */
    function placeSellTokenOrder(uint32 price, uint tokenAmount) external returns (uint orderId) {
        augmintToken.transferFrom(msg.sender, this, tokenAmount);
        return _placeSellTokenOrder(msg.sender, price, tokenAmount);
    }

    /* place sell token order called from AugmintToken's transferAndNotify
     Flow:
        1) user calls token contract's transferAndNotify price passed in data arg
        2) transferAndNotify transfers tokens to the Exchange contract
        3) transferAndNotify calls Exchange.transferNotification with lockProductId
    */
    function transferNotification(address maker, uint tokenAmount, uint price) external {
        require(msg.sender == address(augmintToken), "msg.sender must be augmintToken");
        _placeSellTokenOrder(maker, uint32(price), tokenAmount);
    }

    function cancelBuyTokenOrder(uint64 buyTokenId) external {
        Order storage order = buyTokenOrders[buyTokenId];
        require(order.maker == msg.sender, "msg.sender must be order.maker");
        require(order.amount > 0, "buy order already removed");

        uint amount = order.amount;
        order.amount = 0;
        _removeBuyOrder(order);

        msg.sender.transfer(amount);

        emit CancelledOrder(buyTokenId, msg.sender, 0, amount);
    }

    function cancelSellTokenOrder(uint64 sellTokenId) external {
        Order storage order = sellTokenOrders[sellTokenId];
        require(order.maker == msg.sender, "msg.sender must be order.maker");
        require(order.amount > 0, "sell order already removed");

        uint amount = order.amount;
        order.amount = 0;
        _removeSellOrder(order);

        augmintToken.transferWithNarrative(msg.sender, amount, "Sell token order cancelled");

        emit CancelledOrder(sellTokenId, msg.sender, amount, 0);
    }

    /* matches any two orders if the sell price >= buy price
        trade price is the price of the maker (the order placed earlier)
        reverts if any of the orders have been removed
    */
    function matchOrders(uint64 buyTokenId, uint64 sellTokenId) external {
        require(_fillOrder(buyTokenId, sellTokenId), "fill order failed");
    }

    /*  matches as many orders as possible from the passed orders
        Runs as long as gas is available for the call.
        Reverts if any match is invalid (e.g sell price > buy price)
        Skips match if any of the matched orders is removed / already filled (i.e. amount = 0)
    */
    function matchMultipleOrders(uint64[] buyTokenIds, uint64[] sellTokenIds) external returns(uint matchCount) {
        uint len = buyTokenIds.length;
        require(len == sellTokenIds.length, "buyTokenIds and sellTokenIds lengths must be equal");

        for (uint i = 0; i < len && gasleft() > ORDER_MATCH_WORST_GAS; i++) {
            if(_fillOrder(buyTokenIds[i], sellTokenIds[i])) {
                matchCount++;
            }
        }
    }

    function getActiveOrderCounts() external view returns(uint buyTokenOrderCount, uint sellTokenOrderCount) {
        return(activeBuyOrders.length, activeSellOrders.length);
    }

    // returns <chunkSize> active buy orders starting from <offset>
    // orders are encoded as [id, maker, price, amount]
    function getActiveBuyOrders(uint offset, uint16 chunkSize)
    external view returns (uint[4][]) {
        uint limit = SafeMath.min(offset.add(chunkSize), activeBuyOrders.length);
        uint[4][] memory response = new uint[4][](limit.sub(offset));
        for (uint i = offset; i < limit; i++) {
            uint64 orderId = activeBuyOrders[i];
            Order storage order = buyTokenOrders[orderId];
            response[i - offset] = [orderId, uint(order.maker), order.price, order.amount];
        }
        return response;
    }

    // returns <chunkSize> active sell orders starting from <offset>
    // orders are encoded as [id, maker, price, amount]
    function getActiveSellOrders(uint offset, uint16 chunkSize)
    external view returns (uint[4][]) {
        uint limit = SafeMath.min(offset.add(chunkSize), activeSellOrders.length);
        uint[4][] memory response = new uint[4][](limit.sub(offset));
        for (uint i = offset; i < limit; i++) {
            uint64 orderId = activeSellOrders[i];
            Order storage order = sellTokenOrders[orderId];
            response[i - offset] = [orderId, uint(order.maker), order.price, order.amount];
        }
        return response;
    }

    uint private constant E12 = 1000000000000;

    function _fillOrder(uint64 buyTokenId, uint64 sellTokenId) private returns(bool success) {
        Order storage buy = buyTokenOrders[buyTokenId];
        Order storage sell = sellTokenOrders[sellTokenId];
        if( buy.amount == 0 || sell.amount == 0 ) {
            return false; // one order is already filled and removed.
                          // we let matchMultiple continue, indivudal match will revert
        }

        require(buy.price >= sell.price, "buy price must be >= sell price");

        // pick maker's price (whoever placed order sooner considered as maker)
        uint32 price = buyTokenId > sellTokenId ? sell.price : buy.price;

        uint publishedRate;
        (publishedRate, ) = rates.rates(augmintToken.peggedSymbol());
        // fillRate = publishedRate * 1000000 / price

        uint sellWei = sell.amount.mul(uint(price)).mul(E12).roundedDiv(publishedRate);

        uint tradedWei;
        uint tradedTokens;
        if (sellWei <= buy.amount) {
            tradedWei = sellWei;
            tradedTokens = sell.amount;
        } else {
            tradedWei = buy.amount;
            tradedTokens = buy.amount.mul(publishedRate).roundedDiv(uint(price).mul(E12));
        }

        buy.amount = buy.amount.sub(tradedWei);
        if (buy.amount == 0) {
            _removeBuyOrder(buy);
        }

        sell.amount = sell.amount.sub(tradedTokens);
        if (sell.amount == 0) {
            _removeSellOrder(sell);
        }

        augmintToken.transferWithNarrative(buy.maker, tradedTokens, "Buy token order fill");
        sell.maker.transfer(tradedWei);

        emit OrderFill(buy.maker, sell.maker, buyTokenId,
            sellTokenId, publishedRate, price, tradedWei, tradedTokens);

        return true;
    }

    function _placeSellTokenOrder(address maker, uint32 price, uint tokenAmount)
    private returns (uint64 orderId) {
        require(price > 0, "price must be > 0");
        require(tokenAmount > 0, "tokenAmount must be > 0");

        orderId = ++orderCount;
        sellTokenOrders[orderId] = Order(uint64(activeSellOrders.length), maker, price, tokenAmount);
        activeSellOrders.push(orderId);

        emit NewOrder(orderId, maker, price, tokenAmount, 0);
    }

    function _removeBuyOrder(Order storage order) private {
        uint lastIndex = activeBuyOrders.length - 1;
        if (order.index < lastIndex) {
            uint64 movedOrderId = activeBuyOrders[lastIndex];
            activeBuyOrders[order.index] = movedOrderId;
            buyTokenOrders[movedOrderId].index = order.index;
        }
        activeBuyOrders.length--;
    }

    function _removeSellOrder(Order storage order) private {
        uint lastIndex = activeSellOrders.length - 1;
        if (order.index < lastIndex) {
            uint64 movedOrderId = activeSellOrders[lastIndex];
            activeSellOrders[order.index] = movedOrderId;
            sellTokenOrders[movedOrderId].index = order.index;
        }
        activeSellOrders.length--;
    }
}

Contract Security Audit

Contract ABI

API
[{"constant":false,"inputs":[{"name":"buyTokenId","type":"uint64"},{"name":"sellTokenId","type":"uint64"}],"name":"matchOrders","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint64"}],"name":"buyTokenOrders","outputs":[{"name":"index","type":"uint64"},{"name":"maker","type":"address"},{"name":"price","type":"uint32"},{"name":"amount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"orderCount","outputs":[{"name":"","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"buyTokenId","type":"uint64"}],"name":"cancelBuyTokenOrder","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"price","type":"uint32"},{"name":"tokenAmount","type":"uint256"}],"name":"placeSellTokenOrder","outputs":[{"name":"orderId","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rates","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"bytes32"}],"name":"permissions","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"agent","type":"address"},{"name":"requiredPermission","type":"bytes32"}],"name":"revokePermission","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"maker","type":"address"},{"name":"tokenAmount","type":"uint256"},{"name":"price","type":"uint256"}],"name":"transferNotification","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"augmintToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getActiveOrderCounts","outputs":[{"name":"buyTokenOrderCount","type":"uint256"},{"name":"sellTokenOrderCount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"agent","type":"address"},{"name":"requiredPermissions","type":"bytes32[]"}],"name":"revokeMultiplePermissions","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"offset","type":"uint256"},{"name":"chunkSize","type":"uint16"}],"name":"getActiveSellOrders","outputs":[{"name":"","type":"uint256[4][]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"offset","type":"uint256"},{"name":"chunkSize","type":"uint16"}],"name":"getActiveBuyOrders","outputs":[{"name":"","type":"uint256[4][]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"agent","type":"address"},{"name":"requiredPermissions","type":"bytes32[]"}],"name":"grantMultiplePermissions","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newRatesContract","type":"address"}],"name":"setRatesContract","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"price","type":"uint32"}],"name":"placeBuyTokenOrder","outputs":[{"name":"orderId","type":"uint64"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint64"}],"name":"sellTokenOrders","outputs":[{"name":"index","type":"uint64"},{"name":"maker","type":"address"},{"name":"price","type":"uint32"},{"name":"amount","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"sellTokenId","type":"uint64"}],"name":"cancelSellTokenOrder","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"buyTokenIds","type":"uint64[]"},{"name":"sellTokenIds","type":"uint64[]"}],"name":"matchMultipleOrders","outputs":[{"name":"matchCount","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"agent","type":"address"},{"name":"requiredPermission","type":"bytes32"}],"name":"grantPermission","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"permissionGranterContract","type":"address"},{"name":"_augmintToken","type":"address"},{"name":"_rates","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"orderId","type":"uint64"},{"indexed":true,"name":"maker","type":"address"},{"indexed":false,"name":"price","type":"uint32"},{"indexed":false,"name":"tokenAmount","type":"uint256"},{"indexed":false,"name":"weiAmount","type":"uint256"}],"name":"NewOrder","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"tokenBuyer","type":"address"},{"indexed":true,"name":"tokenSeller","type":"address"},{"indexed":false,"name":"buyTokenOrderId","type":"uint64"},{"indexed":false,"name":"sellTokenOrderId","type":"uint64"},{"indexed":false,"name":"publishedRate","type":"uint256"},{"indexed":false,"name":"price","type":"uint32"},{"indexed":false,"name":"weiAmount","type":"uint256"},{"indexed":false,"name":"tokenAmount","type":"uint256"}],"name":"OrderFill","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"orderId","type":"uint64"},{"indexed":true,"name":"maker","type":"address"},{"indexed":false,"name":"tokenAmount","type":"uint256"},{"indexed":false,"name":"weiAmount","type":"uint256"}],"name":"CancelledOrder","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newRatesContract","type":"address"}],"name":"RatesContractChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"agent","type":"address"},{"indexed":false,"name":"grantedPermission","type":"bytes32"}],"name":"PermissionGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"agent","type":"address"},{"indexed":false,"name":"revokedPermission","type":"bytes32"}],"name":"PermissionRevoked","type":"event"}]

608060405234801561001057600080fd5b506040516060806134be83398101806040528101908080519060200190929190805190602001909291908051906020019092919050505082600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610113576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f7065726d697373696f6e4772616e746572436f6e7472616374206d757374206281526020017f652073657400000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060007f5065726d697373696f6e4772616e74657200000000000000000000000000000060001916815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fc65937e3dbcb9fb30f646815dd67a3dbd09ba17718cbcb54efbe3635f8e0a6fe60405180807f5065726d697373696f6e4772616e746572000000000000000000000000000000815250602001905060405180910390a25081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505061321c806102a26000396000f30060806040526004361061011d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630c85feea146101225780630d53272e1461016d5780632453ffa8146102195780632bd0ce0f146102585780632dc9d3e51461028f57806343f48fbd146102e05780635b225526146103375780635fe07013146103a057806364e7e4a4146103f15780637b9b9c89146104485780637e6503bb1461049f5780637ea46993146104d1578063828a510214610557578063929967cc1461060a5780639ac3317b146106bd578063ae654d3114610743578063ae94ec0514610786578063bcaeed20146107d4578063c3c51aca14610880578063c7e83451146108b7578063f38a82621461091e575b600080fd5b34801561012e57600080fd5b5061016b600480360381019080803567ffffffffffffffff169060200190929190803567ffffffffffffffff16906020019092919050505061096f565b005b34801561017957600080fd5b506101a2600480360381019080803567ffffffffffffffff1690602001909291905050506109f1565b604051808567ffffffffffffffff1667ffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018363ffffffff1663ffffffff16815260200182815260200194505050505060405180910390f35b34801561022557600080fd5b5061022e610a65565b604051808267ffffffffffffffff1667ffffffffffffffff16815260200191505060405180910390f35b34801561026457600080fd5b5061028d600480360381019080803567ffffffffffffffff169060200190929190505050610a7f565b005b34801561029b57600080fd5b506102ca600480360381019080803563ffffffff16906020019092919080359060200190929190505050610cb6565b6040518082815260200191505060405180910390f35b3480156102ec57600080fd5b506102f5610e0a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561034357600080fd5b50610386600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035600019169060200190929190505050610e30565b604051808215151515815260200191505060405180910390f35b3480156103ac57600080fd5b506103ef600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035600019169060200190929190505050610e5f565b005b3480156103fd57600080fd5b50610446600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611044565b005b34801561045457600080fd5b5061045d61111a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104ab57600080fd5b506104b4611140565b604051808381526020018281526020019250505060405180910390f35b3480156104dd57600080fd5b50610555600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050611157565b005b34801561056357600080fd5b5061059060048036038101908080359060200190929190803561ffff16906020019092919050505061119f565b60405180806020018281038252838181518152602001915080516000925b818410156105f957828490602001906020020151600460200280838360005b838110156105e85780820151818401526020810190506105cd565b5050505090500192600101926105ae565b925050509250505060405180910390f35b34801561061657600080fd5b5061064360048036038101908080359060200190929190803561ffff16906020019092919050505061134c565b60405180806020018281038252838181518152602001915080516000925b818410156106ac57828490602001906020020151600460200280838360005b8381101561069b578082015181840152602081019050610680565b505050509050019260010192610661565b925050509250505060405180910390f35b3480156106c957600080fd5b50610741600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192905050506114f9565b005b34801561074f57600080fd5b50610784600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061165c565b005b6107aa600480360381019080803563ffffffff1690602001909291905050506117fe565b604051808267ffffffffffffffff1667ffffffffffffffff16815260200191505060405180910390f35b3480156107e057600080fd5b50610809600480360381019080803567ffffffffffffffff169060200190929190505050611b2a565b604051808567ffffffffffffffff1667ffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018363ffffffff1663ffffffff16815260200182815260200194505050505060405180910390f35b34801561088c57600080fd5b506108b5600480360381019080803567ffffffffffffffff169060200190929190505050611b9e565b005b3480156108c357600080fd5b50610908600480360381019080803590602001908201803590602001919091929391929390803590602001908201803590602001919091929391929390505050611ea4565b6040518082815260200191505060405180910390f35b34801561092a57600080fd5b5061096d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035600019169060200190929190505050611fdb565b005b61097982826121c0565b15156109ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f66696c6c206f72646572206661696c656400000000000000000000000000000081525060200191505060405180910390fd5b5050565b60036020528060005260406000206000915090508060000160009054906101000a900467ffffffffffffffff16908060000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600001601c9054906101000a900463ffffffff16908060010154905084565b600260149054906101000a900467ffffffffffffffff1681565b600080600360008467ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002091503373ffffffffffffffffffffffffffffffffffffffff168260000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610b72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f6d73672e73656e646572206d757374206265206f726465722e6d616b6572000081525060200191505060405180910390fd5b60008260010154111515610bee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f627579206f7264657220616c72656164792072656d6f7665640000000000000081525060200191505060405180910390fd5b8160010154905060008260010181905550610c08826128be565b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610c4e573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff168367ffffffffffffffff167f46576cf7860a96ee935d6c6cb19aed137c56b1338f49b73225afe99cb923e761600084604051808381526020018281526020019250505060405180910390a3505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610db157600080fd5b505af1158015610dc5573d6000803e3d6000fd5b505050506040513d6020811015610ddb57600080fd5b810190808051906020019092919050505050610df8338484612a23565b67ffffffffffffffff16905092915050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060007f5065726d697373696f6e4772616e74657200000000000000000000000000000060001916815260200190815260200160002060009054906101000a900460ff161515610f7a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f6d73672e73656e646572206d7573742068617665205065726d697373696f6e4781526020017f72616e746572207065726d697373696f6e00000000000000000000000000000081525060400191505060405180910390fd5b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000836000191660001916815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167f789770131846de4d1f28418f0f957cdf4fcabe5eccf70067083e20ecece69a348260405180826000191660001916815260200191505060405180910390a25050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611109576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6d73672e73656e646572206d757374206265206175676d696e74546f6b656e0081525060200191505060405180910390fd5b611114838284612a23565b50505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600580549050600680549050915091509091565b60008082519150600090505b818110156111995761118c84848381518110151561117d57fe5b90602001906020020151610e5f565b8080600101915050611163565b50505050565b60606000606060008060006111cf6111c48861ffff168a612d5190919063ffffffff16565b600680549050612ddb565b94506111e48886612df490919063ffffffff16565b60405190808252806020026020018201604052801561121d57816020015b61120a61316e565b8152602001906001900390816112025790505b5093508792505b8483101561133e5760068381548110151561123b57fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff169150600460008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002090506080604051908101604052808367ffffffffffffffff1681526020018260000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182600001601c9054906101000a900463ffffffff1663ffffffff16815260200182600101548152508489850381518110151561132457fe5b906020019060200201819052508280600101935050611224565b839550505050505092915050565b606060006060600080600061137c6113718861ffff168a612d5190919063ffffffff16565b600580549050612ddb565b94506113918886612df490919063ffffffff16565b6040519080825280602002602001820160405280156113ca57816020015b6113b761316e565b8152602001906001900390816113af5790505b5093508792505b848310156114eb576005838154811015156113e857fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff169150600360008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002090506080604051908101604052808367ffffffffffffffff1681526020018260000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182600001601c9054906101000a900463ffffffff1663ffffffff1681526020018260010154815250848985038151811015156114d157fe5b9060200190602002018190525082806001019350506113d1565b839550505050505092915050565b6000806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060007f5065726d697373696f6e4772616e74657200000000000000000000000000000060001916815260200190815260200160002060009054906101000a900460ff161515611617576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f6d73672e73656e646572206d7573742068617665205065726d697373696f6e4781526020017f72616e746572207065726d697373696f6e00000000000000000000000000000081525060400191505060405180910390fd5b82519150600090505b818110156116565761164984848381518110151561163a57fe5b90602001906020020151611fdb565b8080600101915050611620565b50505050565b7f53746162696c697479426f6172640000000000000000000000000000000000006000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000826000191660001916815260200190815260200160002060009054906101000a900460ff161515611756576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6d73672e73656e646572206d7573742068617665207065726d697373696f6e0081525060200191505060405180910390fd5b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f25f1c01ba20b2c8c2800a53b03fcaf2967976566b4851cc1ef43b7ba334c2eac82604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15050565b6000808263ffffffff1611151561187d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f7072696365206d757374206265203e203000000000000000000000000000000081525060200191505060405180910390fd5b6000341115156118f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f6d73672e76616c7565206d757374206265203e2030000000000000000000000081525060200191505060405180910390fd5b6002601481819054906101000a900467ffffffffffffffff1660010191906101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055905060806040519081016040528060058054905067ffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018363ffffffff16815260200134815250600360008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060208201518160000160086101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600001601c6101000a81548163ffffffff021916908363ffffffff16021790555060608201518160010155905050600581908060018154018082558091505090600182039060005260206000209060049182820401919006600802909192909190916101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550503373ffffffffffffffffffffffffffffffffffffffff168167ffffffffffffffff167f19e48c9ddede2f434b2a662a6e331ff29b3701f08ad88722e4fecf058b3fd75984600034604051808463ffffffff1663ffffffff168152602001838152602001828152602001935050505060405180910390a3919050565b60046020528060005260406000206000915090508060000160009054906101000a900467ffffffffffffffff16908060000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600001601c9054906101000a900463ffffffff16908060010154905084565b600080600460008467ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002091503373ffffffffffffffffffffffffffffffffffffffff168260000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611c91576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f6d73672e73656e646572206d757374206265206f726465722e6d616b6572000081525060200191505060405180910390fd5b60008260010154111515611d0d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f73656c6c206f7264657220616c72656164792072656d6f76656400000000000081525060200191505060405180910390fd5b8160010154905060008260010181905550611d2782612e79565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ffdcf09533836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001806020018281038252601a8152602001807f53656c6c20746f6b656e206f726465722063616e63656c6c65640000000000008152506020019350505050600060405180830381600087803b158015611e2557600080fd5b505af1158015611e39573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff168367ffffffffffffffff167f46576cf7860a96ee935d6c6cb19aed137c56b1338f49b73225afe99cb923e761836000604051808381526020018281526020019250505060405180910390a3505050565b60008060008686905091508484905082141515611f4f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001807f627579546f6b656e49647320616e642073656c6c546f6b656e496473206c656e81526020017f67746873206d75737420626520657175616c000000000000000000000000000081525060400191505060405180910390fd5b600090505b8181108015611f6b5750620186a063ffffffff165a115b15611fd157611fb68787838181101515611f8157fe5b9050602002013567ffffffffffffffff168686848181101515611fa057fe5b9050602002013567ffffffffffffffff166121c0565b15611fc45782806001019350505b8080600101915050611f54565b5050949350505050565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060007f5065726d697373696f6e4772616e74657200000000000000000000000000000060001916815260200190815260200160002060009054906101000a900460ff1615156120f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f6d73672e73656e646572206d7573742068617665205065726d697373696f6e4781526020017f72616e746572207065726d697373696f6e00000000000000000000000000000081525060400191505060405180910390fd5b60016000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000836000191660001916815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167fc65937e3dbcb9fb30f646815dd67a3dbd09ba17718cbcb54efbe3635f8e0a6fe8260405180826000191660001916815260200191505060405180910390a25050565b600080600080600080600080600360008b67ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000209650600460008a67ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000209550600087600101541480612235575060008660010154145b1561224357600097506128b1565b85600001601c9054906101000a900463ffffffff1663ffffffff1687600001601c9054906101000a900463ffffffff1663ffffffff16101515156122ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f627579207072696365206d757374206265203e3d2073656c6c2070726963650081525060200191505060405180910390fd5b8867ffffffffffffffff168a67ffffffffffffffff16116123245786600001601c9054906101000a900463ffffffff1661233a565b85600001601c9054906101000a900463ffffffff165b9450600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dc726205600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166333a263e66040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561240057600080fd5b505af1158015612414573d6000803e3d6000fd5b505050506040513d602081101561242a57600080fd5b81019080805190602001909291905050506040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082600019166000191681526020019150506040805180830381600087803b15801561249457600080fd5b505af11580156124a8573d6000803e3d6000fd5b505050506040513d60408110156124be57600080fd5b81019080805190602001909291908051906020019092919050505050809450506125248461251664e8d4a510006125088963ffffffff168b60010154612fde90919063ffffffff16565b612fde90919063ffffffff16565b61307d90919063ffffffff16565b92508660010154831115156125425782915085600101549050612592565b8660010154915061258f61256a64e8d4a510008763ffffffff16612fde90919063ffffffff16565b612581868a60010154612fde90919063ffffffff16565b61307d90919063ffffffff16565b90505b6125a9828860010154612df490919063ffffffff16565b87600101819055506000876001015414156125c8576125c7876128be565b5b6125df818760010154612df490919063ffffffff16565b86600101819055506000866001015414156125fe576125fd86612e79565b5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ffdcf0958860000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200180602001828103825260148152602001807f42757920746f6b656e206f726465722066696c6c0000000000000000000000008152506020019350505050600060405180830381600087803b15801561272057600080fd5b505af1158015612734573d6000803e3d6000fd5b505050508560000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156127a2573d6000803e3d6000fd5b508560000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168760000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f45a3e70b06309e69d56d5bd1393367ccf8f128c5589739c61bae04baa5d870048c8c888a8888604051808767ffffffffffffffff1667ffffffffffffffff1681526020018667ffffffffffffffff1667ffffffffffffffff1681526020018581526020018463ffffffff1663ffffffff168152602001838152602001828152602001965050505050505060405180910390a3600197505b5050505050505092915050565b6000806001600580549050039150818360000160009054906101000a900467ffffffffffffffff1667ffffffffffffffff161015612a085760058281548110151561290557fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff1690508060058460000160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1681548110151561296357fe5b90600052602060002090600491828204019190066008026101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508260000160009054906101000a900467ffffffffffffffff16600360008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b6005805480919060019003612a1d9190613191565b50505050565b6000808363ffffffff16111515612aa2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f7072696365206d757374206265203e203000000000000000000000000000000081525060200191505060405180910390fd5b600082111515612b1a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f746f6b656e416d6f756e74206d757374206265203e203000000000000000000081525060200191505060405180910390fd5b6002601481819054906101000a900467ffffffffffffffff1660010191906101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055905060806040519081016040528060068054905067ffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018463ffffffff16815260200183815250600460008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060208201518160000160086101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600001601c6101000a81548163ffffffff021916908363ffffffff16021790555060608201518160010155905050600681908060018154018082558091505090600182039060005260206000209060049182820401919006600802909192909190916101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550508373ffffffffffffffffffffffffffffffffffffffff168167ffffffffffffffff167f19e48c9ddede2f434b2a662a6e331ff29b3701f08ad88722e4fecf058b3fd75985856000604051808463ffffffff1663ffffffff168152602001838152602001828152602001935050505060405180910390a39392505050565b6000808284019050838110151515612dd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f616464206f766572666c6f77000000000000000000000000000000000000000081525060200191505060405180910390fd5b8091505092915050565b6000818310612dea5781612dec565b825b905092915050565b6000828211151515612e6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f73756220756e646572666c6f770000000000000000000000000000000000000081525060200191505060405180910390fd5b818303905092915050565b6000806001600680549050039150818360000160009054906101000a900467ffffffffffffffff1667ffffffffffffffff161015612fc357600682815481101515612ec057fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff1690508060068460000160009054906101000a900467ffffffffffffffff1667ffffffffffffffff16815481101515612f1e57fe5b90600052602060002090600491828204019190066008026101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508260000160009054906101000a900467ffffffffffffffff16600460008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b6006805480919060019003612fd89190613191565b50505050565b60008082840290506000841480612fff5750828482811515612ffc57fe5b04145b1515613073576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f6d756c206f766572666c6f77000000000000000000000000000000000000000081525060200191505060405180910390fd5b8091505092915050565b6000806000831115156130f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f646976206279203000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600060028481151561310657fe5b061461312157600160028481151561311a57fe5b040161312f565b60028381151561312d57fe5b045b905080838581151561313d57fe5b06101561315557828481151561314f57fe5b04613165565b6001838581151561316257fe5b04015b91505092915050565b608060405190810160405280600490602082028038833980820191505090505090565b8154818355818111156131c65760030160049004816003016004900483600052602060002091820191016131c591906131cb565b5b505050565b6131ed91905b808211156131e95760008160009055506001016131d1565b5090565b905600a165627a7a723058202e893bcb682d26049c0a3b68c6909ed922696aebb0c72da164953dc351124dfa0029000000000000000000000000de36a8773531406dcbeffdfd3c7b89fced7a9f84000000000000000000000000c994a2deb02543db1f48688438b9903c4b305ce30000000000000000000000004272db2eb82068e898588c3d6e4b5d55c3848793

Deployed Bytecode

0x60806040526004361061011d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630c85feea146101225780630d53272e1461016d5780632453ffa8146102195780632bd0ce0f146102585780632dc9d3e51461028f57806343f48fbd146102e05780635b225526146103375780635fe07013146103a057806364e7e4a4146103f15780637b9b9c89146104485780637e6503bb1461049f5780637ea46993146104d1578063828a510214610557578063929967cc1461060a5780639ac3317b146106bd578063ae654d3114610743578063ae94ec0514610786578063bcaeed20146107d4578063c3c51aca14610880578063c7e83451146108b7578063f38a82621461091e575b600080fd5b34801561012e57600080fd5b5061016b600480360381019080803567ffffffffffffffff169060200190929190803567ffffffffffffffff16906020019092919050505061096f565b005b34801561017957600080fd5b506101a2600480360381019080803567ffffffffffffffff1690602001909291905050506109f1565b604051808567ffffffffffffffff1667ffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018363ffffffff1663ffffffff16815260200182815260200194505050505060405180910390f35b34801561022557600080fd5b5061022e610a65565b604051808267ffffffffffffffff1667ffffffffffffffff16815260200191505060405180910390f35b34801561026457600080fd5b5061028d600480360381019080803567ffffffffffffffff169060200190929190505050610a7f565b005b34801561029b57600080fd5b506102ca600480360381019080803563ffffffff16906020019092919080359060200190929190505050610cb6565b6040518082815260200191505060405180910390f35b3480156102ec57600080fd5b506102f5610e0a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561034357600080fd5b50610386600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035600019169060200190929190505050610e30565b604051808215151515815260200191505060405180910390f35b3480156103ac57600080fd5b506103ef600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035600019169060200190929190505050610e5f565b005b3480156103fd57600080fd5b50610446600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611044565b005b34801561045457600080fd5b5061045d61111a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104ab57600080fd5b506104b4611140565b604051808381526020018281526020019250505060405180910390f35b3480156104dd57600080fd5b50610555600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050611157565b005b34801561056357600080fd5b5061059060048036038101908080359060200190929190803561ffff16906020019092919050505061119f565b60405180806020018281038252838181518152602001915080516000925b818410156105f957828490602001906020020151600460200280838360005b838110156105e85780820151818401526020810190506105cd565b5050505090500192600101926105ae565b925050509250505060405180910390f35b34801561061657600080fd5b5061064360048036038101908080359060200190929190803561ffff16906020019092919050505061134c565b60405180806020018281038252838181518152602001915080516000925b818410156106ac57828490602001906020020151600460200280838360005b8381101561069b578082015181840152602081019050610680565b505050509050019260010192610661565b925050509250505060405180910390f35b3480156106c957600080fd5b50610741600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192905050506114f9565b005b34801561074f57600080fd5b50610784600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061165c565b005b6107aa600480360381019080803563ffffffff1690602001909291905050506117fe565b604051808267ffffffffffffffff1667ffffffffffffffff16815260200191505060405180910390f35b3480156107e057600080fd5b50610809600480360381019080803567ffffffffffffffff169060200190929190505050611b2a565b604051808567ffffffffffffffff1667ffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018363ffffffff1663ffffffff16815260200182815260200194505050505060405180910390f35b34801561088c57600080fd5b506108b5600480360381019080803567ffffffffffffffff169060200190929190505050611b9e565b005b3480156108c357600080fd5b50610908600480360381019080803590602001908201803590602001919091929391929390803590602001908201803590602001919091929391929390505050611ea4565b6040518082815260200191505060405180910390f35b34801561092a57600080fd5b5061096d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035600019169060200190929190505050611fdb565b005b61097982826121c0565b15156109ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f66696c6c206f72646572206661696c656400000000000000000000000000000081525060200191505060405180910390fd5b5050565b60036020528060005260406000206000915090508060000160009054906101000a900467ffffffffffffffff16908060000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600001601c9054906101000a900463ffffffff16908060010154905084565b600260149054906101000a900467ffffffffffffffff1681565b600080600360008467ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002091503373ffffffffffffffffffffffffffffffffffffffff168260000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610b72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f6d73672e73656e646572206d757374206265206f726465722e6d616b6572000081525060200191505060405180910390fd5b60008260010154111515610bee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f627579206f7264657220616c72656164792072656d6f7665640000000000000081525060200191505060405180910390fd5b8160010154905060008260010181905550610c08826128be565b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610c4e573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff168367ffffffffffffffff167f46576cf7860a96ee935d6c6cb19aed137c56b1338f49b73225afe99cb923e761600084604051808381526020018281526020019250505060405180910390a3505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610db157600080fd5b505af1158015610dc5573d6000803e3d6000fd5b505050506040513d6020811015610ddb57600080fd5b810190808051906020019092919050505050610df8338484612a23565b67ffffffffffffffff16905092915050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060007f5065726d697373696f6e4772616e74657200000000000000000000000000000060001916815260200190815260200160002060009054906101000a900460ff161515610f7a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f6d73672e73656e646572206d7573742068617665205065726d697373696f6e4781526020017f72616e746572207065726d697373696f6e00000000000000000000000000000081525060400191505060405180910390fd5b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000836000191660001916815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167f789770131846de4d1f28418f0f957cdf4fcabe5eccf70067083e20ecece69a348260405180826000191660001916815260200191505060405180910390a25050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611109576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6d73672e73656e646572206d757374206265206175676d696e74546f6b656e0081525060200191505060405180910390fd5b611114838284612a23565b50505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600580549050600680549050915091509091565b60008082519150600090505b818110156111995761118c84848381518110151561117d57fe5b90602001906020020151610e5f565b8080600101915050611163565b50505050565b60606000606060008060006111cf6111c48861ffff168a612d5190919063ffffffff16565b600680549050612ddb565b94506111e48886612df490919063ffffffff16565b60405190808252806020026020018201604052801561121d57816020015b61120a61316e565b8152602001906001900390816112025790505b5093508792505b8483101561133e5760068381548110151561123b57fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff169150600460008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002090506080604051908101604052808367ffffffffffffffff1681526020018260000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182600001601c9054906101000a900463ffffffff1663ffffffff16815260200182600101548152508489850381518110151561132457fe5b906020019060200201819052508280600101935050611224565b839550505050505092915050565b606060006060600080600061137c6113718861ffff168a612d5190919063ffffffff16565b600580549050612ddb565b94506113918886612df490919063ffffffff16565b6040519080825280602002602001820160405280156113ca57816020015b6113b761316e565b8152602001906001900390816113af5790505b5093508792505b848310156114eb576005838154811015156113e857fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff169150600360008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002090506080604051908101604052808367ffffffffffffffff1681526020018260000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182600001601c9054906101000a900463ffffffff1663ffffffff1681526020018260010154815250848985038151811015156114d157fe5b9060200190602002018190525082806001019350506113d1565b839550505050505092915050565b6000806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060007f5065726d697373696f6e4772616e74657200000000000000000000000000000060001916815260200190815260200160002060009054906101000a900460ff161515611617576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f6d73672e73656e646572206d7573742068617665205065726d697373696f6e4781526020017f72616e746572207065726d697373696f6e00000000000000000000000000000081525060400191505060405180910390fd5b82519150600090505b818110156116565761164984848381518110151561163a57fe5b90602001906020020151611fdb565b8080600101915050611620565b50505050565b7f53746162696c697479426f6172640000000000000000000000000000000000006000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000826000191660001916815260200190815260200160002060009054906101000a900460ff161515611756576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f6d73672e73656e646572206d7573742068617665207065726d697373696f6e0081525060200191505060405180910390fd5b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f25f1c01ba20b2c8c2800a53b03fcaf2967976566b4851cc1ef43b7ba334c2eac82604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15050565b6000808263ffffffff1611151561187d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f7072696365206d757374206265203e203000000000000000000000000000000081525060200191505060405180910390fd5b6000341115156118f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f6d73672e76616c7565206d757374206265203e2030000000000000000000000081525060200191505060405180910390fd5b6002601481819054906101000a900467ffffffffffffffff1660010191906101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055905060806040519081016040528060058054905067ffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018363ffffffff16815260200134815250600360008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060208201518160000160086101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600001601c6101000a81548163ffffffff021916908363ffffffff16021790555060608201518160010155905050600581908060018154018082558091505090600182039060005260206000209060049182820401919006600802909192909190916101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550503373ffffffffffffffffffffffffffffffffffffffff168167ffffffffffffffff167f19e48c9ddede2f434b2a662a6e331ff29b3701f08ad88722e4fecf058b3fd75984600034604051808463ffffffff1663ffffffff168152602001838152602001828152602001935050505060405180910390a3919050565b60046020528060005260406000206000915090508060000160009054906101000a900467ffffffffffffffff16908060000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600001601c9054906101000a900463ffffffff16908060010154905084565b600080600460008467ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002091503373ffffffffffffffffffffffffffffffffffffffff168260000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611c91576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f6d73672e73656e646572206d757374206265206f726465722e6d616b6572000081525060200191505060405180910390fd5b60008260010154111515611d0d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f73656c6c206f7264657220616c72656164792072656d6f76656400000000000081525060200191505060405180910390fd5b8160010154905060008260010181905550611d2782612e79565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ffdcf09533836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001806020018281038252601a8152602001807f53656c6c20746f6b656e206f726465722063616e63656c6c65640000000000008152506020019350505050600060405180830381600087803b158015611e2557600080fd5b505af1158015611e39573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff168367ffffffffffffffff167f46576cf7860a96ee935d6c6cb19aed137c56b1338f49b73225afe99cb923e761836000604051808381526020018281526020019250505060405180910390a3505050565b60008060008686905091508484905082141515611f4f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001807f627579546f6b656e49647320616e642073656c6c546f6b656e496473206c656e81526020017f67746873206d75737420626520657175616c000000000000000000000000000081525060400191505060405180910390fd5b600090505b8181108015611f6b5750620186a063ffffffff165a115b15611fd157611fb68787838181101515611f8157fe5b9050602002013567ffffffffffffffff168686848181101515611fa057fe5b9050602002013567ffffffffffffffff166121c0565b15611fc45782806001019350505b8080600101915050611f54565b5050949350505050565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060007f5065726d697373696f6e4772616e74657200000000000000000000000000000060001916815260200190815260200160002060009054906101000a900460ff1615156120f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260318152602001807f6d73672e73656e646572206d7573742068617665205065726d697373696f6e4781526020017f72616e746572207065726d697373696f6e00000000000000000000000000000081525060400191505060405180910390fd5b60016000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000836000191660001916815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167fc65937e3dbcb9fb30f646815dd67a3dbd09ba17718cbcb54efbe3635f8e0a6fe8260405180826000191660001916815260200191505060405180910390a25050565b600080600080600080600080600360008b67ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000209650600460008a67ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000209550600087600101541480612235575060008660010154145b1561224357600097506128b1565b85600001601c9054906101000a900463ffffffff1663ffffffff1687600001601c9054906101000a900463ffffffff1663ffffffff16101515156122ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f627579207072696365206d757374206265203e3d2073656c6c2070726963650081525060200191505060405180910390fd5b8867ffffffffffffffff168a67ffffffffffffffff16116123245786600001601c9054906101000a900463ffffffff1661233a565b85600001601c9054906101000a900463ffffffff165b9450600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dc726205600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166333a263e66040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561240057600080fd5b505af1158015612414573d6000803e3d6000fd5b505050506040513d602081101561242a57600080fd5b81019080805190602001909291905050506040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082600019166000191681526020019150506040805180830381600087803b15801561249457600080fd5b505af11580156124a8573d6000803e3d6000fd5b505050506040513d60408110156124be57600080fd5b81019080805190602001909291908051906020019092919050505050809450506125248461251664e8d4a510006125088963ffffffff168b60010154612fde90919063ffffffff16565b612fde90919063ffffffff16565b61307d90919063ffffffff16565b92508660010154831115156125425782915085600101549050612592565b8660010154915061258f61256a64e8d4a510008763ffffffff16612fde90919063ffffffff16565b612581868a60010154612fde90919063ffffffff16565b61307d90919063ffffffff16565b90505b6125a9828860010154612df490919063ffffffff16565b87600101819055506000876001015414156125c8576125c7876128be565b5b6125df818760010154612df490919063ffffffff16565b86600101819055506000866001015414156125fe576125fd86612e79565b5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ffdcf0958860000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200180602001828103825260148152602001807f42757920746f6b656e206f726465722066696c6c0000000000000000000000008152506020019350505050600060405180830381600087803b15801561272057600080fd5b505af1158015612734573d6000803e3d6000fd5b505050508560000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156127a2573d6000803e3d6000fd5b508560000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168760000160089054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f45a3e70b06309e69d56d5bd1393367ccf8f128c5589739c61bae04baa5d870048c8c888a8888604051808767ffffffffffffffff1667ffffffffffffffff1681526020018667ffffffffffffffff1667ffffffffffffffff1681526020018581526020018463ffffffff1663ffffffff168152602001838152602001828152602001965050505050505060405180910390a3600197505b5050505050505092915050565b6000806001600580549050039150818360000160009054906101000a900467ffffffffffffffff1667ffffffffffffffff161015612a085760058281548110151561290557fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff1690508060058460000160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1681548110151561296357fe5b90600052602060002090600491828204019190066008026101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508260000160009054906101000a900467ffffffffffffffff16600360008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b6005805480919060019003612a1d9190613191565b50505050565b6000808363ffffffff16111515612aa2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f7072696365206d757374206265203e203000000000000000000000000000000081525060200191505060405180910390fd5b600082111515612b1a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f746f6b656e416d6f756e74206d757374206265203e203000000000000000000081525060200191505060405180910390fd5b6002601481819054906101000a900467ffffffffffffffff1660010191906101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055905060806040519081016040528060068054905067ffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018463ffffffff16815260200183815250600460008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060208201518160000160086101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600001601c6101000a81548163ffffffff021916908363ffffffff16021790555060608201518160010155905050600681908060018154018082558091505090600182039060005260206000209060049182820401919006600802909192909190916101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550508373ffffffffffffffffffffffffffffffffffffffff168167ffffffffffffffff167f19e48c9ddede2f434b2a662a6e331ff29b3701f08ad88722e4fecf058b3fd75985856000604051808463ffffffff1663ffffffff168152602001838152602001828152602001935050505060405180910390a39392505050565b6000808284019050838110151515612dd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f616464206f766572666c6f77000000000000000000000000000000000000000081525060200191505060405180910390fd5b8091505092915050565b6000818310612dea5781612dec565b825b905092915050565b6000828211151515612e6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f73756220756e646572666c6f770000000000000000000000000000000000000081525060200191505060405180910390fd5b818303905092915050565b6000806001600680549050039150818360000160009054906101000a900467ffffffffffffffff1667ffffffffffffffff161015612fc357600682815481101515612ec057fe5b90600052602060002090600491828204019190066008029054906101000a900467ffffffffffffffff1690508060068460000160009054906101000a900467ffffffffffffffff1667ffffffffffffffff16815481101515612f1e57fe5b90600052602060002090600491828204019190066008026101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508260000160009054906101000a900467ffffffffffffffff16600460008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505b6006805480919060019003612fd89190613191565b50505050565b60008082840290506000841480612fff5750828482811515612ffc57fe5b04145b1515613073576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600c8152602001807f6d756c206f766572666c6f77000000000000000000000000000000000000000081525060200191505060405180910390fd5b8091505092915050565b6000806000831115156130f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f646976206279203000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600060028481151561310657fe5b061461312157600160028481151561311a57fe5b040161312f565b60028381151561312d57fe5b045b905080838581151561313d57fe5b06101561315557828481151561314f57fe5b04613165565b6001838581151561316257fe5b04015b91505092915050565b608060405190810160405280600490602082028038833980820191505090505090565b8154818355818111156131c65760030160049004816003016004900483600052602060002091820191016131c591906131cb565b5b505050565b6131ed91905b808211156131e95760008160009055506001016131d1565b5090565b905600a165627a7a723058202e893bcb682d26049c0a3b68c6909ed922696aebb0c72da164953dc351124dfa0029

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

000000000000000000000000de36a8773531406dcbeffdfd3c7b89fced7a9f84000000000000000000000000c994a2deb02543db1f48688438b9903c4b305ce30000000000000000000000004272db2eb82068e898588c3d6e4b5d55c3848793

-----Decoded View---------------
Arg [0] : permissionGranterContract (address): 0xde36a8773531406dCBefFdfd3C7b89fCed7A9F84
Arg [1] : _augmintToken (address): 0xc994a2dEb02543Db1f48688438b9903c4b305ce3
Arg [2] : _rates (address): 0x4272dB2EB82068E898588C3D6e4B5D55c3848793

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000de36a8773531406dcbeffdfd3c7b89fced7a9f84
Arg [1] : 000000000000000000000000c994a2deb02543db1f48688438b9903c4b305ce3
Arg [2] : 0000000000000000000000004272db2eb82068e898588c3d6e4b5d55c3848793


Swarm Source

bzzr://2e893bcb682d26049c0a3b68c6909ed922696aebb0c72da164953dc351124dfa

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