Latest 12 txns

TxHash Age From To Value [TxFee]
0xa6e6f8d94bbc158b3bd2ca5d7ded80517f205f30691e2970ad8635a32089bc9013 days 13 hrs ago0x51447ce0a502366658168bf5aaf96f51d22adcee  IN   0x073d230a53bffc8295d9a5247296213298e3fbcf0 Ether0.0002818343
0xc0f197044a519777d5671779963edd3783cff711b579e3479f40276cbdd1a99d13 days 13 hrs ago0x51447ce0a502366658168bf5aaf96f51d22adcee  IN   0x073d230a53bffc8295d9a5247296213298e3fbcf0 Ether0.000113916
0x3cea90274eec1cf3e57dad1d8e8710b0591b1272e05aa2aa81bdfb9d83888a0d21 days 14 hrs ago0x51447ce0a502366658168bf5aaf96f51d22adcee  IN   0x073d230a53bffc8295d9a5247296213298e3fbcf0 Ether0.0160843
0xd1d943f5630baf2766dd74a7c6a7a7dbde39ce2ba1a96f0a303839771b46772d21 days 15 hrs ago0x51447ce0a502366658168bf5aaf96f51d22adcee  IN   0x073d230a53bffc8295d9a5247296213298e3fbcf0 Ether0.01878251
0x43c5cb822be5c2de66e614ad0d179ad9b468d44bf2429353b9075add8b43b06825 days 14 hrs ago0xb3cdb4bc55adf9b307bdd54a9714ba2b73510128  IN   0x073d230a53bffc8295d9a5247296213298e3fbcf0 Ether0.0002500993
0x883f98060d189c8c55bf3319dc4c7fd79680e482641026b58d2fb65a80cbdde025 days 14 hrs ago0xb3cdb4bc55adf9b307bdd54a9714ba2b73510128  IN   0x073d230a53bffc8295d9a5247296213298e3fbcf0 Ether0.0000504625
0xf2a4b9a9b1027bdf39aaf44999a8148fa7488312df0550c8d73fe9dbe66dd40625 days 15 hrs ago0xf9196f9f176fd2ef9243e8960817d5fbe63d79aa  IN   0x073d230a53bffc8295d9a5247296213298e3fbcf0 Ether0.000046048
0x0ccd763a73bf316111dcfd7a13de9478ad9f3f03b6a47804684f12ef0cde467d25 days 15 hrs ago0xf9196f9f176fd2ef9243e8960817d5fbe63d79aa  IN   0x073d230a53bffc8295d9a5247296213298e3fbcf0 Ether0.000046048
0x61947e1ad6338b4b263490a8616b4065a1bd66bc28e74bc7297533bbcdbed19725 days 15 hrs ago0xf9196f9f176fd2ef9243e8960817d5fbe63d79aa  IN   0x073d230a53bffc8295d9a5247296213298e3fbcf0 Ether0.000046048
0xd3e26d5c75a9e21a78b053e4ad150388fbfe02520420eb228cf98f23c337e56e25 days 15 hrs ago0xf9196f9f176fd2ef9243e8960817d5fbe63d79aa  IN   0x073d230a53bffc8295d9a5247296213298e3fbcf0 Ether0.000045984
0x0cb0329fad2a518b9246cb0b8757f85ba8beb7c29b32e847827e033dd522fa0425 days 15 hrs ago0xf9196f9f176fd2ef9243e8960817d5fbe63d79aa  IN   0x073d230a53bffc8295d9a5247296213298e3fbcf0 Ether0.000030815
0x772ac489466d975e00b2d833a5735223d087a726a8be5c7ebefb289cd59216f825 days 15 hrs ago0xf9196f9f176fd2ef9243e8960817d5fbe63d79aa  IN    Contract Creation0 Ether0.00187889
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 7 Internal Transactions

ParentTxHash Block Age From To Value
0xa6e6f8d94bbc158b3bd2ca5d7ded80517f205f30691e2970ad8635a32089bc90495528813 days 13 hrs ago0x073d230a53bffc8295d9a5247296213298e3fbcf0xf8f7582578e7c130df84dd7dbb0d8517b6cd40270 Ether
0xa6e6f8d94bbc158b3bd2ca5d7ded80517f205f30691e2970ad8635a32089bc90495528813 days 13 hrs ago0x073d230a53bffc8295d9a5247296213298e3fbcf0x75445e9747a37728e5a7edcf3cd7269c1015efd40 Ether
0xa6e6f8d94bbc158b3bd2ca5d7ded80517f205f30691e2970ad8635a32089bc90495528813 days 13 hrs ago0x073d230a53bffc8295d9a5247296213298e3fbcf0x25ac60fbd008577bdea7cdb5ec6388d6f21546b00 Ether
0xc0f197044a519777d5671779963edd3783cff711b579e3479f40276cbdd1a99d495526313 days 13 hrs ago0x073d230a53bffc8295d9a5247296213298e3fbcf0x25ac60fbd008577bdea7cdb5ec6388d6f21546b00 Ether
0x43c5cb822be5c2de66e614ad0d179ad9b468d44bf2429353b9075add8b43b068488122525 days 14 hrs ago0x073d230a53bffc8295d9a5247296213298e3fbcf0xf8f7582578e7c130df84dd7dbb0d8517b6cd40270 Ether
0x43c5cb822be5c2de66e614ad0d179ad9b468d44bf2429353b9075add8b43b068488122525 days 14 hrs ago0x073d230a53bffc8295d9a5247296213298e3fbcf0x0f4a7e2a4d158ca3fe3db60862cb7f24f55e4fe00 Ether
0x43c5cb822be5c2de66e614ad0d179ad9b468d44bf2429353b9075add8b43b068488122525 days 14 hrs ago0x073d230a53bffc8295d9a5247296213298e3fbcf0x25ac60fbd008577bdea7cdb5ec6388d6f21546b00 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Exact Match)
Contract Name: OrderGateway
Compiler Version: v0.5.1+commit.c8a2cb62
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity 0.5.1;
pragma experimental ABIEncoderV2;

