Contract Overview
Balance: 2.240605007620302487 Ether
Transactions: 25 txns
 Latest 25 txns


TxHash Age From To Value [TxFee]
0x70bd5fcf139f28caca053c3e2f732dfc1981248809309f2625537cb7d4002771182 days 5 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c0.01 Ether0.00402208
0xfc9a416371df567e2419b34ce9b5c2aba604464ffab5bcfc12377495b6762fec182 days 5 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c0.01 Ether0.00400014
0x8e26c3aba911e409bb8b9f678bce5f427e523e95066f2e5531cb55db59e70d74187 days 8 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c0.01 Ether0.00402212
0x30366f0fc2359da499df4947e5f79ad74e9429b176f2bf9d641aeba387fe595e187 days 8 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c0.01 Ether0.00402208
0x1b55659c9d3a37f1e45c3e18fe008c80d7d30fcba38f176ad33399066d1bdbfb191 days 10 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c0.1 Ether0.00400014
0x5dc9d9047b19801223ae6e9b04a3f16f236a50363894d7b3fe8b0b8743a69023191 days 10 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c1 Ether0.00399266
0x858abf2fa20005dc7e4d8d3811514c54f6b95ead53e1ad5a7ff4262b3e55d8cd191 days 11 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c0.1 Ether0.00430014
0xe9d2c9bb2ca5e625800267aaf8706631cf03044cb2bed704cb9dd954f63bf6f2191 days 11 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c0.1 Ether0.00400014
0xeada400792af837d65f0c6bbae52868d4b5682d7f819d3e793c652e28fec6d08191 days 11 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c0.1 Ether0.00430014
0x8ac52cb10981c30cc18d690fad8f5528f73a677a3eac7897320f42d2e78a9a48191 days 11 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c1 Ether0.00429266
0xb1676614e6d776279db0e7a0ed8386da7829affc4b51cac5e7ae8e15ebf09b34191 days 11 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c0.1 Ether0.00402596
0x3395a2ada3ea0a44aca5b9a8ebabdccc0ae73626fd3dd8543a8b292c61d2d16c191 days 22 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c0.1 Ether0.00430014
0x3eded466296c7894d4bf17fe27d0d22168e7be28a18d63d7135e822f45c0185d191 days 22 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c0.01 Ether0.00402212
0x7c496fd6a315d2017bdbc0e56eac2349287e45891607d530b1bee0c217dbbd4a191 days 23 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c0.01 Ether0.00430014
0x15696208483281a01575f54efa4c1c25846af9702bf3c033b49adfae67d6df48191 days 23 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c0.00001 Ether0.0014267
0x9a4fab33176078e2d8dfddc806bce049f7b60cf3923eeb4fef1c1f3d8e27badf212 days 22 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c0.1 Ether0.00402596
0x01a48ba9a1ffe590de504890c4233e1deb69481303d9e08fe562989633674ceb212 days 22 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c0.5 Ether0.00430014
0x0fc85bf77d224c7913ed50fe523337f48311178b3f8daf12aec3518418b392e9212 days 22 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c1 Ether0.00429266
0x422b610febc09ab4e8d165c10e8a4bd6f85b6e561b080a40e18e0c5a7516cbec212 days 22 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c1 Ether0.00459266
0x0b848cc611129279a4eda08d7cb300865afe8c76ed7d2fce531efbe29e00cbd5212 days 22 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c0 Ether0.00205024
0x7d53fc6bdd8a9975b702c765cadefccd4407d17a858855f242e1b9830e24f5a5212 days 22 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c0 Ether0.00131806
0x89a872c1f12cf855c5121c76de8b09799eb7e0fe9c5dfdee95eebab1ac790437212 days 22 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c1 Ether0.00045532
0x284846421c0f23024a771a391dced0dbc6c6e300309e06c854ddcd90f774a9c4212 days 22 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c0.1 Ether0.0004628
0x1369ad365aa6586a3f0d9e6d5d531cbd39105f951fac647d9b53c8e780270e64212 days 22 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN   0x95cbea5790224bfef1b934f05bd4b29a1482933c1 Ether0.00045532
0x25af4241034442ec7cda9a555eb686351c8e9fff72a1309adecf98db95d89037214 days 21 hrs ago0x4ef4c85dc5b358b9690338b44962c4d69829fa81  IN    Contract Creation0 Ether0.06385396
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click here to View More View All
ParentTxHash Block Age From To Value
0x054ec233e150b37e1c264d1352da81d39e433ef147376555a35ab04d214405de4804464182 days 5 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0x4ef4c85dc5b358b9690338b44962c4d69829fa810.005494405719720309 Ether
0x70bd5fcf139f28caca053c3e2f732dfc1981248809309f2625537cb7d40027714804459182 days 5 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0x4ef4c85dc5b358b9690338b44962c4d69829fa810.0059723 Ether
0x70bd5fcf139f28caca053c3e2f732dfc1981248809309f2625537cb7d40027714804459182 days 5 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0xd96d79f64c2abf0920e241a500344a87573937ca0.0040277 Ether
0xfc9a416371df567e2419b34ce9b5c2aba604464ffab5bcfc12377495b6762fec4804431182 days 5 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0xd96d79f64c2abf0920e241a500344a87573937ca0.0040277 Ether
0x839405b0ded6f236f87b695a5ee4e0d395b318c505e42b92ed28e569cee66dd24801424182 days 10 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0xd96d79f64c2abf0920e241a500344a87573937ca0.0040277 Ether
0x839405b0ded6f236f87b695a5ee4e0d395b318c505e42b92ed28e569cee66dd24801424182 days 10 hrs ago0x4ab29def529b1678e2c5e966e0d67d733829103b0x95cbea5790224bfef1b934f05bd4b29a1482933c0.01 Ether
0x42b77dc34e55d670920f0c7846a505221feac5e08210c1a95a1822df917c56ad4732374187 days 8 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0x4ef4c85dc5b358b9690338b44962c4d69829fa810.015111207148194166 Ether
0x8e26c3aba911e409bb8b9f678bce5f427e523e95066f2e5531cb55db59e70d744732372187 days 8 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0x4ef4c85dc5b358b9690338b44962c4d69829fa810.0059723 Ether
0x8e26c3aba911e409bb8b9f678bce5f427e523e95066f2e5531cb55db59e70d744732372187 days 8 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0xd96d79f64c2abf0920e241a500344a87573937ca0.0040277 Ether
0x4a235ab1716082d1bbf828640db83dcc859d8ffdee99f6e27752e9d1ed68adeb4732353187 days 8 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0x4ef4c85dc5b358b9690338b44962c4d69829fa810.030595479511783038 Ether
0x30366f0fc2359da499df4947e5f79ad74e9429b176f2bf9d641aeba387fe595e4732351187 days 8 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0x4ef4c85dc5b358b9690338b44962c4d69829fa810.0059723 Ether
0x30366f0fc2359da499df4947e5f79ad74e9429b176f2bf9d641aeba387fe595e4732351187 days 8 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0xd96d79f64c2abf0920e241a500344a87573937ca0.0040277 Ether
0x1b55659c9d3a37f1e45c3e18fe008c80d7d30fcba38f176ad33399066d1bdbfb4702284191 days 10 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0xd96d79f64c2abf0920e241a500344a87573937ca0.0040277 Ether
0x5dc9d9047b19801223ae6e9b04a3f16f236a50363894d7b3fe8b0b8743a690234702271191 days 10 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0xd96d79f64c2abf0920e241a500344a87573937ca0.0040277 Ether
0x858abf2fa20005dc7e4d8d3811514c54f6b95ead53e1ad5a7ff4262b3e55d8cd4702246191 days 11 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0xd96d79f64c2abf0920e241a500344a87573937ca0.0040277 Ether
0xe9d2c9bb2ca5e625800267aaf8706631cf03044cb2bed704cb9dd954f63bf6f24702233191 days 11 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0xd96d79f64c2abf0920e241a500344a87573937ca0.0040277 Ether
0xeada400792af837d65f0c6bbae52868d4b5682d7f819d3e793c652e28fec6d084702227191 days 11 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0xd96d79f64c2abf0920e241a500344a87573937ca0.0040277 Ether
0x8ac52cb10981c30cc18d690fad8f5528f73a677a3eac7897320f42d2e78a9a484702217191 days 11 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0xd96d79f64c2abf0920e241a500344a87573937ca0.0040277 Ether
0x6620b9a5ddecd125fa5e3e91bc876ad6e9168ecc6be21b781a23096fd7ba10314702205191 days 11 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0x4ef4c85dc5b358b9690338b44962c4d69829fa814.045317214378934033 Ether
0xb1676614e6d776279db0e7a0ed8386da7829affc4b51cac5e7ae8e15ebf09b344702200191 days 11 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0x4ef4c85dc5b358b9690338b44962c4d69829fa810.0959723 Ether
0xb1676614e6d776279db0e7a0ed8386da7829affc4b51cac5e7ae8e15ebf09b344702200191 days 11 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0xd96d79f64c2abf0920e241a500344a87573937ca0.0040277 Ether
0xcbc43cd59e31fa1630b08e84f7615d8eac1dd74f5d66c317856d440f2a20eab14696228191 days 22 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0x4ef4c85dc5b358b9690338b44962c4d69829fa810.0959723 Ether
0x3395a2ada3ea0a44aca5b9a8ebabdccc0ae73626fd3dd8543a8b292c61d2d16c4696224191 days 22 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0xd96d79f64c2abf0920e241a500344a87573937ca0.0040277 Ether
0x6c72a8c7762ba109bd998b54e5d52bd4c41717cdfdc58af7974a9f214aa963174696203191 days 22 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0x4ef4c85dc5b358b9690338b44962c4d69829fa810.046627385621065967 Ether
0x3eded466296c7894d4bf17fe27d0d22168e7be28a18d63d7135e822f45c0185d4696199191 days 22 hrs ago0x95cbea5790224bfef1b934f05bd4b29a1482933c0x4ef4c85dc5b358b9690338b44962c4d69829fa810.0059723 Ether
[ Download CSV Export  ] 
Warning: The compiled contract might be susceptible to ZeroFunctionSelector (very low-severity) Solidity compiler bugs.