/**
 * @dev Standard interface for a dex proxy contract.
 */
interface Proxy {

  /**
   * @dev Executes an action.
   * @param _target Target of execution.
   * @param _a Address usually represention from.
   * @param _b Address usually representing to.
   * @param _c Integer usually repersenting amount/value/id.
   */
  function execute(
    address _target,
    address _a,
    address _b,
    uint256 _c
  )
    external;
    
}

/**
 * @dev Math operations with safety checks that throw on error. This contract is based on the 
 * source code at: 
 * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol.
 */
library SafeMath
{

  /**
   * @dev Error constants.
   */
  string constant OVERFLOW = "008001";
  string constant SUBTRAHEND_GREATER_THEN_MINUEND = "008002";
  string constant DIVISION_BY_ZERO = "008003";

  /**
   * @dev Multiplies two numbers, reverts on overflow.
   * @param _factor1 Factor number.
   * @param _factor2 Factor number.
   * @return The product of the two factors.
   */
  function mul(
    uint256 _factor1,
    uint256 _factor2
  )
    internal
    pure
    returns (uint256 product)
  {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (_factor1 == 0)
    {
      return 0;
    }

    product = _factor1 * _factor2;
    require(product / _factor1 == _factor2, OVERFLOW);
  }

  /**
   * @dev Integer division of two numbers, truncating the quotient, reverts on division by zero.
   * @param _dividend Dividend number.
   * @param _divisor Divisor number.
   * @return The quotient.
   */
  function div(
    uint256 _dividend,
    uint256 _divisor
  )
    internal
    pure
    returns (uint256 quotient)
  {
    // Solidity automatically asserts when dividing by 0, using all gas.
    require(_divisor > 0, DIVISION_BY_ZERO);
    quotient = _dividend / _divisor;
    // assert(_dividend == _divisor * quotient + _dividend % _divisor); // There is no case in which this doesn't hold.
  }

  /**
   * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
   * @param _minuend Minuend number.
   * @param _subtrahend Subtrahend number.
   * @return Difference.
   */
  function sub(
    uint256 _minuend,
    uint256 _subtrahend
  )
    internal
    pure
    returns (uint256 difference)
  {
    require(_subtrahend <= _minuend, SUBTRAHEND_GREATER_THEN_MINUEND);
    difference = _minuend - _subtrahend;
  }

  /**
   * @dev Adds two numbers, reverts on overflow.
   * @param _addend1 Number.
   * @param _addend2 Number.
   * @return Sum.
   */
  function add(
    uint256 _addend1,
    uint256 _addend2
  )
    internal
    pure
    returns (uint256 sum)
  {
    sum = _addend1 + _addend2;
    require(sum >= _addend1, OVERFLOW);
  }

  /**
    * @dev Divides two numbers and returns the remainder (unsigned integer modulo), reverts when
    * dividing by zero.
    * @param _dividend Number.
    * @param _divisor Number.
    * @return Remainder.
    */
  function mod(
    uint256 _dividend,
    uint256 _divisor
  )
    internal
    pure
    returns (uint256 remainder) 
  {
    require(_divisor != 0, DIVISION_BY_ZERO);
    remainder = _dividend % _divisor;
  }

}

/**
 * @title Contract for setting abilities.
 * @dev For optimization purposes the abilities are represented as a bitfield. Maximum number of
 * abilities is therefore 256. This is an example(for simplicity is made for max 8 abilities) of how
 * this works. 
 * 00000001 Ability A - number representation 1
 * 00000010 Ability B - number representation 2
 * 00000100 Ability C - number representation 4
 * 00001000 Ability D - number representation 8
 * 00010000 Ability E - number representation 16
 * etc ... 
 * To grant abilities B and C, we would need a bitfield of 00000110 which is represented by number
 * 6, in other words, the sum of abilities B and C. The same concept works for revoking abilities
 * and checking if someone has multiple abilities.
 */
contract Abilitable
{
  using SafeMath for uint;

  /**
   * @dev Error constants.
   */
  string constant NOT_AUTHORIZED = "017001";
  string constant ONE_ZERO_ABILITY_HAS_TO_EXIST = "017002";
  string constant INVALID_INPUT = "017003";

  /**
   * @dev Ability 1 is a reserved ability. It is an ability to grant or revoke abilities. 
   * There can be minimum of 1 address with ability 1.
   * Other abilities are determined by implementing contract.
   */
  uint8 constant ABILITY_TO_MANAGE_ABILITIES = 1;

  /**
   * @dev Maps address to ability ids.
   */
  mapping(address => uint256) public addressToAbility;

  /**
   * @dev Count of zero ability addresses.
   */
  uint256 private zeroAbilityCount;

  /**
   * @dev Emits when an address is granted an ability.
   * @param _target Address to which we are granting abilities.
   * @param _abilities Number representing bitfield of abilities we are granting.
   */
  event GrantAbilities(
    address indexed _target,
    uint256 indexed _abilities
  );

  /**
   * @dev Emits when an address gets an ability revoked.
   * @param _target Address of which we are revoking an ability.
   * @param _abilities Number representing bitfield of abilities we are revoking.
   */
  event RevokeAbilities(
    address indexed _target,
    uint256 indexed _abilities
  );

  /**
   * @dev Guarantees that msg.sender has certain abilities.
   */
  modifier hasAbilities(
    uint256 _abilities
  ) 
  {
    require(
      _abilities > 0 && (addressToAbility[msg.sender] & _abilities) == _abilities,
      NOT_AUTHORIZED
    );
    _;
  }

  /**
   * @dev Contract constructor.
   * Sets ABILITY_TO_MANAGE_ABILITIES ability to the sender account.
   */
  constructor()
    public
  {
    addressToAbility[msg.sender] = ABILITY_TO_MANAGE_ABILITIES;
    zeroAbilityCount = 1;
    emit GrantAbilities(msg.sender, ABILITY_TO_MANAGE_ABILITIES);
  }

  /**
   * @dev Grants specific abilities to specified address.
   * @param _target Address to grant abilities to.
   * @param _abilities Number representing bitfield of abilities we are granting.
   */
  function grantAbilities(
    address _target,
    uint256 _abilities
  )
    external
    hasAbilities(ABILITY_TO_MANAGE_ABILITIES)
  {
    addressToAbility[_target] |= _abilities;

    if((_abilities & ABILITY_TO_MANAGE_ABILITIES) == ABILITY_TO_MANAGE_ABILITIES)
    {
      zeroAbilityCount = zeroAbilityCount.add(1);
    }
    emit GrantAbilities(_target, _abilities);
  }

  /**
   * @dev Assigns specific abilities to specified address.
   * @param _target Address of which we revoke abilites.
   * @param _abilities Number representing bitfield of abilities we are revoking.
   */
  function revokeAbilities(
    address _target,
    uint256 _abilities
  )
    external
    hasAbilities(ABILITY_TO_MANAGE_ABILITIES)
  {
    addressToAbility[_target] &= ~_abilities;
    if((_abilities & 1) == 1)
    {
      require(zeroAbilityCount > 1, ONE_ZERO_ABILITY_HAS_TO_EXIST);
      zeroAbilityCount--;
    }
    emit RevokeAbilities(_target, _abilities);
  }

  /**
   * @dev Check if an address has a specific ability. Throws if checking for 0.
   * @param _target Address for which we want to check if it has a specific abilities.
   * @param _abilities Number representing bitfield of abilities we are checking.
   */
  function isAble(
    address _target,
    uint256 _abilities
  )
    external
    view
    returns (bool)
  {
    require(_abilities > 0, INVALID_INPUT);
    return (addressToAbility[_target] & _abilities) == _abilities;
  }
  
}

/**
 * @dev Xcert interface.
 */
interface Xcert // is ERC721 metadata enumerable
{

  /**
   * @dev Creates a new Xcert.
   * @param _to The address that will own the created Xcert.
   * @param _id The Xcert to be created by the msg.sender.
   * @param _imprint Cryptographic asset imprint.
   */
  function create(
    address _to,
    uint256 _id,
    bytes32 _imprint
  )
    external;

  /**
   * @dev Change URI base.
   * @param _uriBase New uriBase.
   */
  function setUriBase(
    string calldata _uriBase
  )
    external;

  /**
   * @dev Returns a bytes4 of keccak256 of json schema representing 0xcert protocol convention.
   * @return Schema id.
   */
  function schemaId()
    external
    view
    returns (bytes32 _schemaId);

  /**
   * @dev Returns imprint for Xcert.
   * @param _tokenId Id of the Xcert.
   * @return Token imprint.
   */
  function tokenImprint(
    uint256 _tokenId
  )
    external
    view
    returns(bytes32 imprint);

}

/**
 * @title XcertCreateProxy - creates a token on behalf of contracts that have been approved via
 * decentralized governance.
 */
contract XcertCreateProxy is 
  Abilitable 
{

  /**
   * @dev List of abilities:
   * 2 - Ability to execute create. 
   */
  uint8 constant ABILITY_TO_EXECUTE = 2;

  /**
   * @dev Creates a new NFT.
   * @param _xcert Address of the Xcert contract on which the creation will be perfomed.
   * @param _to The address that will own the created NFT.
   * @param _id The NFT to be created by the msg.sender.
   * @param _imprint Cryptographic asset imprint.
   */
  function create(
    address _xcert,
    address _to,
    uint256 _id,
    bytes32 _imprint
  )
    external
    hasAbilities(ABILITY_TO_EXECUTE)
  {
    Xcert(_xcert).create(_to, _id, _imprint);
  }
  
}

/**
 * @dev Decentralize exchange, creating, updating and other actions for fundgible and non-fundgible 
 * tokens powered by atomic swaps. 
 */