Contract Source Code Verified (Exact match)
Contract Name: minter
Compiler Version: v0.4.16+commit.d7661dd9
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.16;

/** @title owned. */
contract owned  {
  address owner;
  function owned() {
    owner = msg.sender;
  }
  function changeOwner(address newOwner) onlyOwner {
    owner = newOwner;
  }
  modifier onlyOwner() {
    if (msg.sender==owner) 
    _;
  }
}

/** @title mortal. */
contract mortal is owned() {
  function kill() onlyOwner {
    if (msg.sender == owner) selfdestruct(owner);
  }
}

/** @title DSMath. */
contract DSMath {

	// Copyright (C) 2015, 2016, 2017  DappHub, LLC

	// Licensed under the Apache License, Version 2.0 (the "License").
	// You may not use this file except in compliance with the License.

	// Unless required by applicable law or agreed to in writing, software
	// distributed under the License is distributed on an "AS IS" BASIS,
	// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND (express or implied).
    
	// /*
    // uint128 functions (h is for half)
    //  */

    function hmore(uint128 x, uint128 y) constant internal returns (bool) {
        return x>y;
    }

    function hless(uint128 x, uint128 y) constant internal returns (bool) {
        return x<y;
    }

    function hadd(uint128 x, uint128 y) constant internal returns (uint128 z) {
        require((z = x + y) >= x);
    }

    function hsub(uint128 x, uint128 y) constant internal returns (uint128 z) {
        require((z = x - y) <= x);
    }

    function hmul(uint128 x, uint128 y) constant internal returns (uint128 z) {
        require(y == 0 ||(z = x * y)/ y == x);
    }

    function hdiv(uint128 x, uint128 y) constant internal returns (uint128 z) {
        z = x / y;
    }

    function hmin(uint128 x, uint128 y) constant internal returns (uint128 z) {
        return x <= y ? x : y;
    }

    function hmax(uint128 x, uint128 y) constant internal returns (uint128 z) {
        return x >= y ? x : y;
    }

    // /*
    // int256 functions
    //  */

    /*
    WAD math
     */
    uint64 constant WAD_Dec=18;
    uint128 constant WAD = 10 ** 18;

    function wmore(uint128 x, uint128 y) constant internal returns (bool) {
        return hmore(x, y);
    }

    function wless(uint128 x, uint128 y) constant internal returns (bool) {
        return hless(x, y);
    }

    function wadd(uint128 x, uint128 y) constant  returns (uint128) {
        return hadd(x, y);
    }

    function wsub(uint128 x, uint128 y) constant   returns (uint128) {
        return hsub(x, y);
    }

    function wmul(uint128 x, uint128 y) constant returns (uint128 z) {
        z = cast((uint256(x) * y + WAD / 2) / WAD);
    }

    function wdiv(uint128 x, uint128 y) constant internal  returns (uint128 z) {
        z = cast((uint256(x) * WAD + y / 2) / y);
    }

    function wmin(uint128 x, uint128 y) constant internal  returns (uint128) {
        return hmin(x, y);
    }

    function wmax(uint128 x, uint128 y) constant internal  returns (uint128) {
        return hmax(x, y);
    }

    function cast(uint256 x) constant internal returns (uint128 z) {
        assert((z = uint128(x)) == x);
    }
	
}
 
/** @title I_minter. */
contract I_minter { 
    event EventCreateStatic(address indexed _from, uint128 _value, uint _transactionID, uint _Price); 
    event EventRedeemStatic(address indexed _from, uint128 _value, uint _transactionID, uint _Price); 
    event EventCreateRisk(address indexed _from, uint128 _value, uint _transactionID, uint _Price); 
    event EventRedeemRisk(address indexed _from, uint128 _value, uint _transactionID, uint _Price); 
    event EventBankrupt();

    function Leverage() constant returns (uint128)  {}
    function RiskPrice(uint128 _currentPrice,uint128 _StaticTotal,uint128 _RiskTotal, uint128 _ETHTotal) constant returns (uint128 price)  {}
    function RiskPrice(uint128 _currentPrice) constant returns (uint128 price)  {}     
    function PriceReturn(uint _TransID,uint128 _Price) {}
    function NewStatic() external payable returns (uint _TransID)  {}
    function NewStaticAdr(address _Risk) external payable returns (uint _TransID)  {}
    function NewRisk() external payable returns (uint _TransID)  {}
    function NewRiskAdr(address _Risk) external payable returns (uint _TransID)  {}
    function RetRisk(uint128 _Quantity) external payable returns (uint _TransID)  {}
    function RetStatic(uint128 _Quantity) external payable returns (uint _TransID)  {}
    function Strike() constant returns (uint128)  {}
}

/** @title I_Pricer. */
contract I_Pricer {
    uint128 public lastPrice;
    I_minter public mint;
    string public sURL;
    mapping (bytes32 => uint) RevTransaction;
    function __callback(bytes32 myid, string result) {}
    function queryCost() constant returns (uint128 _value) {}
    function QuickPrice() payable {}
    function requestPrice(uint _actionID) payable returns (uint _TrasID) {}
    function collectFee() returns(bool) {}
    function () {
        //if ether is sent to this address, send it back.
        revert();
    }
}

/** @title I_coin. */
contract I_coin is mortal {

    event EventClear();

	I_minter public mint;
    string public name;                   //fancy name: eg Simon Bucks
    uint8 public decimals=18;                //How many decimals to show. ie. There could 1000 base units with 3 decimals. Meaning 0.980 SBX = 980 base units. It's like comparing 1 wei to 1 ether.
    string public symbol;                 //An identifier: eg SBX
    string public version = '';       //human 0.1 standard. Just an arbitrary versioning scheme.
	
    function mintCoin(address target, uint256 mintedAmount) returns (bool success) {}
    function meltCoin(address target, uint256 meltedAmount) returns (bool success) {}
    function approveAndCall(address _spender, uint256 _value, bytes _extraData){}

    function setMinter(address _minter) {}   
	function increaseApproval (address _spender, uint256 _addedValue) returns (bool success) {}    
	function decreaseApproval (address _spender, uint256 _subtractedValue) 	returns (bool success) {} 

    // @param _owner The address from which the balance will be retrieved
    // @return The balance
    function balanceOf(address _owner) constant returns (uint256 balance) {}    


    // @notice send `_value` token to `_to` from `msg.sender`
    // @param _to The address of the recipient
    // @param _value The amount of token to be transferred
    // @return Whether the transfer was successful or not
    function transfer(address _to, uint256 _value) returns (bool success) {}


    // @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
    // @param _from The address of the sender
    // @param _to The address of the recipient
    // @param _value The amount of token to be transferred
    // @return Whether the transfer was successful or not
    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {}

    // @notice `msg.sender` approves `_addr` to spend `_value` tokens
    // @param _spender The address of the account able to transfer the tokens
    // @param _value The amount of wei to be approved for transfer
    // @return Whether the approval was successful or not
    function approve(address _spender, uint256 _value) returns (bool success) {}

    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);
	
	// @param _owner The address of the account owning tokens
    // @param _spender The address of the account able to transfer the tokens
    // @return Amount of remaining tokens allowed to spent
    function allowance(address _owner, address _spender) constant returns (uint256 remaining) {}
	
	mapping (address => uint256) balances;
    mapping (address => mapping (address => uint256)) allowed;

	// @return total amount of tokens
    uint256 public totalSupply;
}

/** @title DSBaseActor. */
contract DSBaseActor {
   /*
   Copyright 2016 Nexus Development, LLC

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

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

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

    bool _ds_mutex;
    modifier mutex() {
        assert(!_ds_mutex);
        _ds_mutex = true;
        _;
        _ds_mutex = false;
    }
	
    function tryExec( address target, bytes calldata, uint256 value)
			mutex()
            internal
            returns (bool call_ret)
    {
		/** @dev Requests new StatiCoins be made for a given address
          * @param target where the ETH is sent to.
          * @param calldata
          * @param value
          * @return True if ETH is transfered
        */
        return target.call.value(value)(calldata);
    }
	
    function exec( address target, bytes calldata, uint256 value)
             internal
    {
        assert(tryExec(target, calldata, value));
    }
}

/** @title canFreeze. */
contract canFreeze is owned { 
	//Copyright (c) 2017 GenkiFS
	//Basically a "break glass in case of emergency"
    bool public frozen=false;
    modifier LockIfFrozen() {
        if (!frozen){
            _;
        }
    }
    function Freeze() onlyOwner {
        // fixes the price and allows everyone to redeem their coins at the current value
		// only becomes false when all ETH has been claimed or the pricer contract is changed
        frozen=true;
    }
}

/** @title oneWrite. */
contract oneWrite {  
	//  Adds modifies that allow one function to be called only once
	//Copyright (c) 2017 GenkiFS
  bool written = false;
  function oneWrite() {
	/** @dev Constuctor, make sure written=false initally
	*/
    written = false;
  }
  modifier LockIfUnwritten() {
    if (written){
        _;
    }
  }
  modifier writeOnce() {
    if (!written){
        written=true;
        _;
    }
  }
}

/** @title pricerControl. */
contract pricerControl is canFreeze {
	//  Copyright (c) 2017 GenkiFS
	//  Controls the Pricer contract for minter.  Allows updates to be made in the future by swapping the pricer contract
	//  Although this is not expected, web addresses, API's, new oracles could require adjusments to the pricer contract
	//  A delay of 2 days is implemented to allow coinholders to redeem their coins if they do not agree with the new contract
	//  A new pricer contract unfreezes the minter (allowing a live price to be used)
    I_Pricer public pricer;
    address public future;
    uint256 public releaseTime;
    uint public PRICER_DELAY = 2; // days updated when coins are set
    event EventAddressChange(address indexed _from, address indexed _to, uint _timeChange);

    function setPricer(address newAddress) onlyOwner {
		/** @dev Changes the Pricer contract, after a certain delay
          * @param newAddress Allows coins to be created and sent to other people
          * @return transaction ID which can be viewed in the pending mapping
        */
        releaseTime = now + PRICER_DELAY;
        future = newAddress;
        EventAddressChange(pricer, future, releaseTime);
    }  

    modifier updates() {
        if (now > releaseTime  && pricer != future){
            update();
            //log0('Updating');
        }
        _;
    }

    modifier onlyPricer() {
      if (msg.sender==address(pricer))
      _;
    }

    function update() internal {
        pricer =  I_Pricer(future);
		frozen = false;
    }
}