contract OrderGateway is
  Abilitable
{

  /**
   * @dev List of abilities:
   * 1 - Ability to set proxies.
   */
  uint8 constant ABILITY_TO_SET_PROXIES = 2;

  /**
   * @dev Xcert abilities.
   */
  uint8 constant ABILITY_ALLOW_CREATE_ASSET = 32;

  /**
   * @dev Error constants.
   */
  string constant INVALID_SIGNATURE_KIND = "015001";
  string constant INVALID_PROXY = "015002";
  string constant TAKER_NOT_EQUAL_TO_SENDER = "015003";
  string constant SENDER_NOT_TAKER_OR_MAKER = "015004";
  string constant CLAIM_EXPIRED = "015005";
  string constant INVALID_SIGNATURE = "015006";
  string constant ORDER_CANCELED = "015007";
  string constant ORDER_ALREADY_PERFORMED = "015008";
  string constant MAKER_NOT_EQUAL_TO_SENDER = "015009";
  string constant SIGNER_NOT_AUTHORIZED = "015010";

  /**
   * @dev Enum of available signature kinds.
   * @param eth_sign Signature using eth sign.
   * @param trezor Signature from Trezor hardware wallet.
   * It differs from web3.eth_sign in the encoding of message length
   * (Bitcoin varint encoding vs ascii-decimal, the latter is not
   * self-terminating which leads to ambiguities).
   * See also:
   * https://en.bitcoin.it/wiki/Protocol_documentation#Variable_length_integer
   * https://github.com/trezor/trezor-mcu/blob/master/firmware/ethereum.c#L602
   * https://github.com/trezor/trezor-mcu/blob/master/firmware/crypto.c#L36 
   * @param eip721 Signature using eip721.
   */
  enum SignatureKind
  {
    eth_sign,
    trezor,
    eip712
  }

  /**
   * Enum of available action kinds.
   */
  enum ActionKind
  {
    create,
    transfer
  }

  /**
   * @dev Structure representing what to send and where.
   * @param token Address of the token we are sending.
   * @param proxy Id representing approved proxy address.
   * @param param1 Address of the sender or imprint.
   * @param to Address of the receiver.
   * @param value Amount of ERC20 or ID of ERC721.
   */
  struct ActionData 
  {
    ActionKind kind;
    uint32 proxy;
    address token;
    bytes32 param1;
    address to;
    uint256 value;
  }

  /**
   * @dev Structure representing the signature parts.
   * @param r ECDSA signature parameter r.
   * @param s ECDSA signature parameter s.
   * @param v ECDSA signature parameter v.
   * @param kind Type of signature. 
   */
  struct SignatureData
  {
    bytes32 r;
    bytes32 s;
    uint8 v;
    SignatureKind kind;
  }

  /**
   * @dev Structure representing the data needed to do the order.
   * @param maker Address of the one that made the claim.
   * @param taker Address of the one that is executing the claim.
   * @param actions Data of all the actions that should accure it this order.
   * @param signature Data from the signed claim.
   * @param seed Arbitrary number to facilitate uniqueness of the order's hash. Usually timestamp.
   * @param expiration Timestamp of when the claim expires. 0 if indefinet. 
   */
  struct OrderData 
  {
    address maker;
    address taker;
    ActionData[] actions;
    uint256 seed;
    uint256 expiration;
  }

  /** 
   * @dev Valid proxy contract addresses.
   */
  mapping(uint32 => address) public idToProxy;

  /**
   * @dev Mapping of all cancelled orders.
   */
  mapping(bytes32 => bool) public orderCancelled;

  /**
   * @dev Mapping of all performed orders.
   */
  mapping(bytes32 => bool) public orderPerformed;

  /**
   * @dev This event emmits when tokens change ownership.
   */
  event Perform(
    address indexed _maker,
    address indexed _taker,
    bytes32 _claim
  );

  /**
   * @dev This event emmits when transfer order is cancelled.
   */
  event Cancel(
    address indexed _maker,
    address indexed _taker,
    bytes32 _claim
  );

  /**
   * @dev This event emmits when proxy address is changed..
   */
  event ProxyChange(
    uint32 indexed _id,
    address _proxy
  );

  /**
   * @dev Sets a verified proxy address. 
   * @notice Can be done through a multisig wallet in the future.
   * @param _id Id of the proxy.
   * @param _proxy Proxy address.
   */
  function setProxy(
    uint32 _id,
    address _proxy
  )
    external
    hasAbilities(ABILITY_TO_SET_PROXIES)
  {
    idToProxy[_id] = _proxy;
    emit ProxyChange(_id, _proxy);
  }

  /**
   * @dev Performs the ERC721/ERC20 atomic swap.
   * @param _data Data required to make the order.
   * @param _signature Data from the signature. 
   */
  function perform(
    OrderData memory _data,
    SignatureData memory _signature
  )
    public 
  {
    require(_data.taker == msg.sender, TAKER_NOT_EQUAL_TO_SENDER);
    require(_data.expiration >= now, CLAIM_EXPIRED);

    bytes32 claim = getOrderDataClaim(_data);
    require(
      isValidSignature(
        _data.maker,
        claim,
        _signature
      ), 
      INVALID_SIGNATURE
    );

    require(!orderCancelled[claim], ORDER_CANCELED);
    require(!orderPerformed[claim], ORDER_ALREADY_PERFORMED);

    orderPerformed[claim] = true;

    _doActions(_data);

    emit Perform(
      _data.maker,
      _data.taker,
      claim
    );
  }

  /** 
   * @dev Cancels order
   * @param _data Data of order to cancel.
   */
  function cancel(
    OrderData memory _data
  )
    public
  {
    require(_data.maker == msg.sender, MAKER_NOT_EQUAL_TO_SENDER);

    bytes32 claim = getOrderDataClaim(_data);
    require(!orderPerformed[claim], ORDER_ALREADY_PERFORMED);

    orderCancelled[claim] = true;
    emit Cancel(
      _data.maker,
      _data.taker,
      claim
    );
  }

  /**
   * @dev Calculates keccak-256 hash of OrderData from parameters.
   * @param _orderData Data needed for atomic swap.
   * @return keccak-hash of order data.
   */
  function getOrderDataClaim(
    OrderData memory _orderData
  )
    public
    view
    returns (bytes32)
  {
    bytes32 temp = 0x0;

    for(uint256 i = 0; i < _orderData.actions.length; i++)
    {
      temp = keccak256(
        abi.encodePacked(
          temp,
          _orderData.actions[i].kind,
          _orderData.actions[i].proxy,
          _orderData.actions[i].token,
          _orderData.actions[i].param1,
          _orderData.actions[i].to,
          _orderData.actions[i].value
        )
      );
    }

    return keccak256(
      abi.encodePacked(
        address(this),
        _orderData.maker,
        _orderData.taker,
        temp,
        _orderData.seed,
        _orderData.expiration
      )
    );
  }
  
  /**
   * @dev Verifies if claim signature is valid.
   * @param _signer address of signer.
   * @param _claim Signed Keccak-256 hash.
   * @param _signature Signature data.
   */
  function isValidSignature(
    address _signer,
    bytes32 _claim,
    SignatureData memory _signature
  )
    public
    pure
    returns (bool)
  {
    if(_signature.kind == SignatureKind.eth_sign)
    {
      return _signer == ecrecover(
        keccak256(
          abi.encodePacked(
            "\x19Ethereum Signed Message:\n32",
            _claim
          )
        ),
        _signature.v,
        _signature.r,
        _signature.s
      );
    } else if (_signature.kind == SignatureKind.trezor)
    {
      return _signer == ecrecover(
        keccak256(
          abi.encodePacked(
            "\x19Ethereum Signed Message:\n\x20",
            _claim
          )
        ),
        _signature.v,
        _signature.r,
        _signature.s
      );
    } else if (_signature.kind == SignatureKind.eip712)
    {
      return _signer == ecrecover(
        _claim,
        _signature.v,
        _signature.r,
        _signature.s
      );
    }

    revert(INVALID_SIGNATURE_KIND);
  }

  /**
   * @dev Helper function that makes transfes.
   * @param _order Data needed for order.
   */
  function _doActions(
    OrderData memory _order
  )
    private
  {
    for(uint256 i = 0; i < _order.actions.length; i++)
    {
      require(
        idToProxy[_order.actions[i].proxy] != address(0),
        INVALID_PROXY
      );

      if(_order.actions[i].kind == ActionKind.create)
      {
        require(
          Abilitable(_order.actions[i].token).isAble(_order.maker, ABILITY_ALLOW_CREATE_ASSET),
          SIGNER_NOT_AUTHORIZED
        );
        
        XcertCreateProxy(idToProxy[_order.actions[i].proxy]).create(
          _order.actions[i].token,
          _order.actions[i].to,
          _order.actions[i].value,
          _order.actions[i].param1
        );
      } 
      else if (_order.actions[i].kind == ActionKind.transfer)
      {
        address from = address(uint160(bytes20(_order.actions[i].param1)));
        require(
          from == _order.maker
          || from == _order.taker,
          SENDER_NOT_TAKER_OR_MAKER
        );
        
        Proxy(idToProxy[_order.actions[i].proxy]).execute(
          _order.actions[i].token,
          from,
          _order.actions[i].to,
          _order.actions[i].value
        );
      }
    }
  }
  
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"_target","type":"address"},{"name":"_abilities","type":"uint256"}],"name":"grantAbilities","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"maker","type":"address"},{"name":"taker","type":"address"},{"components":[{"name":"kind","type":"uint8"},{"name":"proxy","type":"uint32"},{"name":"token","type":"address"},{"name":"param1","type":"bytes32"},{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"actions","type":"tuple[]"},{"name":"seed","type":"uint256"},{"name":"expiration","type":"uint256"}],"name":"_data","type":"tuple"}],"name":"cancel","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"addressToAbility","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"orderCancelled","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"maker","type":"address"},{"name":"taker","type":"address"},{"components":[{"name":"kind","type":"uint8"},{"name":"proxy","type":"uint32"},{"name":"token","type":"address"},{"name":"param1","type":"bytes32"},{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"actions","type":"tuple[]"},{"name":"seed","type":"uint256"},{"name":"expiration","type":"uint256"}],"name":"_data","type":"tuple"},{"components":[{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"},{"name":"v","type":"uint8"},{"name":"kind","type":"uint8"}],"name":"_signature","type":"tuple"}],"name":"perform","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_signer","type":"address"},{"name":"_claim","type":"bytes32"},{"components":[{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"},{"name":"v","type":"uint8"},{"name":"kind","type":"uint8"}],"name":"_signature","type":"tuple"}],"name":"isValidSignature","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"_target","type":"address"},{"name":"_abilities","type":"uint256"}],"name":"isAble","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"components":[{"name":"maker","type":"address"},{"name":"taker","type":"address"},{"components":[{"name":"kind","type":"uint8"},{"name":"proxy","type":"uint32"},{"name":"token","type":"address"},{"name":"param1","type":"bytes32"},{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"actions","type":"tuple[]"},{"name":"seed","type":"uint256"},{"name":"expiration","type":"uint256"}],"name":"_orderData","type":"tuple"}],"name":"getOrderDataClaim","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"orderPerformed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_id","type":"uint32"},{"name":"_proxy","type":"address"}],"name":"setProxy","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint32"}],"name":"idToProxy","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_target","type":"address"},{"name":"_abilities","type":"uint256"}],"name":"revokeAbilities","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_maker","type":"address"},{"indexed":true,"name":"_taker","type":"address"},{"indexed":false,"name":"_claim","type":"bytes32"}],"name":"Perform","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_maker","type":"address"},{"indexed":true,"name":"_taker","type":"address"},{"indexed":false,"name":"_claim","type":"bytes32"}],"name":"Cancel","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_id","type":"uint32"},{"indexed":false,"name":"_proxy","type":"address"}],"name":"ProxyChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_target","type":"address"},{"indexed":true,"name":"_abilities","type":"uint256"}],"name":"GrantAbilities","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_target","type":"address"},{"indexed":true,"name":"_abilities","type":"uint256"}],"name":"RevokeAbilities","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6080604081815233600081815260208190529182206001908190558080559290917fc4adfc5f00262a1ab9b2241c7e98408a91e58dc5777d786164bba34a7652f62f91a3611a8d806100526000396000f3fe60806040526004361061009a5760e060020a60003504630ab319e8811461009f57806336d63aca146100c157806345a32c86146100e15780635889bf5e146101175780638b1d8335146101445780638fa76d8d14610164578063ba00a33014610184578063d1c87f30146101a4578063d981e736146101c4578063e3f0031b146101e4578063f1e9fbc414610204578063f394b6df14610231575b600080fd5b3480156100ab57600080fd5b506100bf6100ba366004611717565b610251565b005b3480156100cd57600080fd5b506100bf6100dc36600461178d565b610343565b3480156100ed57600080fd5b506101016100fc3660046116a4565b61048e565b60405161010e9190611953565b60405180910390f35b34801561012357600080fd5b5061013761013236600461176f565b6104a0565b60405161010e9190611945565b34801561015057600080fd5b506100bf61015f3660046117c2565b6104b5565b34801561017057600080fd5b5061013761017f3660046116ca565b610741565b34801561019057600080fd5b5061013761019f366004611717565b6109c1565b3480156101b057600080fd5b506101016101bf36600461178d565b610a41565b3480156101d057600080fd5b506101376101df36600461176f565b610c6f565b3480156101f057600080fd5b506100bf6101ff366004611827565b610c84565b34801561021057600080fd5b5061022461021f366004611809565b610d6a565b60405161010e91906118b6565b34801561023d57600080fd5b506100bf61024c366004611717565b610d85565b6001336000908152602081905260409020548116811460408051808201909152600681527f303137303031000000000000000000000000000000000000000000000000000060208201529015156102c75760405160e560020a62461bcd0281526004016102be9190611961565b60405180910390fd5b50600160a060020a03831660009081526020819052604090208054831790556001808316141561030857600180546103049163ffffffff610ebe16565b6001555b6040518290600160a060020a038516907fc4adfc5f00262a1ab9b2241c7e98408a91e58dc5777d786164bba34a7652f62f90600090a3505050565b805160408051808201909152600681527f3031353030390000000000000000000000000000000000000000000000000000602082015290600160a060020a031633146103a55760405160e560020a62461bcd0281526004016102be9190611961565b5060006103b182610a41565b600081815260046020908152604091829020548251808401909352600683527f3031353030380000000000000000000000000000000000000000000000000000918301919091529192509060ff16156104205760405160e560020a62461bcd0281526004016102be9190611961565b50600081815260036020908152604091829020805460ff1916600117905583015183519151600160a060020a0391821692909116907f421b43caf093b5e58d1ea89ca0d80151eda923342cf3cfddf5eb6b30d4947ba090610482908590611953565b60405180910390a35050565b60006020819052908152604090205481565b60036020526000908152604090205460ff1681565b60208083015160408051808201909152600681527f303135303033000000000000000000000000000000000000000000000000000092810192909252600160a060020a0316331461051c5760405160e560020a62461bcd0281526004016102be9190611961565b50608082015160408051808201909152600681527f303135303035000000000000000000000000000000000000000000000000000060208201529042111561057a5760405160e560020a62461bcd0281526004016102be9190611961565b50600061058683610a41565b905061059783600001518284610741565b60408051808201909152600681527f303135303036000000000000000000000000000000000000000000000000000060208201529015156105ee5760405160e560020a62461bcd0281526004016102be9190611961565b50600081815260036020908152604091829020548251808401909352600683527f30313530303700000000000000000000000000000000000000000000000000009183019190915260ff161561065a5760405160e560020a62461bcd0281526004016102be9190611961565b50600081815260046020908152604091829020548251808401909352600683527f30313530303800000000000000000000000000000000000000000000000000009183019190915260ff16156106c65760405160e560020a62461bcd0281526004016102be9190611961565b506000818152600460205260409020805460ff191660011790556106e983610f21565b8260200151600160a060020a03168360000151600160a060020a03167fdd97b854c02f699ea0d8984479d0012fbbbd0f4f80fc2e099315f6c47a3da178836040516107349190611953565b60405180910390a3505050565b6000808260600151600281111561075457fe5b141561082957604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c80830187905283518084039091018152605c8301808552815191830191909120868501518751888501516000909452607c86018088529290925260ff16609c85015260bc84015260dc830152915160019260fc808401939192601f1981019281900390910190855afa158015610804573d6000803e3d6000fd5b50505060206040510351600160a060020a031684600160a060020a03161490506109ba565b60018260600151600281111561083b57fe5b14156108eb57604080517f19457468657265756d205369676e6564204d6573736167653a0a200000000000602080830191909152603b80830187905283518084039091018152605b8301808552815191830191909120868501518751888501516000909452607b86018088529290925260ff16609b85015260bb84015260db830152915160019260fb808401939192601f1981019281900390910190855afa158015610804573d6000803e3d6000fd5b6002826060015160028111156108fd57fe5b141561096c5760018383604001518460000151856020015160405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610804573d6000803e3d6000fd5b604080518082018252600681527f30313530303100000000000000000000000000000000000000000000000000006020820152905160e560020a62461bcd0281526102be9190600401611961565b9392505050565b60408051808201909152600681527f30313730303300000000000000000000000000000000000000000000000000006020820152600090818311610a1b5760405160e560020a62461bcd0281526004016102be9190611961565b5050600160a060020a038216600090815260208190526040902054811681145b92915050565b600080805b836040015151811015610bf35781846040015182815181101515610a6657fe5b60209081029091010151516040860151805184908110610a8257fe5b9060200190602002015160200151866040015184815181101515610aa257fe5b9060200190602002015160400151876040015185815181101515610ac257fe5b9060200190602002015160600151886040015186815181101515610ae257fe5b9060200190602002015160800151896040015187815181101515610b0257fe5b9060200190602002015160a0015160405160200180888152602001876001811115610b2957fe5b60ff167f01000000000000000000000000000000000000000000000000000000000000000281526001018663ffffffff1663ffffffff1660e060020a02815260040185600160a060020a0316600160a060020a03166c0100000000000000000000000002815260140184815260200183600160a060020a0316600160a060020a03166c010000000000000000000000000281526014018281526020019750505050505050506040516020818303038152906040528051906020012091508080600101915050610a46565b50825160208085015160608601516080870151604080516c0100000000000000000000000030810282880152600160a060020a0397881681026034830152969094169095026048840152605c830195909552607c820152609c808201949094528251808203909401845260bc0190915281519101209050919050565b60046020526000908152604090205460ff1681565b6002336000908152602081905260409020548116811460408051808201909152600681527f30313730303100000000000000000000000000000000000000000000000000006020820152901515610cf15760405160e560020a62461bcd0281526004016102be9190611961565b5063ffffffff831660008181526002602052604090819020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038616179055517fdb53dd4dc1c90c1e98682bcfbd72041555c5446ca8d717afcd8ce41c1fcbe38190610d5d9085906118b6565b60405180910390a2505050565b600260205260009081526040902054600160a060020a031681565b6001336000908152602081905260409020548116811460408051808201909152600681527f30313730303100000000000000000000000000000000000000000000000000006020820152901515610df25760405160e560020a62461bcd0281526004016102be9190611961565b50600160a060020a03831660009081526020819052604090208054831916905560018083161415610e83576001805460408051808201909152600681527f303137303032000000000000000000000000000000000000000000000000000060208201529110610e775760405160e560020a62461bcd0281526004016102be9190611961565b50600180546000190190555b6040518290600160a060020a038516907fbb71944f65b9a48cc7d835179fb5e874f29b60aa0195785fb54968d8dddef08a90600090a3505050565b60408051808201909152600681527f303038303031000000000000000000000000000000000000000000000000000060208201528282019083821015610f1a5760405160e560020a62461bcd0281526004016102be9190611961565b5092915050565b60005b81604001515181101561142a576000600160a060020a031660026000846040015184815181101515610f5257fe5b602090810290910181015181015163ffffffff168252818101929092526040908101600020548151808301909252600682527f30313530303200000000000000000000000000000000000000000000000000009282019290925291600160a060020a039091161415610fda5760405160e560020a62461bcd0281526004016102be9190611961565b5060006040830151805183908110610fee57fe5b6020908102909101015151600181111561100457fe5b141561122b57604082015180518290811061101b57fe5b9060200190602002015160400151600160a060020a031663ba00a330836000015160206040518363ffffffff1660e060020a02815260040161105e92919061192a565b60206040518083038186803b15801561107657600080fd5b505afa15801561108a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506110ae9190810190611751565b60408051808201909152600681527f303135303130000000000000000000000000000000000000000000000000000060208201529015156111055760405160e560020a62461bcd0281526004016102be9190611961565b506002600083604001518381518110151561111c57fe5b602090810290910181015181015163ffffffff168252810191909152604090810160002054908301518051600160a060020a03909216916346009b0e91908490811061116457fe5b906020019060200201516040015184604001518481518110151561118457fe5b90602001906020020151608001518560400151858151811015156111a457fe5b9060200190602002015160a001518660400151868151811015156111c457fe5b90602001906020020151606001516040518563ffffffff1660e060020a0281526004016111f49493929190611902565b600060405180830381600087803b15801561120e57600080fd5b505af1158015611222573d6000803e3d6000fd5b50505050611422565b6001604083015180518390811061123e57fe5b6020908102909101015151600181111561125457fe5b141561142257600082604001518281518110151561126e57fe5b90602001906020020151606001516c01000000000000000000000000900490508260000151600160a060020a031681600160a060020a031614806112c757508260200151600160a060020a031681600160a060020a0316145b60408051808201909152600681527f3031353030340000000000000000000000000000000000000000000000000000602082015290151561131e5760405160e560020a62461bcd0281526004016102be9190611961565b506002600084604001518481518110151561133557fe5b602090810290910181015181015163ffffffff168252810191909152604090810160002054908401518051600160a060020a039092169163239aee0691908590811061137d57fe5b90602001906020020151604001518386604001518681518110151561139e57fe5b90602001906020020151608001518760400151878151811015156113be57fe5b9060200190602002015160a001516040518563ffffffff1660e060020a0281526004016113ee94939291906118c4565b600060405180830381600087803b15801561140857600080fd5b505af115801561141c573d6000803e3d6000fd5b50505050505b600101610f24565b5050565b60006109ba82356119be565b6000601f8201831361144b57600080fd5b813561145e61145982611999565b611972565b915081818352602084019350602081019050838560c084028201111561148357600080fd5b60005b838110156114b1578161149988826114eb565b84525060209092019160c09190910190600101611486565b5050505092915050565b60006109ba82516119c9565b60006109ba82356119ce565b60006109ba82356119e3565b60006109ba82356119f6565b600060c082840312156114fd57600080fd5b61150760c0611972565b9050600061151584846114d3565b82525060206115268484830161168c565b602083015250604061153a8482850161142e565b604083015250606061154e848285016114c7565b60608301525060806115628482850161142e565b60808301525060a0611576848285016114c7565b60a08301525092915050565b600060a0828403121561159457600080fd5b61159e60a0611972565b905060006115ac848461142e565b82525060206115bd8484830161142e565b602083015250604082013567ffffffffffffffff8111156115dd57600080fd5b6115e98482850161143a565b60408301525060606115fd848285016114c7565b6060830152506080611611848285016114c7565b60808301525092915050565b60006080828403121561162f57600080fd5b6116396080611972565b9050600061164784846114c7565b8252506020611658848483016114c7565b602083015250604061166c84828501611698565b6040830152506060611680848285016114df565b60608301525092915050565b60006109ba8235611a05565b60006109ba82356119dd565b6000602082840312156116b657600080fd5b60006116c2848461142e565b949350505050565b600080600060c084860312156116df57600080fd5b60006116eb868661142e565b93505060206116fc868287016114c7565b925050604061170d8682870161161d565b9150509250925092565b6000806040838503121561172a57600080fd5b6000611736858561142e565b9250506020611747858286016114c7565b9150509250929050565b60006020828403121561176357600080fd5b60006116c284846114bb565b60006020828403121561178157600080fd5b60006116c284846114c7565b60006020828403121561179f57600080fd5b813567ffffffffffffffff8111156117b657600080fd5b6116c284828501611582565b60008060a083850312156117d557600080fd5b823567ffffffffffffffff8111156117ec57600080fd5b6117f885828601611582565b92505060206117478582860161161d565b60006020828403121561181b57600080fd5b60006116c2848461168c565b6000806040838503121561183a57600080fd5b6000611846858561168c565b92505060206117478582860161142e565b611860816119be565b82525050565b611860816119c9565b611860816119ce565b6000611883826119ba565b808452611897816020860160208601611a19565b6118a081611a49565b9093016020019392505050565b61186081611a0e565b60208101610a3b8284611857565b608081016118d28287611857565b6118df6020830186611857565b6118ec6040830185611857565b6118f9606083018461186f565b95945050505050565b608081016119108287611857565b61191d6020830186611857565b6118ec604083018561186f565b604081016119388285611857565b6109ba60208301846118ad565b60208101610a3b8284611866565b60208101610a3b828461186f565b602080825281016109ba8184611878565b60405181810167ffffffffffffffff8111828210171561199157600080fd5b604052919050565b600067ffffffffffffffff8211156119b057600080fd5b5060209081020190565b5190565b6000610a3b826119d1565b151590565b90565b600160a060020a031690565b60ff1690565b6000600282106119f257600080fd5b5090565b6000600382106119f257600080fd5b63ffffffff1690565b6000610a3b826119dd565b60005b83811015611a34578181015183820152602001611a1c565b83811115611a43576000848401525b50505050565b601f01601f19169056fea265627a7a72305820277f22698970296af647b6a1ca1d55d44fe11e06730d27211a3797c52b7b19606c6578706572696d656e74616cf50037

   Swarm Source:
bzzr://277f22698970296af647b6a1ca1d55d44fe11e06730d27211a3797c52b7b1960

 

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