/** @title minter. */	
contract minter is I_minter, DSBaseActor, oneWrite, pricerControl, DSMath{ //
	// Copyright (c) 2017 GenkiFS
	// This contract is the controller for the StatiCoin contracts.  
	// Users have 4(+2) functions they can call to mint/melt Static/Risk coins which then calls the Pricer contract
	// after a delay the Pricer contract will call back to the PriceReturn() function
	// this will then call one of the functions ActionNewStatic, ActionNewRisk, ActionRetStatic, ActionRetRisk
	// which will then call the Static or Risk ERC20 contracts to mint/melt new tokens
	// Transfer of tokens is handled by the ERC20 contracts, ETH is stored here.  
    enum Action {NewStatic, RetStatic, NewRisk, RetRisk} // Enum of what users can do
    struct Trans { // Struct
        uint128 amount; // Amount sent by the user (Can be either ETH or number of returned coins)
        address holder; // Address of the user
        Action action;  // Type of action requested (mint/melt a Risk/StatiCoin)
		uint pricerID;  // ID for the pricer function
    }
    uint128 public lastPrice; //Storage of the last price returned by the Pricer contract
	uint128 public PendingETH; //Amount of eth to be added to the contract
    uint public TransID=0; // An increasing counter to keep track of transactions requested
	uint public TransCompleted; // Last transaction removed
    string public Currency; // Name of underlying base currency
    I_coin public Static;  // ERC20 token interface for the StatiCoin
    I_coin public Risk;  // ERC20 token interface for the Risk coin
    uint128 public Multiplier;//=15*10**(17); // default ratio for Risk price
    uint128 public levToll=5*10**(18-1);//0.5  // this plus the multiplier defines the maximum leverage
    uint128 public mintFee = 2*10**(18-3); //0.002 Used to pay oricalize and for marketing contract which is in both parties interest.
    mapping (uint => Trans[]) public pending; // A mapping of pending transactions

    event EventCreateStatic(address indexed _from, uint128 _value, uint _transactionID, uint _Price); 
    event EventRedeemStatic(address indexed _from, uint128 _value, uint _transactionID, uint _Price); 
    event EventCreateRisk(address indexed _from, uint128 _value, uint _transactionID, uint _Price); 
    event EventRedeemRisk(address indexed _from, uint128 _value, uint _transactionID, uint _Price); 
    event EventBankrupt();	//Called when no more ETH is in the contract and everything needs to be manually reset.  
	
	function minter(string _currency, uint128 _Multiplier) { //,uint8 _DecimalPlaces
        // CONSTRUCTOR  
        Currency=_currency;
        Multiplier = _Multiplier;
        // can't add new contracts here as it gives out of gas messages.  Too much code.
    }	

	function () {
        //if ETH is just sent to this address then we cannot determine if it's for StatiCoins or RiskCoins, so send it back.
        revert();
    }

	function Bailout() 
			external 
			payable 
			{
        /** @dev Allows extra ETH to be added to the benefit of both types of coin holders
          * @return nothing
        */
    }
		
    function NewStatic() 
			external 
			payable 
			returns (uint _TransID) {
        /** @dev Requests new StatiCoins be made for the sender.  
		  * This cannot be called by a contract.  Only a simple wallet (with 0 codesize).
		  * Contracts must use the Approve, transferFrom pattern and move coins from wallets
          * @return transaction ID which can be viewed in the pending mapping
        */
		_TransID=NewCoinInternal(msg.sender,cast(msg.value),Action.NewStatic);
		//log0('NewStatic');
    }
	
    function NewStaticAdr(address _user) 
			external 
			payable 
			returns (uint _TransID)  {  
        /** @dev Requests new StatiCoins be made for a given address.  
		  * The address cannot be a contract, only a simple wallet (with 0 codesize).
		  * Contracts must use the Approve, transferFrom pattern and move coins from wallets
          * @param _user Allows coins to be created and sent to other people
          * @return transaction ID which can be viewed in the pending mapping
        */
		_TransID=NewCoinInternal(_user,cast(msg.value),Action.NewStatic);
		//log0('NewStatic');
    }
	
    function NewRisk() 
			external 
			payable 
			returns (uint _TransID)  {
        /** @dev Requests new Riskcoins be made for the sender.  
		  * This cannot be called by a contract, only a simple wallet (with 0 codesize).
		  * Contracts must use the Approve, transferFrom pattern and move coins from wallets
          * @return transaction ID which can be viewed in the pending mapping
          */
		_TransID=NewCoinInternal(msg.sender,cast(msg.value),Action.NewRisk);
        //log0('NewRisk');
    }

    function NewRiskAdr(address _user) 
			external 
			payable 
			returns (uint _TransID)  {
        /** @dev Requests new Riskcoins be made for a given address.  
		  * The address cannot be a contract, only a simple wallet (with 0 codesize).
		  * Contracts must use the Approve, transferFrom pattern and move coins from wallets
          * @param _user Allows coins to be created and sent to other people
          * @return transaction ID which can be viewed in the pending mapping
          */
		_TransID=NewCoinInternal(_user,cast(msg.value),Action.NewRisk);
        //log0('NewRisk');
    }

    function RetRisk(uint128 _Quantity) 
			external 
			payable 
			LockIfUnwritten  
			returns (uint _TransID)  {
        /** @dev Returns Riskcoins.  Needs a bit of eth sent to pay the pricer contract and the excess is returned.  
		  * The address cannot be a contract, only a simple wallet (with 0 codesize).
          * @param _Quantity Amount of coins being returned
		  * @return transaction ID which can be viewed in the pending mapping
        */
        if(frozen){
            //Skip the pricer contract
            TransID++;
			ActionRetRisk(Trans(_Quantity,msg.sender,Action.RetRisk,0),TransID,lastPrice);
			_TransID=TransID;
        } else {
            //Only returned when Risk price is positive
			_TransID=RetCoinInternal(_Quantity,cast(msg.value),msg.sender,Action.RetRisk);
        }
		//log0('RetRisk');
    }

    function RetStatic(uint128 _Quantity) 
			external 
			payable 
			LockIfUnwritten  
			returns (uint _TransID)  {
        /** @dev Returns StatiCoins,  Needs a bit of eth sent to pay the pricer contract
          * @param _Quantity Amount of coins being returned
		  * @return transaction ID which can be viewed in the pending mapping
        */
        if(frozen){
            //Skip the pricer contract
			TransID++;
            ActionRetStatic(Trans(_Quantity,msg.sender,Action.RetStatic,0),TransID,lastPrice);
			_TransID=TransID;
        } else {
            //Static can be returned at any time
			_TransID=RetCoinInternal(_Quantity,cast(msg.value),msg.sender,Action.RetStatic);
        }
		//log0('RetStatic');
    }
	
	//****************************//
	// Constant functions (Ones that don't write to the blockchain)
	function uintToBytes32(uint input) returns(bytes32) {
		/** @dev Converts uint into bytes32
		 * @param input uint value
		  * @return bytes32
        */
		return bytes32(input);
	}
	
    function StaticEthAvailable() 
			constant 
			returns (uint128)  {
		/** @dev Returns the total amount of eth that can be sent to buy StatiCoins
		  * @return amount of Eth
        */
		return StaticEthAvailable(cast(Risk.totalSupply()), cast(this.balance));
    }

	function StaticEthAvailable(uint128 _RiskTotal, uint128 _TotalETH) 
			constant 
			returns (uint128)  {
		/** @dev Returns the total amount of eth that can be sent to buy StatiCoins allows users to test arbitrary amounts of RiskTotal and ETH contained in the contract
		  * @param _RiskTotal Quantity of riskcoins
          * @param  _TotalETH Total value of ETH in the contract
		  * @return amount of Eth
        */
		// (Multiplier+levToll)*_RiskTotal - _TotalETH
		uint128 temp = wmul(wadd(Multiplier,levToll),_RiskTotal);
		if(wless(_TotalETH,temp)){
			return wsub(temp ,_TotalETH);
		} else {
			return 0;
		}
    }

	function RiskPrice(uint128 _currentPrice,uint128 _StaticTotal,uint128 _RiskTotal, uint128 _ETHTotal) 
			constant 
			returns (uint128 price)  {
	    /** @dev Allows users to query various hypothetical prices of RiskCoins in terms of base currency
          * @param _currentPrice Current price of ETH in Base currency.
          * @param _StaticTotal Total quantity of StatiCoins issued.
          * @param _RiskTotal Total quantity of invetor coins issued.
          * @param _ETHTotal Total quantity of ETH in the contract.
          * @return price of RiskCoins 
        */
        if(_ETHTotal == 0 || _RiskTotal==0){
			//Return the default price of _currentPrice * Multiplier
            return wmul( _currentPrice , Multiplier); 
        } else {
            if(hmore( wmul(_ETHTotal , _currentPrice),_StaticTotal)){ //_ETHTotal*_currentPrice>_StaticTotal
				//Risk price is positive
                return wdiv(wsub(wmul(_ETHTotal , _currentPrice) , _StaticTotal) , _RiskTotal); // (_ETHTotal * _currentPrice) - _StaticTotal) / _RiskTotal
            } else  {
				//RiskPrice is negative
                return 0;
            }
        }       
    }

    function RiskPrice() 
			constant 
			returns (uint128 price)  {
	    /** @dev Allows users to query the last price of RiskCoins in terms of base currency
        *   @return price of RiskCoins 
        */
        return RiskPrice(lastPrice);
    }     	
	
    function RiskPrice(uint128 _currentPrice) 
			constant 
			returns (uint128 price)  {
	    /** @dev Allows users to query price of RiskCoins in terms of base currency, using current quantities of coins
          * @param _currentPrice Current price of ETH in Base currency.
	      * @return price of RiskCoins 
        */
        return RiskPrice(_currentPrice,cast(Static.totalSupply()),cast(Risk.totalSupply()),cast(this.balance));
    }     

	function Leverage() public 
			constant 
			returns (uint128)  {
		/** @dev Returns the ratio at which Riskcoin grows in value for the equivalent growth in ETH price
		* @return ratio
        */
        if(Risk.totalSupply()>0){
            return wdiv(cast(this.balance) , cast(Risk.totalSupply())); //  this.balance/Risk.totalSupply
        }else{
            return 0;
        }
    }

    function Strike() public 
			constant 
			returns (uint128)  {
		/** @dev Returns the current price at which the Risk price goes negative
		* @return Risk price in underlying per ETH
        */ 
        if(this.balance>0){
            return wdiv(cast(Static.totalSupply()) , cast(this.balance)); //Static.totalSupply / this.balance
        }else{
            return 0;            
        }
    }

	//****************************//
	// Only owner can access the following functions
    function setFee(uint128 _newFee) 
			onlyOwner {
        /** @dev Allows the minting fee to be changed, only owner can modify
          * @param _newFee Size of new fee
          * return nothing 
        */
        mintFee=_newFee;
    }

    function setCoins(address newRisk,address newStatic) 
			updates 
			onlyOwner 
			writeOnce {
        /** @dev Allows the minting fee to be reduced, only owner can modify once, Triggers the pricer to be updated 
          * @param newRisk Address of Riskcoin contract
          * @param newStatic Address of StatiCoin contract
          * return nothing 
        */
        Risk=I_coin(newRisk);
        Static=I_coin(newStatic);
		PRICER_DELAY = 2 days;
    }
	
	//****************************//	
	// Only Pricer can access the following function
    function PriceReturn(uint _TransID,uint128 _Price) 
			onlyPricer {
	    /** @dev Return function for the Pricer contract only.  Controls melting and minting of new coins.
          * @param _TransID Tranasction ID issued by the minter.
          * @param _Price Quantity of Base currency per ETH delivered by the Pricer contract
          * Nothing returned.  One of 4 functions is implemented
        */
	    Trans memory details=pending[_TransID][0];//Get the details for this transaction. 
        if(0==_Price||frozen){ //If there is an error in pricing or contract is frozen, use the old price
            _Price=lastPrice;
        } else {
			if(Static.totalSupply()>0 && Risk.totalSupply()>0) {// dont update if there are coins missing
				lastPrice=_Price; // otherwise update the last price
			}
        }
		//Mint some new StatiCoins
        if(Action.NewStatic==details.action){
            ActionNewStatic(details,_TransID, _Price);
        }
		//Melt some old StatiCoins
        if(Action.RetStatic==details.action){
            ActionRetStatic(details,_TransID, _Price);
        }
		//Mint some new Risk coins
        if(Action.NewRisk==details.action){
            ActionNewRisk(details,_TransID, _Price);
        }
		//Melt some old Risk coin
        if(Action.RetRisk==details.action){
            ActionRetRisk(details,_TransID, _Price);
        }
		//Remove the transaction from the blockchain (saving some gas)
		TransCompleted=_TransID;
		delete pending[_TransID];
    }
	
	//****************************//
    // Only internal functions now
    function ActionNewStatic(Trans _details, uint _TransID, uint128 _Price) 
			internal {
		/** @dev Internal function to create new StatiCoins based on transaction data in the Pending queue.  If not enough spare StatiCoins are available then ETH is refunded.
          * @param _details Structure holding the amount sent (in ETH), the address of the person to sent to, and the type of request.
          * @param _TransID ID of the transaction (as stored in this contract).
          * @param _Price Current 24 hour average price as returned by the oracle in the pricer contract.
          * @return function returns nothing, but adds StatiCoins to the users address and events are created
        */
		//log0('NewStatic');
            
            //if(Action.NewStatic<>_details.action){revert();}  //already checked
			
			uint128 CurRiskPrice=RiskPrice(_Price);
			uint128 AmountReturn;
			uint128 AmountMint;
			
			//Calculates the amount of ETH that can be added to create StatiCoins (excluding the amount already sent and stored in the contract)
			uint128 StaticAvail = StaticEthAvailable(cast(Risk.totalSupply()), wsub(cast(this.balance),PendingETH)); 
						
			// If the amount sent is less than the Static amount available, everything is fine.  Nothing needs to be returned.  
			if (wless(_details.amount,StaticAvail)) {
				// restrictions do not hamper the creation of a StatiCoin
				AmountMint = _details.amount;
				AmountReturn = 0;
			} else {
				// Amount of Static is less than amount requested.  
				// Take all the StatiCoins available.
				// Maybe there is zero Static available, so all will be returned.
				AmountMint = StaticAvail;
				AmountReturn = wsub(_details.amount , StaticAvail) ;
			}	
			
			if(0 == CurRiskPrice){
				// return all the ETH
				AmountReturn = _details.amount;
				//AmountMint = 0; //not required as Risk price = 0
			}
			
			//Static can be added when Risk price is positive and leverage is below the limit
            if(CurRiskPrice > 0  && StaticAvail>0 ){
                // Dont create if CurRiskPrice is 0 or there is no Static available (leverage is too high)
				//log0('leverageOK');
                Static.mintCoin(_details.holder, uint256(wmul(AmountMint , _Price))); //request coins from the Static creator contract
                EventCreateStatic(_details.holder, wmul(AmountMint , _Price), _TransID, _Price); // Event giving the holder address, coins created, transaction id, and price 
				PendingETH=wsub(PendingETH,AmountMint);
            } 

			if (AmountReturn>0) {
                // return some money because not enough StatiCoins are available
				bytes memory calldata; // define a blank `bytes`
                exec(_details.holder,calldata, AmountReturn);  //Refund ETH from this contract
				PendingETH=wsub(PendingETH,AmountReturn);
			}	
    }

    function ActionNewRisk(Trans _details, uint _TransID,uint128 _Price) 
			internal {
		/** @dev Internal function to create new Risk coins based on transaction data in the Pending queue.  Risk coins can only be created if the price is above zero
          * @param _details Structure holding the amount sent (in ETH), the address of the person to sent to, and the type of request.
          * @param _TransID ID of the transaction (as stored in this contract).
          * @param _Price Current 24 hour average price as returned by the oracle in the pricer contract.
          * @return function returns nothing, but adds Riskcoins to the users address and events are created
        */
        //log0('NewRisk');
        //if(Action.NewRisk<>_details.action){revert();}  //already checked
		// Get the Risk price using the amount of ETH in the contract before this transaction existed
		uint128 CurRiskPrice;
		if(wless(cast(this.balance),PendingETH)){
			CurRiskPrice=0;
		} else {
			CurRiskPrice=RiskPrice(_Price,cast(Static.totalSupply()),cast(Risk.totalSupply()),wsub(cast(this.balance),PendingETH));
		}
        if(CurRiskPrice>0){
            uint128 quantity=wdiv(wmul(_details.amount , _Price),CurRiskPrice);  // No of Riskcoins =  _details.amount * _Price / CurRiskPrice
            Risk.mintCoin(_details.holder, uint256(quantity) );  //request coins from the Riskcoin creator contract
            EventCreateRisk(_details.holder, quantity, _TransID, _Price); // Event giving the holder address, coins created, transaction id, and price 
        } else {
            // Don't create if CurRiskPrice is 0, Return all the ETH originally sent
            bytes memory calldata; // define a blank `bytes`
            exec(_details.holder,calldata, _details.amount);
        }
		PendingETH=wsub(PendingETH,_details.amount);
    }

    function ActionRetStatic(Trans _details, uint _TransID,uint128 _Price) 
			internal {
		/** @dev Internal function to Return StatiCoins based on transaction data in the Pending queue.  Static can be returned at any time.
          * @param _details Structure holding the amount sent (in ETH), the address of the person to sent to, and the type of request.
          * @param _TransID ID of the transaction (as stored in this contract).
          * @param _Price Current 24 hour average price as returned by the oracle in the pricer contract.
          * @return function returns nothing, but removes StatiCoins from the user's address, sends ETH and events are created
        */
		//if(Action.RetStatic<>_details.action){revert();}  //already checked
		//log0('RetStatic');
		uint128 _ETHReturned;
		if(0==Risk.totalSupply()){_Price=lastPrice;} //No Risk coins for balance so use fixed price
        _ETHReturned = wdiv(_details.amount , _Price); //_details.amount / _Price
        if (Static.meltCoin(_details.holder,_details.amount)){
            // deducted first, will add back if Returning ETH goes wrong.
            EventRedeemStatic(_details.holder,_details.amount ,_TransID, _Price);
            if (wless(cast(this.balance),_ETHReturned)) {
                 _ETHReturned=cast(this.balance);//Not enough ETH available.  Return all Eth in the contract
            }
			bytes memory calldata; // define a blank `bytes`
            if (tryExec(_details.holder, calldata, _ETHReturned)) { 
				//ETH returned successfully
			} else {
				// there was an error, so add back the amount previously deducted
				Static.mintCoin(_details.holder,_details.amount); //Add back the amount requested
				EventCreateStatic(_details.holder,_details.amount ,_TransID, _Price);  //redo the creation event
			}
			if ( 0==this.balance) {
				Bankrupt();
			}
        }        
    }

    function ActionRetRisk(Trans _details, uint _TransID,uint128 _Price) 
			internal {
		/** @dev Internal function to Return Riskcoins based on transaction data in the Pending queue.  Riskcoins can be returned so long as the Risk price is greater than 0.
          * @param _details Structure holding the amount sent (in ETH), the address of the person to sent to, and the type of request.
          * @param _TransID ID of the transaction (as stored in this contract).
          * @param _Price Current 24 hour average price as returned by the oracle in the Pricer contract.
          * @return function returns nothing, but removes StatiCoins from the users address, sends ETH and events are created
        */        
		//if(Action.RetRisk<>_details.action){revert();}  //already checked
		//log0('RetRisk');
        uint128 _ETHReturned;
		uint128 CurRiskPrice;
		//if(0==Static.totalSupply()){_Price=lastPrice};// no StatiCoins, so all Risk coins are worth the same.  // _ETHReturned = _details.amount / _RiskTotal * _ETHTotal
		CurRiskPrice=RiskPrice(_Price);
        if(CurRiskPrice>0){
            _ETHReturned = wdiv( wmul(_details.amount , CurRiskPrice) , _Price); // _details.amount * CurRiskPrice / _Price
            if (Risk.meltCoin(_details.holder,_details.amount )){
                // Coins are deducted first, will add back if returning ETH goes wrong.
                EventRedeemRisk(_details.holder,_details.amount ,_TransID, _Price);
                if ( wless(cast(this.balance),_ETHReturned)) { // should never happen, but just in case
                     _ETHReturned=cast(this.balance);
                }
				bytes memory calldata; // define a blank `bytes`
                if (tryExec(_details.holder, calldata, _ETHReturned)) { 
					//Returning ETH went ok.  
                } else {
                    // there was an error, so add back the amount previously deducted from the Riskcoin contract
                    Risk.mintCoin(_details.holder,_details.amount);
                    EventCreateRisk(_details.holder,_details.amount ,_TransID, _Price);
                }
            } 
        }  else {
            // Risk price is zero so can't do anything.  Call back and delete the transaction from the contract
        }
    }

	function IsWallet(address _address) 
			internal 
			returns(bool){
		/**
		* @dev checks that _address is not a contract.  
		* @param _address to check 
		* @return True if not a contract, 
		*/		
		uint codeLength;
		assembly {
            // Retrieve the size of the code on target address, this needs assembly .
            codeLength := extcodesize(_address)
        }
		return(0==codeLength);		
    } 

	function RetCoinInternal(uint128 _Quantity, uint128 _AmountETH, address _user, Action _action) 
			internal 
			updates 
			returns (uint _TransID)  {
        /** @dev Requests coins be melted and ETH returned
		  * @param _Quantity of Static or Risk coins to be melted0
		  * @param _AmountETH Amount of eth sent to this contract to cover oracle fee.  Excess is returned.
          * @param _user Address to whom the returned ETH will be sent.
		  * @param _action Allows Static or Risk coins to be returned
		  * @return transaction ID which can be viewed in the Pending mapping
        */
		require(IsWallet(_user));
		uint128 refund;
        uint128 Fee=pricer.queryCost();  //Get the cost of querying the pricer contract
		if(wless(_AmountETH,Fee)){
			revert();  //log0('Not enough ETH to mint');
			} else {
			refund=wsub(_AmountETH,Fee);//Returning coins has had too much ETH sent, so return it.
		}
		if(0==_Quantity){revert();}// quantity has to be non zero
		TransID++;
        
        uint PricerID = pricer.requestPrice.value(uint256(Fee))(TransID);  //Ask the pricer to get the price.  The Fee also cover calling the function PriceReturn at a later time.
		pending[TransID].push(Trans(_Quantity,_user,_action,PricerID));  //Add a transaction to the Pending queue.
        _TransID=TransID;  //return the transaction ID to the user 
        _user.transfer(uint256(refund)); //Return ETH if too much has been sent to cover the pricer
    }
		
	function NewCoinInternal(address _user, uint128 _amount, Action _action) 
			internal 
			updates 
			LockIfUnwritten 
			LockIfFrozen  
			returns (uint _TransID)  {
		/** @dev Requests new coins be made
          * @param _user Address for whom the coins are to be created
          * @param _amount Amount of eth sent to this contract
		  * @param _action Allows Static or Risk coins to be minted
		  * @return transaction ID which can be viewed in the pending mapping
        */
		require(IsWallet(_user));
		uint128 toCredit;
        uint128 Fee=wmax(wmul(_amount,mintFee),pricer.queryCost()); // fee is the maxium of the pricer query cost and a mintFee% of value sent
        if(wless(_amount,Fee)) revert(); //log0('Not enough ETH to mint');
		TransID++;
        uint PricerID = pricer.requestPrice.value(uint256(Fee))(TransID); //Ask the pricer to return the price
		toCredit=wsub(_amount,Fee);
		pending[TransID].push(Trans(toCredit,_user,_action,PricerID)); //Store the transaction ID and data ready for later recall
		PendingETH=wadd(PendingETH,toCredit);
        _TransID=TransID;//return the transaction ID for this contract to the user 		
	} 

    function Bankrupt() 
			internal {
			EventBankrupt();
			// Reset the contract
			Static.kill();  //delete all current Static tokens
			Risk.kill();  //delete all current Risk tokens
			//need to create new coins externally, too much gas is used if done here.  
			frozen=false;
			written=false;  // Reset the writeOnce and LockIfUnwritten modifiers
    }
}

    Contract ABI  
[{"constant":true,"inputs":[{"name":"_currentPrice","type":"uint128"},{"name":"_StaticTotal","type":"uint128"},{"name":"_RiskTotal","type":"uint128"},{"name":"_ETHTotal","type":"uint128"}],"name":"RiskPrice","outputs":[{"name":"price","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastPrice","outputs":[{"name":"","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"frozen","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"mintFee","outputs":[{"name":"","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"NewRisk","outputs":[{"name":"_TransID","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"TransCompleted","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newAddress","type":"address"}],"name":"setPricer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"Static","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newFee","type":"uint128"}],"name":"setFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_Quantity","type":"uint128"}],"name":"RetStatic","outputs":[{"name":"_TransID","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"Bailout","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"Leverage","outputs":[{"name":"","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_Quantity","type":"uint128"}],"name":"RetRisk","outputs":[{"name":"_TransID","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"newRisk","type":"address"},{"name":"newStatic","type":"address"}],"name":"setCoins","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"RiskPrice","outputs":[{"name":"price","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_currentPrice","type":"uint128"}],"name":"RiskPrice","outputs":[{"name":"price","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint128"},{"name":"y","type":"uint128"}],"name":"wsub","outputs":[{"name":"","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"Risk","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"Freeze","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"Currency","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint128"},{"name":"y","type":"uint128"}],"name":"wadd","outputs":[{"name":"","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"NewStatic","outputs":[{"name":"_TransID","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_user","type":"address"}],"name":"NewRiskAdr","outputs":[{"name":"_TransID","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"Strike","outputs":[{"name":"","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"input","type":"uint256"}],"name":"uintToBytes32","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"x","type":"uint128"},{"name":"y","type":"uint128"}],"name":"wmul","outputs":[{"name":"z","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"TransID","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_user","type":"address"}],"name":"NewStaticAdr","outputs":[{"name":"_TransID","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"future","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"name":"pending","outputs":[{"name":"amount","type":"uint128"},{"name":"holder","type":"address"},{"name":"action","type":"uint8"},{"name":"pricerID","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pricer","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"changeOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"levToll","outputs":[{"name":"","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"releaseTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_TransID","type":"uint256"},{"name":"_Price","type":"uint128"}],"name":"PriceReturn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"StaticEthAvailable","outputs":[{"name":"","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PRICER_DELAY","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_RiskTotal","type":"uint128"},{"name":"_TotalETH","type":"uint128"}],"name":"StaticEthAvailable","outputs":[{"name":"","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PendingETH","outputs":[{"name":"","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"Multiplier","outputs":[{"name":"","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_currency","type":"string"},{"name":"_Multiplier","type":"uint128"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":false,"stateMutability":"nonpayable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":false,"name":"_value","type":"uint128"},{"indexed":false,"name":"_transactionID","type":"uint256"},{"indexed":false,"name":"_Price","type":"uint256"}],"name":"EventCreateStatic","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":false,"name":"_value","type":"uint128"},{"indexed":false,"name":"_transactionID","type":"uint256"},{"indexed":false,"name":"_Price","type":"uint256"}],"name":"EventRedeemStatic","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":false,"name":"_value","type":"uint128"},{"indexed":false,"name":"_transactionID","type":"uint256"},{"indexed":false,"name":"_Price","type":"uint256"}],"name":"EventCreateRisk","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":false,"name":"_value","type":"uint128"},{"indexed":false,"name":"_transactionID","type":"uint256"},{"indexed":false,"name":"_Price","type":"uint256"}],"name":"EventRedeemRisk","type":"event"},{"anonymous":false,"inputs":[],"name":"EventBankrupt","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_timeChange","type":"uint256"}],"name":"EventAddressChange","type":"event"}]

  Contract Creation Code Switch To Opcodes View
60606040526000805461ff0060b060020a60ff0201191681556002600455600655600b80547706f05b59d3b20000000000000000000000000000000000006001608060020a03909116179055600c80546001608060020a03191666071afd498d000017905534156200007057600080fd5b60405162002d9d38038062002d9d833981016040528080518201919060200180519150505b5b5b6000805461ff00191690555b600080546201000060b060020a0319166201000033600160a060020a0316021790555b6008828051620000db92916020019062000100565b50600b80546001608060020a0319166001608060020a0383161790555b5050620001aa565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200014357805160ff191683800117855562000173565b8280016001018555821562000173579182015b828111156200017357825182559160200191906001019062000156565b5b506200018292915062000186565b5090565b620001a791905b808211156200018257600081556001016200018d565b5090565b90565b612be380620001ba6000396000f300606060405236156101d15763ffffffff60e060020a6000350416626f91d281146101e4578063053f14da14610231578063054f7d9c1461026057806313966db514610287578063199f4045146102b65780631c67a7aa146102d057806329390370146102f557806331b8b100146103165780633687f24a146103455780633cad71cf1461036657806343acd7bc1461038c57806343e0dfdd14610396578063450b6079146103c55780634863ed97146103eb5780634de4f479146104125780635040012814610441578063523d897e1461047c5780635f429ba5146104bd578063615acbae146104ec5780636942eac71461050157806369a046f21461058c5780637af0ed7e146105cd5780637e7388b1146105e757806381531c641461060d578063886d3db91461063c5780638f1eda371461066457806399eb975c146106a5578063a046c5f6146106ca578063a2ec258f146106f0578063a30a71711461071f578063a6138ed914610783578063a6f9dae1146107b2578063abbc5d2a146107d3578063b91d400114610802578063e5d02cd014610827578063ec4baa831461084b578063ed6b40c01461087a578063f1914dc51461089f578063fd2e9caf146108e0578063fd9b87631461090f575b34156101dc57600080fd5b5b600080fd5b005b34156101ef57600080fd5b6102156001608060020a036004358116906024358116906044358116906064351661093e565b6040516001608060020a03909116815260200160405180910390f35b341561023c57600080fd5b6102156109c9565b6040516001608060020a03909116815260200160405180910390f35b341561026b57600080fd5b6102736109d8565b604051901515815260200160405180910390f35b341561029257600080fd5b6102156109e8565b6040516001608060020a03909116815260200160405180910390f35b6102be6109f7565b60405190815260200160405180910390f35b34156102db57600080fd5b6102be610a13565b60405190815260200160405180910390f35b341561030057600080fd5b6101e2600160a060020a0360043516610a19565b005b341561032157600080fd5b610329610ab1565b604051600160a060020a03909116815260200160405180910390f35b341561035057600080fd5b6101e26001608060020a0360043516610ac0565b005b6102be6001608060020a0360043516610b07565b60405190815260200160405180910390f35b6101e2610baa565b005b34156103a157600080fd5b610215610bad565b6040516001608060020a03909116815260200160405180910390f35b6102be6001608060020a0360043516610cb4565b60405190815260200160405180910390f35b34156103f657600080fd5b6101e2600160a060020a0360043581169060243516610d57565b005b341561041d57600080fd5b610215610e12565b6040516001608060020a03909116815260200160405180910390f35b341561044c57600080fd5b6102156001608060020a0360043516610e30565b6040516001608060020a03909116815260200160405180910390f35b341561048757600080fd5b6102156001608060020a0360043581169060243516610f30565b6040516001608060020a03909116815260200160405180910390f35b34156104c857600080fd5b610329610f45565b604051600160a060020a03909116815260200160405180910390f35b34156104f757600080fd5b6101e2610f54565b005b341561050c57600080fd5b610514610f9c565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156105515780820151818401525b602001610538565b50505050905090810190601f16801561057e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561059757600080fd5b6102156001608060020a036004358116906024351661103a565b6040516001608060020a03909116815260200160405180910390f35b6102be61104f565b60405190815260200160405180910390f35b6102be600160a060020a036004351661106b565b60405190815260200160405180910390f35b341561061857600080fd5b610215611089565b6040516001608060020a03909116815260200160405180910390f35b341561064757600080fd5b6102be600435611138565b60405190815260200160405180910390f35b341561066f57600080fd5b6102156001608060020a036004358116906024351661113f565b6040516001608060020a03909116815260200160405180910390f35b34156106b057600080fd5b6102be611189565b60405190815260200160405180910390f35b6102be600160a060020a036004351661118f565b60405190815260200160405180910390f35b34156106fb57600080fd5b6103296111ad565b604051600160a060020a03909116815260200160405180910390f35b341561072a57600080fd5b6107386004356024356111bc565b6040516001608060020a0385168152600160a060020a03841660208201526040810183600381111561076657fe5b60ff16815260200182815260200194505050505060405180910390f35b341561078e57600080fd5b61032961121e565b604051600160a060020a03909116815260200160405180910390f35b34156107bd57600080fd5b6101e2600160a060020a036004351661122d565b005b34156107de57600080fd5b61021561127f565b6040516001608060020a03909116815260200160405180910390f35b341561080d57600080fd5b6102be611295565b60405190815260200160405180910390f35b341561083257600080fd5b6101e26004356001608060020a036024351661129b565b005b341561085657600080fd5b61021561153c565b6040516001608060020a03909116815260200160405180910390f35b341561088557600080fd5b6102be6115cc565b60405190815260200160405180910390f35b34156108aa57600080fd5b6102156001608060020a03600435811690602435166115d2565b6040516001608060020a03909116815260200160405180910390f35b34156108eb57600080fd5b610215611630565b6040516001608060020a03909116815260200160405180910390f35b341561091a57600080fd5b610215611646565b6040516001608060020a03909116815260200160405180910390f35b60006001608060020a038216158061095d57506001608060020a038316155b1561098057600b546109799086906001608060020a031661113f565b90506109bf565b61099361098d838761113f565b85611655565b156109bb576109796109ae6109a8848861113f565b86610f30565b8461166b565b90506109bf565b5060005b5b5b949350505050565b6005546001608060020a031681565b60005460b060020a900460ff1681565b600c546001608060020a031681565b6000610a0d33610a06346116be565b60026116d7565b90505b90565b60075481565b60005433600160a060020a0390811662010000909204161415610aac57600454420160038190556002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038481169190911791829055600154918116929116907f72511fb4cdbe5b0188562edd69ff06f12e0966e9246eefc6754e67ba0de954a69060405190815260200160405180910390a35b5b5b50565b600954600160a060020a031681565b60005433600160a060020a0390811662010000909204161415610aac57600c80546fffffffffffffffffffffffffffffffff19166001608060020a0383161790555b5b5b50565b60008054610100900460ff1615610ba25760005460b060020a900460ff1615610b8a57600680546001019055610b81608060405190810160409081526001608060020a0385168252600160a060020a0333166020830152810160015b815260006020909101526006546005546001608060020a03166119d3565b50600654610ba2565b610b9f82610b97346116be565b336001611cd7565b90505b5b5b5b919050565b5b565b600a546000908190600160a060020a03166318160ddd82604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610bf957600080fd5b6102c65a03f11515610c0a57600080fd5b505050604051805190501115610ca857610ca1610c3030600160a060020a0316316116be565b600a54610c9c90600160a060020a03166318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610c7c57600080fd5b6102c65a03f11515610c8d57600080fd5b505050604051805190506116be565b61166b565b9050610a10565b506000610a10565b5b90565b60008054610100900460ff1615610ba25760005460b060020a900460ff1615610d3757600680546001019055610b81608060405190810160409081526001608060020a0385168252600160a060020a0333166020830152810160035b815260006020909101526006546005546001608060020a0316611fa2565b50600654610ba2565b610b9f82610d44346116be565b336003611cd7565b90505b5b5b5b919050565b60035442118015610d795750600254600154600160a060020a03908116911614155b15610d8657610d8661223e565b5b60005433600160a060020a0390811662010000909204161415610e0957600054610100900460ff161515610e09576000805461ff001916610100179055600a8054600160a060020a0380851673ffffffffffffffffffffffffffffffffffffffff199283161790925560098054928416929091169190911790556202a3006004555b5b5b5b5b5b5050565b600554600090610a0d906001608060020a0316610e30565b90505b90565b600954600090610b9f908390610ea490600160a060020a03166318160ddd85604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610c7c57600080fd5b6102c65a03f11515610c8d57600080fd5b505050604051805190506116be565b600a54610f1090600160a060020a03166318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610c7c57600080fd5b6102c65a03f11515610c8d57600080fd5b505050604051805190506116be565b610f2330600160a060020a0316316116be565b61093e565b90505b919050565b6000610f3c8383612290565b90505b92915050565b600a54600160a060020a031681565b60005433600160a060020a0390811662010000909204161415610baa576000805476ff00000000000000000000000000000000000000000000191660b060020a1790555b5b5b565b60088054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110325780601f1061100757610100808354040283529160200191611032565b820191906000526020600020905b81548152906001019060200180831161101557829003601f168201915b505050505081565b6000610f3c83836122b3565b90505b92915050565b6000610a0d3361105e346116be565b60006116d7565b90505b90565b6000610b9f82610a06346116be565b60026116d7565b90505b919050565b60008030600160a060020a0316311115610ca857600954610ca19061110d90600160a060020a03166318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610c7c57600080fd5b6102c65a03f11515610c8d57600080fd5b505050604051805190506116be565b610c9c30600160a060020a0316316116be565b61166b565b9050610a10565b506000610a10565b5b90565b805b919050565b6000610f3c670de0b6b3a76400006002815b046001608060020a0316846001608060020a0316866001608060020a0316020181151561117a57fe5b046116be565b90505b92915050565b60065481565b6000610b9f8261105e346116be565b60006116d7565b90505b919050565b600254600160a060020a031681565b600d602052816000526040600020818154811015156111d757fe5b906000526020600020906003020160005b50805460018201546002909201546001608060020a039091169350600160a060020a038216925060a060020a90910460ff169084565b600154600160a060020a031681565b60005433600160a060020a0390811662010000909204161415610aac576000805475ffffffffffffffffffffffffffffffffffffffff0000191662010000600160a060020a038416021790555b5b5b50565b600b54608060020a90046001608060020a031681565b60035481565b6112a3612ac8565b60015433600160a060020a0390811691161415611534576000838152600d60205260408120805490919081106112d557fe5b906000526020600020906003020160005b506080604051908101604090815282546001608060020a031682526001830154600160a060020a03811660208401529192919083019060a060020a900460ff16600381111561133157fe5b600381111561133c57fe5b81526020016002820154815250509050816001608060020a03166000148061136d575060005460b060020a900460ff165b15611385576005546001608060020a03169150611483565b600954600090600160a060020a03166318160ddd82604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156113cf57600080fd5b6102c65a03f115156113e057600080fd5b505050604051805190501180156114595750600a54600090600160a060020a03166318160ddd82604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561143c57600080fd5b6102c65a03f1151561144d57600080fd5b50505060405180519050115b1561148357600580546fffffffffffffffffffffffffffffffff19166001608060020a0384161790555b5b8060400151600381111561149457fe5b60005b14156114a8576114a88184846122d6565b5b806040015160038111156114b957fe5b60015b14156114cd576114cd8184846119d3565b5b806040015160038111156114de57fe5b60025b14156114f2576114f28184846125b6565b5b8060400151600381111561150357fe5b60035b141561151757611517818484611fa2565b5b60078390556000838152600d6020526040812061153491612af3565b5b5b5b505050565b600a54600090610a0d906115ae90600160a060020a03166318160ddd84604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610c7c57600080fd5b6102c65a03f11515610c8d57600080fd5b505050604051805190506116be565b6115c130600160a060020a0316316116be565b6115d2565b90505b90565b60045481565b600b546000908190611601906115fb906001608060020a0380821691608060020a90041661103a565b8561113f565b905061160d8382612894565b156116235761161c8184610f30565b9150611628565b600091505b5b5092915050565b600554608060020a90046001608060020a031681565b600b546001608060020a031681565b6001608060020a03808216908316115b92915050565b6000610f3c6001608060020a0383166002815b046001608060020a0316670de0b6b3a76400006001608060020a0316866001608060020a0316020181151561117a57fe5b046116be565b90505b92915050565b806001608060020a0381168114610ba257fe5b5b919050565b600080600080600354421180156116ff5750600254600154600160a060020a03908116911614155b1561170c5761170c61223e565b5b600054610100900460ff16156119c45760005460b060020a900460ff1615156119c457611739876128a9565b151561174457600080fd5b600c546117c79061175f9088906001608060020a031661113f565b600154600160a060020a031663fd557d396000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b15156117a757600080fd5b6102c65a03f115156117b857600080fd5b505050604051805190506128b5565b91506117d38683612894565b156117dd57600080fd5b6006805460019081019182905554600160a060020a03169063cd7c92e3906001608060020a0385169060006040516020015260405160e060020a63ffffffff851602815260048101919091526024016020604051808303818588803b151561184457600080fd5b6125ee5a03f1151561185557600080fd5b5050505060405180519050905061186c8683610f30565b6006546000908152600d60205260409020805491945090600181016118918382612b18565b916000526020600020906003020160005b608060405190810160405280876001608060020a031681526020018b600160a060020a031681526020018960038111156118d857fe5b8152602001859052919050815181546fffffffffffffffffffffffffffffffff19166001608060020a0391909116178155602082015160018201805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055604082015160018201805474ff0000000000000000000000000000000000000000191660a060020a83600381111561197157fe5b0217905550606082015160029091015550506005546119a1906001608060020a03608060020a909104168461103a565b600580546001608060020a03928316608060020a02921691909117905560065493505b5b5b5b5b5b5050509392505050565b60006119dd612b4a565b600a54600160a060020a03166318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611a2557600080fd5b6102c65a03f11515611a3657600080fd5b505050604051805115159050611a55576005546001608060020a031692505b611a6085518461166b565b600954909250600160a060020a0316633188da5f6020870151875160006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526001608060020a03166024820152604401602060405180830381600087803b1515611ad057600080fd5b6102c65a03f11515611ae157600080fd5b5050506040518051905015611ccd578460200151600160a060020a03167f6fd7c035b051359dd43c2afdd6a7cd91e94ff855b47178226114ae6ad62019158651868660405180846001608060020a03166001608060020a03168152602001838152602001826001608060020a03168152602001935050505060405180910390a2611b7d611b7730600160a060020a0316316116be565b83612894565b15611b9857611b9530600160a060020a0316316116be565b91505b611bb0856020015182846001608060020a03166128ca565b15611bba57611cb4565b600954600160a060020a031663ec1553d16020870151875160006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526001608060020a03166024820152604401602060405180830381600087803b1515611c2757600080fd5b6102c65a03f11515611c3857600080fd5b505050604051805150506020850151600160a060020a03167fb0acd745b723702a9bfc3ecc8b4646c5ac97f4e1e23159ef5d4f1d9e4a5bc20d8651868660405180846001608060020a03166001608060020a03168152602001838152602001826001608060020a03168152602001935050505060405180910390a25b600160a060020a033016311515611ccd57611ccd612976565b5b5b5b5050505050565b60008060008060035442118015611cff5750600254600154600160a060020a03908116911614155b15611d0c57611d0c61223e565b5b611d16866128a9565b1515611d2157600080fd5b600154600160a060020a031663fd557d396000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515611d6957600080fd5b6102c65a03f11515611d7a57600080fd5b505050604051805190509150611d908783612894565b15611d9a57600080fd5b611da48783610f30565b92505b6001608060020a0388161515611dbc57600080fd5b6006805460019081019182905554600160a060020a03169063cd7c92e3906001608060020a0385169060006040516020015260405160e060020a63ffffffff851602815260048101919091526024016020604051808303818588803b1515611e2357600080fd5b6125ee5a03f11515611e3457600080fd5b5050505060405180516006546000908152600d602052604090208054919350915060018101611e638382612b18565b916000526020600020906003020160005b6080604051908101604052808c6001608060020a031681526020018a600160a060020a03168152602001896003811115611eaa57fe5b8152602001859052919050815181546fffffffffffffffffffffffffffffffff19166001608060020a0391909116178155602082015160018201805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055604082015160018201805474ff0000000000000000000000000000000000000000191660a060020a836003811115611f4357fe5b0217905550606082015160029091015550506006549350600160a060020a0386166001608060020a03841680156108fc0290604051600060405180830381858888f193505050501515611f9557600080fd5b5b5b505050949350505050565b600080611fad612b4a565b611fb684610e30565b91506000826001608060020a0316111561223257611fde611fd887518461113f565b8561166b565b600a54909350600160a060020a0316633188da5f6020880151885160006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526001608060020a03166024820152604401602060405180830381600087803b151561204e57600080fd5b6102c65a03f1151561205f57600080fd5b5050506040518051905015612232578560200151600160a060020a03167f2bf29ddb760902da82c4a7d4c99ea87ebe386522729cd506a4132616a2d31d498751878760405180846001608060020a03166001608060020a03168152602001838152602001826001608060020a03168152602001935050505060405180910390a26120fb6120f530600160a060020a0316316116be565b84612894565b156121165761211330600160a060020a0316316116be565b92505b61212e866020015182856001608060020a03166128ca565b1561213857612232565b600a54600160a060020a031663ec1553d16020880151885160006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526001608060020a03166024820152604401602060405180830381600087803b15156121a557600080fd5b6102c65a03f115156121b657600080fd5b505050604051805150506020860151600160a060020a03167f4767d305988b74d0d1c7ee0df66fa1609b9c4602fda0a1bf8a62525e4a8712878751878760405180846001608060020a03166001608060020a03168152602001838152602001826001608060020a03168152602001935050505060405180910390a25b5b5b5b5b505050505050565b6002546001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911790556000805476ff00000000000000000000000000000000000000000000191690555b565b8082036001608060020a038084169082161115610f3f57600080fd5b5b92915050565b8082016001608060020a038084169082161015610f3f57600080fd5b5b92915050565b6000806000806122e4612b4a565b6122ed86610e30565b600a549095506123939061236090600160a060020a03166318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610c7c57600080fd5b6102c65a03f11515610c8d57600080fd5b505050604051805190506116be565b6115c161237630600160a060020a0316316116be565b600554608060020a90046001608060020a0316610f30565b6115d2565b91506123a0885183612894565b156123b25787519250600093506123c6565b8192506123c3886000015183610f30565b93505b6001608060020a03851615156123db57875193505b6000856001608060020a03161180156123fd57506000826001608060020a0316115b1561254657600954600160a060020a031663ec1553d160208a0151612422868a61113f565b6001608060020a031660006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561247757600080fd5b6102c65a03f1151561248857600080fd5b505050604051805150506020880151600160a060020a03167fb0acd745b723702a9bfc3ecc8b4646c5ac97f4e1e23159ef5d4f1d9e4a5bc20d6124cb858961113f565b898960405180846001608060020a03166001608060020a03168152602001838152602001826001608060020a03168152602001935050505060405180910390a260055461252890608060020a90046001608060020a031684610f30565b600580546001608060020a03928316608060020a0292169190911790555b6000846001608060020a031611156125ab57612570886020015182866001608060020a0316612a6c565b60055461258d90608060020a90046001608060020a031685610f30565b600580546001608060020a03928316608060020a0292169190911790555b5b5050505050505050565b6000806125c1612b4a565b6125ef6125d730600160a060020a0316316116be565b600554608060020a90046001608060020a0316612894565b156125fd5760009250612711565b60095461270e90859061266f90600160a060020a03166318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610c7c57600080fd5b6102c65a03f11515610c8d57600080fd5b505050604051805190506116be565b600a546126db90600160a060020a03166318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610c7c57600080fd5b6102c65a03f11515610c8d57600080fd5b505050604051805190506116be565b610f2361237630600160a060020a0316316116be565b600554608060020a90046001608060020a0316610f30565b61093e565b92505b6000836001608060020a03161115612836576127376109ae87518661113f565b8461166b565b600a54909250600160a060020a031663ec1553d16020880151846001608060020a031660006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156127a657600080fd5b6102c65a03f115156127b757600080fd5b505050604051805150506020860151600160a060020a03167f4767d305988b74d0d1c7ee0df66fa1609b9c4602fda0a1bf8a62525e4a87128783878760405180846001608060020a03166001608060020a03168152602001838152602001826001608060020a03168152602001935050505060405180910390a261284f565b61284f86602001518288516001608060020a0316612a6c565b5b60055461286e90608060020a90046001608060020a03168751610f30565b600580546001608060020a03928316608060020a0292169190911790555b505050505050565b6000610f3c8383612a85565b90505b92915050565b803b8015905b50919050565b6000610f3c8383612a9b565b90505b92915050565b6000805460ff16156128d857fe5b6000805460ff19166001179055600160a060020a038416828460405180828051906020019080838360005b8381101561291c5780820151818401525b602001612903565b50505050905090810190601f1680156129495780820380516001836020036101000a031916815260200191505b5091505060006040518083038185876187965a03f193505050505b6000805460ff191690555b9392505050565b7f1e8b0d0312f1460e51ac6b837afad37961ea4017b27d965346bda0e1df6c78c260405160405180910390a1600954600160a060020a03166341c0e1b56040518163ffffffff1660e060020a028152600401600060405180830381600087803b15156129e157600080fd5b6102c65a03f115156129f257600080fd5b5050600a54600160a060020a031690506341c0e1b56040518163ffffffff1660e060020a028152600401600060405180830381600087803b1515612a3557600080fd5b6102c65a03f11515612a4657600080fd5b50506000805476ff0000000000000000000000000000000000000000ff0019169055505b565b612a778383836128ca565b151561153457fe5b5b505050565b6001608060020a03808216908316105b92915050565b6000816001608060020a0316836001608060020a03161015612abd5781610f3c565b825b90505b92915050565b60806040519081016040908152600080835260208301819052908201905b8152602001600081525090565b5080546000825560030290600052602060002090810190610aac9190612b5c565b5b50565b815481835581811511611534576003028160030283600052602060002091820191016115349190612b5c565b5b505050565b60206040519081016040526000815290565b610a1091905b80821115612bb05780546fffffffffffffffffffffffffffffffff1916815560018101805474ffffffffffffffffffffffffffffffffffffffffff1916905560006002820155600301612b62565b5090565b905600a165627a7a723058207e7d3792989cc1f4dc256a7af49d1079967f85cbf547f488e1a2c66b50942a640029000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000014d1120d7b160000000000000000000000000000000000000000000000000000000000000000000d455448555344204d696e74657200000000000000000000000000000000000000

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

-----Decoded View---------------
Found 4 constructor arguments :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 00000000000000000000000000000000000000000000000014d1120d7b160000
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000d
Arg [3] : 455448555344204d696e74657200000000000000000000000000000000000000


   Swarm Source:
bzzr://7e7d3792989cc1f4dc256a7af49d1079967f85cbf547f488e1a2c66b50942a64

 

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward