Latest 13 txns

TxHash Age From To Value [TxFee]
0x3f47e85de753b918fb3b5a69029f09f738becbc99048053a7fbea5ccd9afd03f88 days 11 hrs ago0x878368019cec9498d22e28b41fe59ab3deb0673c  IN   0x4738a5688c758c2030bd16ac49996f31dd23fb750 Ether0.000473886
0xfe6f9d5cce15175deaaba68dc89a302c541e998e64ff5c68808be73d74c58f5f88 days 11 hrs ago0x878368019cec9498d22e28b41fe59ab3deb0673c  IN   0x4738a5688c758c2030bd16ac49996f31dd23fb750 Ether0.000473886
0x2ed4c4eedf3c61982cfb2ac880ab63b777d24cf48672542bd102f2f368c3cac488 days 12 hrs ago0x2e5fc1cb068ca097414a8d703e61a4f8d034b962  IN   0x4738a5688c758c2030bd16ac49996f31dd23fb750 Ether0.001154548
0x8555e530cfa548bfec2245f37fbfc042a0c1d5de8eba969f11105aa74704e71b88 days 12 hrs ago0x878368019cec9498d22e28b41fe59ab3deb0673c  IN   0x4738a5688c758c2030bd16ac49996f31dd23fb750 Ether0.000576954
0xd17fc08fab7e8c595078315d44c1d5762c8321972cc339d77f7be1ec4cdda41089 days 7 hrs ago0x7c07d32e18d6495efdc487a32f8d20dafba53a5e  IN   0x4738a5688c758c2030bd16ac49996f31dd23fb750 Ether0.000583041
0x31d769d9cecb4387de8574892ccf46a99a79772888e9b3c4eaef7f7cedede81a89 days 7 hrs ago0x3da152ec17fba908d8fc087f4bb3b8832d592ba6  IN   0x4738a5688c758c2030bd16ac49996f31dd23fb750 Ether0.000103926
0xed508800aed0e0c5446a7d07c83b8bc4fe323e4203f8d6775feda5761d10b29c89 days 7 hrs ago0xa90a55af4f5c76c9e6c3d22a8dec7d6de0fb1388  IN   0x4738a5688c758c2030bd16ac49996f31dd23fb750 Ether0.00057689
0x4a620289cb8b1bae81f391125e832553891fab0cacd1ff9991b3a7555fb542d089 days 7 hrs ago0x3eb74f5e771c9760168d5968faf7369a7b4fcc15  IN   0x4738a5688c758c2030bd16ac49996f31dd23fb750 Ether0.000582977
0xb650c5d40bc2720764a1f19ebf733db7c60aa91cb3ea882ef3d97c75ffce19bc89 days 7 hrs ago0x7c07d32e18d6495efdc487a32f8d20dafba53a5e  IN   0x4738a5688c758c2030bd16ac49996f31dd23fb750 Ether0.000583041
0x6ce53c7ec0d2e57299dded12d936425d5a8d67cfac2a3c275fa07097faf9630d89 days 14 hrs ago0xa5f8e65136e03e34a11d4b7ef5069aff814f703b  IN   0x4738a5688c758c2030bd16ac49996f31dd23fb750 Ether0.000198641
0xc76d40ca85811018c0bfc590cf93087fc4b560650259e95bc065bfcd47bf2b3789 days 15 hrs ago0xa5f8e65136e03e34a11d4b7ef5069aff814f703b  IN   0x4738a5688c758c2030bd16ac49996f31dd23fb750 Ether0.000198769
0x0cad64c6ca93dfcb36914ddbe9e856db347e88f0b9d8c7300cacaf5b6466b95d89 days 16 hrs ago0xa5f8e65136e03e34a11d4b7ef5069aff814f703b  IN   0x4738a5688c758c2030bd16ac49996f31dd23fb750 Ether0.000198705
0xd236593c26e0388c0777a78e49cbc6c94ba55fe38c6ea5904f7345ab8a82d41e89 days 16 hrs ago0xa5f8e65136e03e34a11d4b7ef5069aff814f703b  IN   0x4738a5688c758c2030bd16ac49996f31dd23fb750 Ether0.000198641
0x22e1f45d40a3c2a574c507c6ac8be49b40d35fcf214d083da5e14a6eb7d9e7da89 days 20 hrs ago0x001d51cdc8f4b378e136642ddb95dfc4ff6a4b72  IN    Contract Creation0 Ether0.01733671
[ 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
0x3f47e85de753b918fb3b5a69029f09f738becbc99048053a7fbea5ccd9afd03f949753988 days 11 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xd5ca3dec1f3155e2c182299afa2413ac1a9f35300 Ether
0x3f47e85de753b918fb3b5a69029f09f738becbc99048053a7fbea5ccd9afd03f949753988 days 11 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xe1ccba52a8f7c4885ef10b10c3ba438072bd96e10 Ether
0x3f47e85de753b918fb3b5a69029f09f738becbc99048053a7fbea5ccd9afd03f949753988 days 11 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750x49d35dd866ed2ea011e2797fcce0bf321d086cf10 Ether
0xfe6f9d5cce15175deaaba68dc89a302c541e998e64ff5c68808be73d74c58f5f949753888 days 11 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xd5ca3dec1f3155e2c182299afa2413ac1a9f35300 Ether
0xfe6f9d5cce15175deaaba68dc89a302c541e998e64ff5c68808be73d74c58f5f949753888 days 11 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xe1ccba52a8f7c4885ef10b10c3ba438072bd96e10 Ether
0xfe6f9d5cce15175deaaba68dc89a302c541e998e64ff5c68808be73d74c58f5f949753888 days 11 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750x49d35dd866ed2ea011e2797fcce0bf321d086cf10 Ether
0x2ed4c4eedf3c61982cfb2ac880ab63b777d24cf48672542bd102f2f368c3cac4949747988 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750x127c48f9166e61f2e5532f559590aaeb68bd56b50 Ether
0x2ed4c4eedf3c61982cfb2ac880ab63b777d24cf48672542bd102f2f368c3cac4949747988 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xe1ccba52a8f7c4885ef10b10c3ba438072bd96e10 Ether
0x2ed4c4eedf3c61982cfb2ac880ab63b777d24cf48672542bd102f2f368c3cac4949747988 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xb53cd92e439c4391deab8b8070699c9ce4b5c4870 Ether
0x2ed4c4eedf3c61982cfb2ac880ab63b777d24cf48672542bd102f2f368c3cac4949747988 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xe1ccba52a8f7c4885ef10b10c3ba438072bd96e10 Ether
0x2ed4c4eedf3c61982cfb2ac880ab63b777d24cf48672542bd102f2f368c3cac4949747988 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xd0a1e359811322d97991e03f863a0c30c2cf029c0 Ether
0x2ed4c4eedf3c61982cfb2ac880ab63b777d24cf48672542bd102f2f368c3cac4949747988 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xd0a1e359811322d97991e03f863a0c30c2cf029c0 Ether
0x2ed4c4eedf3c61982cfb2ac880ab63b777d24cf48672542bd102f2f368c3cac4949747988 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xe1ccba52a8f7c4885ef10b10c3ba438072bd96e10 Ether
0x2ed4c4eedf3c61982cfb2ac880ab63b777d24cf48672542bd102f2f368c3cac4949747988 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xd0a1e359811322d97991e03f863a0c30c2cf029c0 Ether
0x2ed4c4eedf3c61982cfb2ac880ab63b777d24cf48672542bd102f2f368c3cac4949747988 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xe1ccba52a8f7c4885ef10b10c3ba438072bd96e10 Ether
0x2ed4c4eedf3c61982cfb2ac880ab63b777d24cf48672542bd102f2f368c3cac4949747988 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xd5ca3dec1f3155e2c182299afa2413ac1a9f35300 Ether
0x2ed4c4eedf3c61982cfb2ac880ab63b777d24cf48672542bd102f2f368c3cac4949747988 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xe1ccba52a8f7c4885ef10b10c3ba438072bd96e10 Ether
0x2ed4c4eedf3c61982cfb2ac880ab63b777d24cf48672542bd102f2f368c3cac4949747988 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750x49d35dd866ed2ea011e2797fcce0bf321d086cf10 Ether
0x8555e530cfa548bfec2245f37fbfc042a0c1d5de8eba969f11105aa74704e71b949735088 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750x127c48f9166e61f2e5532f559590aaeb68bd56b50 Ether
0x8555e530cfa548bfec2245f37fbfc042a0c1d5de8eba969f11105aa74704e71b949735088 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xe1ccba52a8f7c4885ef10b10c3ba438072bd96e10 Ether
0x8555e530cfa548bfec2245f37fbfc042a0c1d5de8eba969f11105aa74704e71b949735088 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xb53cd92e439c4391deab8b8070699c9ce4b5c4870 Ether
0x8555e530cfa548bfec2245f37fbfc042a0c1d5de8eba969f11105aa74704e71b949735088 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xe1ccba52a8f7c4885ef10b10c3ba438072bd96e10 Ether
0x8555e530cfa548bfec2245f37fbfc042a0c1d5de8eba969f11105aa74704e71b949735088 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xd0a1e359811322d97991e03f863a0c30c2cf029c0 Ether
0x8555e530cfa548bfec2245f37fbfc042a0c1d5de8eba969f11105aa74704e71b949735088 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xd0a1e359811322d97991e03f863a0c30c2cf029c0 Ether
0x8555e530cfa548bfec2245f37fbfc042a0c1d5de8eba969f11105aa74704e71b949735088 days 12 hrs ago0x4738a5688c758c2030bd16ac49996f31dd23fb750xe1ccba52a8f7c4885ef10b10c3ba438072bd96e10 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: LTVCreditorProxy
Compiler Version: v0.4.24+commit.e67f0147
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity 0.4.24;
pragma experimental ABIEncoderV2;

contract CollateralizerInterface {

	function unpackCollateralParametersFromBytes(
		bytes32 parameters
	) public pure returns (uint, uint, uint);

}
contract DebtKernelInterface {

	enum Errors {
		// Debt has been already been issued
		DEBT_ISSUED,
		// Order has already expired
		ORDER_EXPIRED,
		// Debt issuance associated with order has been cancelled
		ISSUANCE_CANCELLED,
		// Order has been cancelled
		ORDER_CANCELLED,
		// Order parameters specify amount of creditor / debtor fees
		// that is not equivalent to the amount of underwriter / relayer fees
		ORDER_INVALID_INSUFFICIENT_OR_EXCESSIVE_FEES,
		// Order parameters specify insufficient principal amount for
		// debtor to at least be able to meet his fees
		ORDER_INVALID_INSUFFICIENT_PRINCIPAL,
		// Order parameters specify non zero fee for an unspecified recipient
		ORDER_INVALID_UNSPECIFIED_FEE_RECIPIENT,
		// Order signatures are mismatched / malformed
		ORDER_INVALID_NON_CONSENSUAL,
		// Insufficient balance or allowance for principal token transfer
		CREDITOR_BALANCE_OR_ALLOWANCE_INSUFFICIENT
	}

	// solhint-disable-next-line var-name-mixedcase
	address public TOKEN_TRANSFER_PROXY;
	bytes32 constant public NULL_ISSUANCE_HASH = bytes32(0);

	/* NOTE(kayvon): Currently, the `view` keyword does not actually enforce the
	static nature of the method; this will change in the future, but for now, in
	order to prevent reentrancy we'll need to arbitrarily set an upper bound on
	the gas limit allotted for certain method calls. */
	uint16 constant public EXTERNAL_QUERY_GAS_LIMIT = 8000;

	mapping (bytes32 => bool) public issuanceCancelled;
	mapping (bytes32 => bool) public debtOrderCancelled;

	event LogDebtOrderFilled(
		bytes32 indexed _agreementId,
		uint _principal,
		address _principalToken,
		address indexed _underwriter,
		uint _underwriterFee,
		address indexed _relayer,
		uint _relayerFee
	);

	event LogIssuanceCancelled(
		bytes32 indexed _agreementId,
		address indexed _cancelledBy
	);

	event LogDebtOrderCancelled(
		bytes32 indexed _debtOrderHash,
		address indexed _cancelledBy
	);

	event LogError(
		uint8 indexed _errorId,
		bytes32 indexed _orderHash
	);

	struct Issuance {
		address version;
		address debtor;
		address underwriter;
		uint underwriterRiskRating;
		address termsContract;
		bytes32 termsContractParameters;
		uint salt;
		bytes32 agreementId;
	}

	struct DebtOrder {
		Issuance issuance;
		uint underwriterFee;
		uint relayerFee;
		uint principalAmount;
		address principalToken;
		uint creditorFee;
		uint debtorFee;
		address relayer;
		uint expirationTimestampInSec;
		bytes32 debtOrderHash;
	}

    function fillDebtOrder(
        address creditor,
        address[6] orderAddresses,
        uint[8] orderValues,
        bytes32[1] orderBytes32,
        uint8[3] signaturesV,
        bytes32[3] signaturesR,
        bytes32[3] signaturesS
    )
        public
        returns (bytes32 _agreementId);

}

contract DebtTokenInterface {

    function transfer(address _to, uint _tokenId) public;

    function exists(uint256 _tokenId) public view returns (bool);

}
contract TokenTransferProxyInterface {}

contract ContractRegistryInterface {

    CollateralizerInterface public collateralizer;
    DebtKernelInterface public debtKernel;
    DebtTokenInterface public debtToken;
    TokenTransferProxyInterface public tokenTransferProxy;

    function ContractRegistryInterface(
        address _collateralizer,
        address _debtKernel,
        address _debtToken,
        address _tokenTransferProxy
    )
        public
    {
        collateralizer = CollateralizerInterface(_collateralizer);
        debtKernel = DebtKernelInterface(_debtKernel);
        debtToken = DebtTokenInterface(_debtToken);
        tokenTransferProxy = TokenTransferProxyInterface(_tokenTransferProxy);
    }

}

// Internal mixins
// External dependencies
library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
    // Gas optimization: this is cheaper than asserting 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (_a == 0) {
      return 0;
    }

    c = _a * _b;
    assert(c / _a == _b);
    return c;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
    // assert(_b > 0); // Solidity automatically throws when dividing by 0
    // uint256 c = _a / _b;
    // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold
    return _a / _b;
  }

  /**
  * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
    assert(_b <= _a);
    return _a - _b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
    c = _a + _b;
    assert(c >= _a);
    return c;
  }
}


// Libraries
contract SignaturesLibrary {
	bytes constant internal PREFIX = "\x19Ethereum Signed Message:\n32";

	struct ECDSASignature {
		uint8 v;
		bytes32 r;
		bytes32 s;
	}

	function isValidSignature(
		address signer,
		bytes32 hash,
		ECDSASignature signature
	)
		public
		pure
		returns (bool valid)
	{
		bytes32 prefixedHash = keccak256(PREFIX, hash);
		return ecrecover(prefixedHash, signature.v, signature.r, signature.s) == signer;
	}
}


contract OrderLibrary {
	struct DebtOrder {
		address kernelVersion;
		address issuanceVersion;
		uint principalAmount;
		address principalToken;
		uint collateralAmount;
		address collateralToken;
		address debtor;
		uint debtorFee;
		address creditor;
		uint creditorFee;
		address relayer;
		uint relayerFee;
		address underwriter;
		uint underwriterFee;
		uint underwriterRiskRating;
		address termsContract;
		bytes32 termsContractParameters;
		uint expirationTimestampInSec;
		uint salt;
		SignaturesLibrary.ECDSASignature debtorSignature;
		SignaturesLibrary.ECDSASignature creditorSignature;
		SignaturesLibrary.ECDSASignature underwriterSignature;
	}

	function unpackDebtOrder(DebtOrder memory order)
		public
		pure
		returns (
	        address[6] orderAddresses,
	        uint[8] orderValues,
	        bytes32[1] orderBytes32,
	        uint8[3] signaturesV,
	        bytes32[3] signaturesR,
	        bytes32[3] signaturesS
		)
	{
		return (
			[order.issuanceVersion, order.debtor, order.underwriter, order.termsContract, order.principalToken, order.relayer],
            [order.underwriterRiskRating, order.salt, order.principalAmount, order.underwriterFee, order.relayerFee, order.creditorFee, order.debtorFee, order.expirationTimestampInSec],
			[order.termsContractParameters],
            [order.debtorSignature.v, order.creditorSignature.v, order.underwriterSignature.v],
			[order.debtorSignature.r, order.creditorSignature.r, order.underwriterSignature.r],
			[order.debtorSignature.s, order.creditorSignature.s, order.underwriterSignature.s]
		);
	}
}

contract LTVDecisionEngineTypes
{
	// The parameters used during the consent and decision evaluations.
	struct Params {
		address creditor;
		address priceFeedOperator;
		// The values and signature for the creditor commitment hash.
		CreditorCommitment creditorCommitment;
		// Price feed data.
		Price principalPrice;
		Price collateralPrice;
		// A DebtOrderData is required to confirm parity with the submitted order.
		OrderLibrary.DebtOrder order;
	}

	struct Price {
		uint value;
		uint timestamp;
		address tokenAddress;
		SignaturesLibrary.ECDSASignature signature;
	}

	struct CreditorCommitment {
		CommitmentValues values;
		SignaturesLibrary.ECDSASignature signature;
	}

	struct CommitmentValues {
		uint maxLTV;
	}

	struct SimpleInterestParameters {
		uint principalTokenIndex;
		uint principalAmount;
        uint interestRate;
        uint amortizationUnitType;
        uint termLengthInAmortizationUnits;
	}

	struct CollateralParameters {
		uint collateralTokenIndex;
		uint collateralAmount;
		uint gracePeriodInDays;
	}
}


// Interfaces
contract TermsContractInterface {

	function registerTermStart(
        bytes32 agreementId,
        address debtor
    ) public returns (bool _success);

	function registerRepayment(
        bytes32 agreementId,
        address payer,
        address beneficiary,
        uint256 unitsOfRepayment,
        address tokenAddress
    ) public returns (bool _success);

	function getExpectedRepaymentValue(
        bytes32 agreementId,
        uint256 timestamp
    ) public view returns (uint256);

	function getValueRepaidToDate(
        bytes32 agreementId
    ) public view returns (uint256);

	function getTermEndTimestamp(
        bytes32 _agreementId
    ) public view returns (uint);

}

contract SimpleInterestTermsContractInterface is TermsContractInterface {

    function unpackParametersFromBytes(
        bytes32 parameters
    ) public pure returns (
        uint _principalTokenIndex,
        uint _principalAmount,
        uint _interestRate,
        uint _amortizationUnitType,
        uint _termLengthInAmortizationUnits
    );

}

contract LTVDecisionEngine is LTVDecisionEngineTypes, SignaturesLibrary, OrderLibrary
{
	using SafeMath for uint;

	uint public constant PRECISION = 4;

	uint public constant MAX_PRICE_TTL_IN_SECONDS = 600;

	ContractRegistryInterface public contractRegistry;

	function LTVDecisionEngine(address _contractRegistry) public {
        contractRegistry = ContractRegistryInterface(_contractRegistry);
    }

	function evaluateConsent(Params params, bytes32 commitmentHash)
		public view returns (bool)
	{
		// Checks that the given creditor values were signed by the creditor.
		if (!isValidSignature(
			params.creditor,
			commitmentHash,
			params.creditorCommitment.signature
		)) {
			// We return early if the creditor values were not signed correctly.
			return false;
		}

		// Checks that the given price feed data was signed by the price feed operator.
		return (
			verifyPrices(
				params.priceFeedOperator,
				params.principalPrice,
				params.collateralPrice
			)
		);
	}

	// Returns true if the creditor-initiated order has not expired, and the LTV is below the max.
	function evaluateDecision(Params memory params)
		public view returns (bool _success)
	{
		LTVDecisionEngineTypes.Price memory principalTokenPrice = params.principalPrice;
		LTVDecisionEngineTypes.Price memory collateralTokenPrice = params.collateralPrice;

		uint maxLTV = params.creditorCommitment.values.maxLTV;
		OrderLibrary.DebtOrder memory order = params.order;

		uint collateralValue = collateralTokenPrice.value;

		if (isExpired(order.expirationTimestampInSec)) {
			return false;
		}

		if (order.collateralAmount == 0 || collateralValue == 0) {
			return false;
		}

		uint ltv = computeLTV(
			principalTokenPrice.value,
			collateralTokenPrice.value,
			order.principalAmount,
			order.collateralAmount
		);

		uint maxLTVWithPrecision = maxLTV.mul(10 ** (PRECISION.sub(2)));

		return ltv <= maxLTVWithPrecision;
	}

	function hashCreditorCommitmentForOrder(CommitmentValues commitmentValues, OrderLibrary.DebtOrder order)
	public view returns (bytes32)
	{
		bytes32 termsContractCommitmentHash =
			getTermsContractCommitmentHash(order.termsContract, order.termsContractParameters);

		return keccak256(
			// order values
			order.creditor,
			order.kernelVersion,
			order.issuanceVersion,
			order.termsContract,
			order.principalToken,
			order.salt,
			order.principalAmount,
			order.creditorFee,
			order.expirationTimestampInSec,
			// commitment values
			commitmentValues.maxLTV,
			// hashed terms contract commitments
			termsContractCommitmentHash
		);
	}

	function getTermsContractCommitmentHash(
		address termsContract,
		bytes32 termsContractParameters
	) public view returns (bytes32) {
		SimpleInterestParameters memory simpleInterestParameters =
			unpackSimpleInterestParameters(termsContract, termsContractParameters);

		CollateralParameters memory collateralParameters =
			unpackCollateralParameters(termsContractParameters);

		return keccak256(
			// unpacked termsContractParameters
			simpleInterestParameters.principalTokenIndex,
			simpleInterestParameters.principalAmount,
			simpleInterestParameters.interestRate,
			simpleInterestParameters.amortizationUnitType,
			simpleInterestParameters.termLengthInAmortizationUnits,
			collateralParameters.collateralTokenIndex,
			collateralParameters.gracePeriodInDays
		);
	}

	function unpackSimpleInterestParameters(
		address termsContract,
		bytes32 termsContractParameters
	)
		public pure returns (SimpleInterestParameters)
	{
		// use simple interest terms contract interface to unpack simple interest terms
		SimpleInterestTermsContractInterface simpleInterestTermsContract = SimpleInterestTermsContractInterface(termsContract);

		var (principalTokenIndex, principalAmount, interestRate, amortizationUnitType, termLengthInAmortizationUnits) =
			simpleInterestTermsContract.unpackParametersFromBytes(termsContractParameters);

		return SimpleInterestParameters({
			principalTokenIndex: principalTokenIndex,
			principalAmount: principalAmount,
			interestRate: interestRate,
			amortizationUnitType: amortizationUnitType,
			termLengthInAmortizationUnits: termLengthInAmortizationUnits
		});
	}

	function unpackCollateralParameters(
		bytes32 termsContractParameters
	)
		public view returns (CollateralParameters)
	{
		CollateralizerInterface collateralizer = CollateralizerInterface(contractRegistry.collateralizer());

		var (collateralTokenIndex, collateralAmount, gracePeriodInDays) =
			collateralizer.unpackCollateralParametersFromBytes(termsContractParameters);

		return CollateralParameters({
			collateralTokenIndex: collateralTokenIndex,
			collateralAmount: collateralAmount,
			gracePeriodInDays: gracePeriodInDays
		});
	}

	function verifyPrices(
		address priceFeedOperator,
		LTVDecisionEngineTypes.Price principalPrice,
		LTVDecisionEngineTypes.Price collateralPrice
	)
		internal view returns (bool)
	{
		uint minPriceTimestamp = block.timestamp - MAX_PRICE_TTL_IN_SECONDS;

		if (principalPrice.timestamp < minPriceTimestamp ||
			collateralPrice.timestamp < minPriceTimestamp) {
			return false;
		}

		bytes32 principalPriceHash = keccak256(
			principalPrice.value,
			principalPrice.tokenAddress,
			principalPrice.timestamp
		);

		bytes32 collateralPriceHash = keccak256(
			collateralPrice.value,
			collateralPrice.tokenAddress,
			collateralPrice.timestamp
		);

		bool principalPriceValid = isValidSignature(
			priceFeedOperator,
			principalPriceHash,
			principalPrice.signature
		);

		// We return early if the principal price information was not signed correctly.
		if (!principalPriceValid) {
			return false;
		}

		return isValidSignature(
			priceFeedOperator,
			collateralPriceHash,
			collateralPrice.signature
		);
	}

	function computeLTV(
		uint principalTokenPrice,
		uint collateralTokenPrice,
		uint principalAmount,
		uint collateralAmount
	)
		internal constant returns (uint)
	{
		uint principalValue = principalTokenPrice.mul(principalAmount).mul(10 ** PRECISION);
		uint collateralValue = collateralTokenPrice.mul(collateralAmount);

		return principalValue.div(collateralValue);
	}

	function isExpired(uint expirationTimestampInSec)
		internal view returns (bool expired)
	{
		return expirationTimestampInSec < block.timestamp;
	}
}

// External libraries
contract ERC20Basic {
  function totalSupply() public view returns (uint256);
  function balanceOf(address _who) public view returns (uint256);
  function transfer(address _to, uint256 _value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}
contract ERC20 is ERC20Basic {
  function allowance(address _owner, address _spender)
    public view returns (uint256);

  function transferFrom(address _from, address _to, uint256 _value)
    public returns (bool);

  function approve(address _spender, uint256 _value) public returns (bool);
  event Approval(
    address indexed owner,
    address indexed spender,
    uint256 value
  );
}
// Internal interfaces

contract CreditorProxyErrors {
    enum Errors {
            DEBT_OFFER_CANCELLED,
            DEBT_OFFER_ALREADY_FILLED,
            DEBT_OFFER_NON_CONSENSUAL,
            CREDITOR_BALANCE_OR_ALLOWANCE_INSUFFICIENT,
            DEBT_OFFER_CRITERIA_NOT_MET
        }

    event CreditorProxyError(
        uint8 indexed _errorId,
        address indexed _creditor,
        bytes32 indexed _creditorCommitmentHash
    );
}

contract CreditorProxyCoreInterface is CreditorProxyErrors {
    event DebtOfferFilled(address indexed _creditor, bytes32 indexed _creditorCommitmentHash, bytes32 indexed _agreementId);
    event DebtOfferCancelled(
        address indexed _creditor,
        bytes32 indexed _creditorCommitmentHash
    );
}


contract CreditorProxyCore is CreditorProxyCoreInterface {

	uint16 constant public EXTERNAL_QUERY_GAS_LIMIT = 8000;

	ContractRegistryInterface public contractRegistry;

	/**
	 * Helper function for transferring a specified amount of tokens between two parties.
	 */
	function transferTokensFrom(
		address _token,
		address _from,
		address _to,
		uint _amount
	)
		internal
		returns (bool _success)
	{
		return ERC20(_token).transferFrom(_from, _to, _amount);
	}

	/**
     * Helper function for querying this contract's allowance for transferring the given token.
     */
	function getAllowance(
		address token,
		address owner,
		address granter
	)
		internal
		view
	returns (uint _allowance)
	{
		// Limit gas to prevent reentrancy.
		return ERC20(token).allowance.gas(EXTERNAL_QUERY_GAS_LIMIT)(
			owner,
			granter
		);
	}
}



contract LTVCreditorProxy is CreditorProxyCore, LTVDecisionEngine {

	mapping (bytes32 => bool) public debtOfferCancelled;
	mapping (bytes32 => bool) public debtOfferFilled;

	bytes32 constant internal NULL_ISSUANCE_HASH = bytes32(0);

	function LTVCreditorProxy(address _contractRegistry) LTVDecisionEngine(_contractRegistry)
		public
	{
		contractRegistry = ContractRegistryInterface(_contractRegistry);
	}

	function fillDebtOffer(LTVDecisionEngineTypes.Params params)
		public returns (bytes32 agreementId)
	{
		OrderLibrary.DebtOrder memory order = params.order;
		CommitmentValues memory commitmentValues = params.creditorCommitment.values;

		bytes32 creditorCommitmentHash = hashCreditorCommitmentForOrder(commitmentValues, order);

		if (!evaluateConsent(params, creditorCommitmentHash)) {
			emit CreditorProxyError(uint8(Errors.DEBT_OFFER_NON_CONSENSUAL), order.creditor, creditorCommitmentHash);
			return NULL_ISSUANCE_HASH;
		}

		if (debtOfferFilled[creditorCommitmentHash]) {
			emit CreditorProxyError(uint8(Errors.DEBT_OFFER_ALREADY_FILLED), order.creditor, creditorCommitmentHash);
			return NULL_ISSUANCE_HASH;
		}

		if (debtOfferCancelled[creditorCommitmentHash]) {
			emit CreditorProxyError(uint8(Errors.DEBT_OFFER_CANCELLED), order.creditor, creditorCommitmentHash);
			return NULL_ISSUANCE_HASH;
		}

		if (!evaluateDecision(params)) {
			emit CreditorProxyError(
				uint8(Errors.DEBT_OFFER_CRITERIA_NOT_MET),
				order.creditor,
				creditorCommitmentHash
			);
			return NULL_ISSUANCE_HASH;
		}

		address principalToken = order.principalToken;

		// The allowance that the token transfer proxy has for this contract's tokens.
		uint tokenTransferAllowance = getAllowance(
			principalToken,
			address(this),
			contractRegistry.tokenTransferProxy()
		);

		uint totalCreditorPayment = order.principalAmount.add(order.creditorFee);

		// Ensure the token transfer proxy can transfer tokens from the creditor proxy
		if (tokenTransferAllowance < totalCreditorPayment) {
			require(setTokenTransferAllowance(principalToken, totalCreditorPayment));
		}

		// Transfer principal from creditor to CreditorProxy
		if (totalCreditorPayment > 0) {
			require(
				transferTokensFrom(
					principalToken,
					order.creditor,
					address(this),
					totalCreditorPayment
				)
			);
		}

		agreementId = sendOrderToKernel(order);

		require(agreementId != NULL_ISSUANCE_HASH);

		debtOfferFilled[creditorCommitmentHash] = true;

		contractRegistry.debtToken().transfer(order.creditor, uint256(agreementId));

		emit DebtOfferFilled(order.creditor, creditorCommitmentHash, agreementId);

		return agreementId;
	}

	function sendOrderToKernel(DebtOrder memory order) internal returns (bytes32 id)
	{
		address[6] memory orderAddresses;
		uint[8] memory orderValues;
		bytes32[1] memory orderBytes32;
		uint8[3] memory signaturesV;
		bytes32[3] memory signaturesR;
		bytes32[3] memory signaturesS;

		(orderAddresses, orderValues, orderBytes32, signaturesV, signaturesR, signaturesS) = unpackDebtOrder(order);

		return contractRegistry.debtKernel().fillDebtOrder(
			address(this),
			orderAddresses,
			orderValues,
			orderBytes32,
			signaturesV,
			signaturesR,
			signaturesS
		);
	}

	function cancelDebtOffer(LTVDecisionEngineTypes.Params params) public returns (bool) {
		LTVDecisionEngineTypes.CommitmentValues memory commitmentValues = params.creditorCommitment.values;
		OrderLibrary.DebtOrder memory order = params.order;
		
		// sender must be the creditor.
		require(msg.sender == order.creditor);

		bytes32 creditorCommitmentHash = hashCreditorCommitmentForOrder(commitmentValues, order);

		// debt offer must not already be filled.
		require(!debtOfferFilled[creditorCommitmentHash]);

		debtOfferCancelled[creditorCommitmentHash] = true;
		
		emit DebtOfferCancelled(order.creditor, creditorCommitmentHash);

		return true;
	}

	/**
     * Helper function for approving this address' allowance to Dharma's token transfer proxy.
     */
	function setTokenTransferAllowance(
		address token,
		uint amount
	)
		internal
		returns (bool _success)
	{
		return ERC20(token).approve(
			address(contractRegistry.tokenTransferProxy()),
			amount
		);
	}
}

    Contract ABI  
[{"constant":true,"inputs":[{"name":"termsContract","type":"address"},{"name":"termsContractParameters","type":"bytes32"}],"name":"getTermsContractCommitmentHash","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"components":[{"name":"maxLTV","type":"uint256"}],"name":"commitmentValues","type":"tuple"},{"components":[{"name":"kernelVersion","type":"address"},{"name":"issuanceVersion","type":"address"},{"name":"principalAmount","type":"uint256"},{"name":"principalToken","type":"address"},{"name":"collateralAmount","type":"uint256"},{"name":"collateralToken","type":"address"},{"name":"debtor","type":"address"},{"name":"debtorFee","type":"uint256"},{"name":"creditor","type":"address"},{"name":"creditorFee","type":"uint256"},{"name":"relayer","type":"address"},{"name":"relayerFee","type":"uint256"},{"name":"underwriter","type":"address"},{"name":"underwriterFee","type":"uint256"},{"name":"underwriterRiskRating","type":"uint256"},{"name":"termsContract","type":"address"},{"name":"termsContractParameters","type":"bytes32"},{"name":"expirationTimestampInSec","type":"uint256"},{"name":"salt","type":"uint256"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"debtorSignature","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"creditorSignature","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"underwriterSignature","type":"tuple"}],"name":"order","type":"tuple"}],"name":"hashCreditorCommitmentForOrder","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"creditor","type":"address"},{"name":"priceFeedOperator","type":"address"},{"components":[{"components":[{"name":"maxLTV","type":"uint256"}],"name":"values","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"signature","type":"tuple"}],"name":"creditorCommitment","type":"tuple"},{"components":[{"name":"value","type":"uint256"},{"name":"timestamp","type":"uint256"},{"name":"tokenAddress","type":"address"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"signature","type":"tuple"}],"name":"principalPrice","type":"tuple"},{"components":[{"name":"value","type":"uint256"},{"name":"timestamp","type":"uint256"},{"name":"tokenAddress","type":"address"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"signature","type":"tuple"}],"name":"collateralPrice","type":"tuple"},{"components":[{"name":"kernelVersion","type":"address"},{"name":"issuanceVersion","type":"address"},{"name":"principalAmount","type":"uint256"},{"name":"principalToken","type":"address"},{"name":"collateralAmount","type":"uint256"},{"name":"collateralToken","type":"address"},{"name":"debtor","type":"address"},{"name":"debtorFee","type":"uint256"},{"name":"creditor","type":"address"},{"name":"creditorFee","type":"uint256"},{"name":"relayer","type":"address"},{"name":"relayerFee","type":"uint256"},{"name":"underwriter","type":"address"},{"name":"underwriterFee","type":"uint256"},{"name":"underwriterRiskRating","type":"uint256"},{"name":"termsContract","type":"address"},{"name":"termsContractParameters","type":"bytes32"},{"name":"expirationTimestampInSec","type":"uint256"},{"name":"salt","type":"uint256"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"debtorSignature","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"creditorSignature","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"underwriterSignature","type":"tuple"}],"name":"order","type":"tuple"}],"name":"params","type":"tuple"}],"name":"cancelDebtOffer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"signer","type":"address"},{"name":"hash","type":"bytes32"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"signature","type":"tuple"}],"name":"isValidSignature","outputs":[{"name":"valid","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"MAX_PRICE_TTL_IN_SECONDS","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"components":[{"name":"creditor","type":"address"},{"name":"priceFeedOperator","type":"address"},{"components":[{"components":[{"name":"maxLTV","type":"uint256"}],"name":"values","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"signature","type":"tuple"}],"name":"creditorCommitment","type":"tuple"},{"components":[{"name":"value","type":"uint256"},{"name":"timestamp","type":"uint256"},{"name":"tokenAddress","type":"address"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"signature","type":"tuple"}],"name":"principalPrice","type":"tuple"},{"components":[{"name":"value","type":"uint256"},{"name":"timestamp","type":"uint256"},{"name":"tokenAddress","type":"address"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"signature","type":"tuple"}],"name":"collateralPrice","type":"tuple"},{"components":[{"name":"kernelVersion","type":"address"},{"name":"issuanceVersion","type":"address"},{"name":"principalAmount","type":"uint256"},{"name":"principalToken","type":"address"},{"name":"collateralAmount","type":"uint256"},{"name":"collateralToken","type":"address"},{"name":"debtor","type":"address"},{"name":"debtorFee","type":"uint256"},{"name":"creditor","type":"address"},{"name":"creditorFee","type":"uint256"},{"name":"relayer","type":"address"},{"name":"relayerFee","type":"uint256"},{"name":"underwriter","type":"address"},{"name":"underwriterFee","type":"uint256"},{"name":"underwriterRiskRating","type":"uint256"},{"name":"termsContract","type":"address"},{"name":"termsContractParameters","type":"bytes32"},{"name":"expirationTimestampInSec","type":"uint256"},{"name":"salt","type":"uint256"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"debtorSignature","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"creditorSignature","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"underwriterSignature","type":"tuple"}],"name":"order","type":"tuple"}],"name":"params","type":"tuple"}],"name":"evaluateDecision","outputs":[{"name":"_success","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"debtOfferCancelled","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PRECISION","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"contractRegistry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"components":[{"name":"creditor","type":"address"},{"name":"priceFeedOperator","type":"address"},{"components":[{"components":[{"name":"maxLTV","type":"uint256"}],"name":"values","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"signature","type":"tuple"}],"name":"creditorCommitment","type":"tuple"},{"components":[{"name":"value","type":"uint256"},{"name":"timestamp","type":"uint256"},{"name":"tokenAddress","type":"address"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"signature","type":"tuple"}],"name":"principalPrice","type":"tuple"},{"components":[{"name":"value","type":"uint256"},{"name":"timestamp","type":"uint256"},{"name":"tokenAddress","type":"address"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"signature","type":"tuple"}],"name":"collateralPrice","type":"tuple"},{"components":[{"name":"kernelVersion","type":"address"},{"name":"issuanceVersion","type":"address"},{"name":"principalAmount","type":"uint256"},{"name":"principalToken","type":"address"},{"name":"collateralAmount","type":"uint256"},{"name":"collateralToken","type":"address"},{"name":"debtor","type":"address"},{"name":"debtorFee","type":"uint256"},{"name":"creditor","type":"address"},{"name":"creditorFee","type":"uint256"},{"name":"relayer","type":"address"},{"name":"relayerFee","type":"uint256"},{"name":"underwriter","type":"address"},{"name":"underwriterFee","type":"uint256"},{"name":"underwriterRiskRating","type":"uint256"},{"name":"termsContract","type":"address"},{"name":"termsContractParameters","type":"bytes32"},{"name":"expirationTimestampInSec","type":"uint256"},{"name":"salt","type":"uint256"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"debtorSignature","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"creditorSignature","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"underwriterSignature","type":"tuple"}],"name":"order","type":"tuple"}],"name":"params","type":"tuple"},{"name":"commitmentHash","type":"bytes32"}],"name":"evaluateConsent","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"debtOfferFilled","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"components":[{"name":"creditor","type":"address"},{"name":"priceFeedOperator","type":"address"},{"components":[{"components":[{"name":"maxLTV","type":"uint256"}],"name":"values","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"signature","type":"tuple"}],"name":"creditorCommitment","type":"tuple"},{"components":[{"name":"value","type":"uint256"},{"name":"timestamp","type":"uint256"},{"name":"tokenAddress","type":"address"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"signature","type":"tuple"}],"name":"principalPrice","type":"tuple"},{"components":[{"name":"value","type":"uint256"},{"name":"timestamp","type":"uint256"},{"name":"tokenAddress","type":"address"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"signature","type":"tuple"}],"name":"collateralPrice","type":"tuple"},{"components":[{"name":"kernelVersion","type":"address"},{"name":"issuanceVersion","type":"address"},{"name":"principalAmount","type":"uint256"},{"name":"principalToken","type":"address"},{"name":"collateralAmount","type":"uint256"},{"name":"collateralToken","type":"address"},{"name":"debtor","type":"address"},{"name":"debtorFee","type":"uint256"},{"name":"creditor","type":"address"},{"name":"creditorFee","type":"uint256"},{"name":"relayer","type":"address"},{"name":"relayerFee","type":"uint256"},{"name":"underwriter","type":"address"},{"name":"underwriterFee","type":"uint256"},{"name":"underwriterRiskRating","type":"uint256"},{"name":"termsContract","type":"address"},{"name":"termsContractParameters","type":"bytes32"},{"name":"expirationTimestampInSec","type":"uint256"},{"name":"salt","type":"uint256"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"debtorSignature","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"creditorSignature","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"underwriterSignature","type":"tuple"}],"name":"order","type":"tuple"}],"name":"params","type":"tuple"}],"name":"fillDebtOffer","outputs":[{"name":"agreementId","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"termsContractParameters","type":"bytes32"}],"name":"unpackCollateralParameters","outputs":[{"components":[{"name":"collateralTokenIndex","type":"uint256"},{"name":"collateralAmount","type":"uint256"},{"name":"gracePeriodInDays","type":"uint256"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"components":[{"name":"kernelVersion","type":"address"},{"name":"issuanceVersion","type":"address"},{"name":"principalAmount","type":"uint256"},{"name":"principalToken","type":"address"},{"name":"collateralAmount","type":"uint256"},{"name":"collateralToken","type":"address"},{"name":"debtor","type":"address"},{"name":"debtorFee","type":"uint256"},{"name":"creditor","type":"address"},{"name":"creditorFee","type":"uint256"},{"name":"relayer","type":"address"},{"name":"relayerFee","type":"uint256"},{"name":"underwriter","type":"address"},{"name":"underwriterFee","type":"uint256"},{"name":"underwriterRiskRating","type":"uint256"},{"name":"termsContract","type":"address"},{"name":"termsContractParameters","type":"bytes32"},{"name":"expirationTimestampInSec","type":"uint256"},{"name":"salt","type":"uint256"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"debtorSignature","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"creditorSignature","type":"tuple"},{"components":[{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"underwriterSignature","type":"tuple"}],"name":"order","type":"tuple"}],"name":"unpackDebtOrder","outputs":[{"name":"orderAddresses","type":"address[6]"},{"name":"orderValues","type":"uint256[8]"},{"name":"orderBytes32","type":"bytes32[1]"},{"name":"signaturesV","type":"uint8[3]"},{"name":"signaturesR","type":"bytes32[3]"},{"name":"signaturesS","type":"bytes32[3]"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"name":"termsContract","type":"address"},{"name":"termsContractParameters","type":"bytes32"}],"name":"unpackSimpleInterestParameters","outputs":[{"components":[{"name":"principalTokenIndex","type":"uint256"},{"name":"principalAmount","type":"uint256"},{"name":"interestRate","type":"uint256"},{"name":"amortizationUnitType","type":"uint256"},{"name":"termLengthInAmortizationUnits","type":"uint256"}],"name":"","type":"tuple"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"EXTERNAL_QUERY_GAS_LIMIT","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_contractRegistry","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_creditor","type":"address"},{"indexed":true,"name":"_creditorCommitmentHash","type":"bytes32"},{"indexed":true,"name":"_agreementId","type":"bytes32"}],"name":"DebtOfferFilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_creditor","type":"address"},{"indexed":true,"name":"_creditorCommitmentHash","type":"bytes32"}],"name":"DebtOfferCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_errorId","type":"uint8"},{"indexed":true,"name":"_creditor","type":"address"},{"indexed":true,"name":"_creditorCommitmentHash","type":"bytes32"}],"name":"CreditorProxyError","type":"event"}]

  Contract Creation Code Switch To Opcodes View
60806040523480156200001157600080fd5b506040516020806200332a8339810180604052620000339190810190620000d4565b8080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505062000120565b6000620000cc825162000100565b905092915050565b600060208284031215620000e757600080fd5b6000620000f784828501620000be565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6131fa80620001306000396000f3006080604052600436106100e6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630257dbc9146100eb5780630a89d47c14610128578063314bdcdc14610165578063578911ac146101a25780637c3ea9fc146101df578063879ffab01461020a578063a318b5f714610247578063aaf5eb6814610284578063abf410e5146102af578063b120f0b4146102da578063c1614d0014610317578063cc9dbb1314610354578063cf99685c14610391578063e301885c146103ce578063e7083d2414610410578063f06bbf751461044d575b600080fd5b3480156100f757600080fd5b50610112600480360361010d9190810190612790565b610478565b60405161011f9190612f00565b60405180910390f35b34801561013457600080fd5b5061014f600480360361014a919081019061293a565b61050d565b60405161015c9190612f00565b60405180910390f35b34801561017157600080fd5b5061018c600480360361018791908101906129a1565b6106f1565b6040516101999190612ee5565b60405180910390f35b3480156101ae57600080fd5b506101c960048036036101c491908101906127cc565b610824565b6040516101d69190612ee5565b60405180910390f35b3480156101eb57600080fd5b506101f4610966565b6040516102019190612fcc565b60405180910390f35b34801561021657600080fd5b50610231600480360361022c91908101906129a1565b61096c565b60405161023e9190612ee5565b60405180910390f35b34801561025357600080fd5b5061026e60048036036102699190810190612844565b610a52565b60405161027b9190612ee5565b60405180910390f35b34801561029057600080fd5b50610299610a72565b6040516102a69190612fcc565b60405180910390f35b3480156102bb57600080fd5b506102c4610a77565b6040516102d19190612f60565b60405180910390f35b3480156102e657600080fd5b5061030160048036036102fc91908101906129cb565b610a9d565b60405161030e9190612ee5565b60405180910390f35b34801561032357600080fd5b5061033e60048036036103399190810190612844565b610ae5565b60405161034b9190612ee5565b60405180910390f35b34801561036057600080fd5b5061037b600480360361037691908101906129a1565b610b05565b6040516103889190612f00565b60405180910390f35b34801561039d57600080fd5b506103b860048036036103b39190810190612844565b611096565b6040516103c59190612f7b565b60405180910390f35b3480156103da57600080fd5b506103f560048036036103f09190810190612977565b611238565b60405161040796959493929190612e7f565b60405180910390f35b34801561041c57600080fd5b5061043760048036036104329190810190612790565b611533565b6040516104449190612f96565b60405180910390f35b34801561045957600080fd5b5061046261162e565b60405161046f9190612fb1565b60405180910390f35b6000610482611d28565b61048a611d58565b6104948585611533565b915061049f84611096565b905081600001518260200151836040015184606001518560800151856000015186604001516040518088815260200187815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060405180910390209250505092915050565b600080610524836101e00151846102000151610478565b905082610100015183600001518460200151856101e00151866060015187610240015188604001518961012001518a61022001518c600001518a604051808c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140187815260200186815260200185815260200184815260200183815260200182600019166000191681526020019b505050505050505050505050604051809103902091505092915050565b60006106fb611d7a565b610703611d8e565b600084604001516000015192508460a00151915081610100015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561075657600080fd5b610760838361050d565b905060036000826000191660001916815260200190815260200160002060009054906101000a900460ff1615151561079757600080fd5b600160026000836000191660001916815260200190815260200160002060006101000a81548160ff021916908315150217905550806000191682610100015173ffffffffffffffffffffffffffffffffffffffff167f320c5376a3da7bddef2f74a91d4575f1a8547203712054ca2cf5f3ae3cadeb0560405160405180910390a360019350505050919050565b6000806040805190810160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250846040518083805190602001908083835b602083101515610893578051825260208201915060208101905060208303925061086e565b6001836020036101000a038019825116818451168082178552505050505050905001826000191660001916815260200192505050604051809103902090508473ffffffffffffffffffffffffffffffffffffffff16600182856000015186602001518760400151604051600081526020016040526040516109179493929190612f1b565b60206040516020810390808403906000865af115801561093b573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16149150509392505050565b61025881565b6000610976611f11565b61097e611f11565b6000610988611d8e565b600080600088606001519650886080015195508860400151600001516000015194508860a001519350856000015192506109c6846102200151611634565b156109d45760009750610a46565b6000846080015114806109e75750600083145b156109f55760009750610a46565b610a118760000151876000015186604001518760800151611640565b9150610a3d610a2b600260046116a490919063ffffffff16565b600a0a866116bd90919063ffffffff16565b90508082111597505b50505050505050919050565b60026020528060005260406000206000915054906101000a900460ff1681565b600481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000610ab6836000015183856040015160200151610824565b1515610ac55760009050610adf565b610adc8360200151846060015185608001516116f5565b90505b92915050565b60036020528060005260406000206000915054906101000a900460ff1681565b6000610b0f611d8e565b610b17611d7a565b6000806000808760a0015195508760400151600001519450610b39858761050d565b9350610b458885610a9d565b1515610bb457836000191686610100015173ffffffffffffffffffffffffffffffffffffffff1660026004811115610b7957fe5b60ff167f9fd787e2a5fcbda76c8a1a1f8bb14a3328d4991b94bd7461fe7468aaedbd6d2460405160405180910390a46000600102965061108b565b60036000856000191660001916815260200190815260200160002060009054906101000a900460ff1615610c4b57836000191686610100015173ffffffffffffffffffffffffffffffffffffffff1660016004811115610c1057fe5b60ff167f9fd787e2a5fcbda76c8a1a1f8bb14a3328d4991b94bd7461fe7468aaedbd6d2460405160405180910390a46000600102965061108b565b60026000856000191660001916815260200190815260200160002060009054906101000a900460ff1615610ce257836000191686610100015173ffffffffffffffffffffffffffffffffffffffff1660006004811115610ca757fe5b60ff167f9fd787e2a5fcbda76c8a1a1f8bb14a3328d4991b94bd7461fe7468aaedbd6d2460405160405180910390a46000600102965061108b565b610ceb8861096c565b1515610d5957836000191686610100015173ffffffffffffffffffffffffffffffffffffffff16600480811115610d1e57fe5b60ff167f9fd787e2a5fcbda76c8a1a1f8bb14a3328d4991b94bd7461fe7468aaedbd6d2460405160405180910390a46000600102965061108b565b85606001519250610e288330600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630eefdbad6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610deb57600080fd5b505af1158015610dff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610e239190810190612911565b611843565b9150610e4686610120015187604001516118ff90919063ffffffff16565b905080821015610e6657610e5a838261191b565b1515610e6557600080fd5b5b6000811115610e8c57610e80838761010001513084611a8b565b1515610e8b57600080fd5b5b610e9586611b42565b9650600060010260001916876000191614151515610eb257600080fd5b600160036000866000191660001916815260200190815260200160002060006101000a81548160ff021916908315150217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f8d898986040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610f6c57600080fd5b505af1158015610f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610fa491908101906128e8565b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87610100015189600190046040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611003929190612e56565b600060405180830381600087803b15801561101d57600080fd5b505af1158015611031573d6000803e3d6000fd5b505050508660001916846000191687610100015173ffffffffffffffffffffffffffffffffffffffff167fdc3cdf07a43996ceac82462ded070dbc1bf60c3d66cfa11770cd91a41b1c62e060405160405180910390a48696505b505050505050919050565b61109e611d58565b600080600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663869f05116040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561112a57600080fd5b505af115801561113e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506111629190810190612896565b93508373ffffffffffffffffffffffffffffffffffffffff1663ca062647876040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016111b99190612f00565b606060405180830381600087803b1580156111d357600080fd5b505af11580156111e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061120b9190810190612a32565b92509250925060606040519081016040528084815260200183815260200182815250945050505050919050565b611240611f56565b611248611f79565b611250611f9d565b611258611fc0565b611260611fe3565b611268611fe3565b60c060405190810160405280886020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018860c0015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200188610180015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001886101e0015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001886060015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200188610140015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525061010060405190810160405280896101c001518152602001896102400151815260200189604001518152602001896101a001518152602001896101600151815260200189610120015181526020018960e0015181526020018961022001518152506020604051908101604052808a610200015160001916600019168152506060604051908101604052808b61026001516000015160ff1660ff1681526020018b61028001516000015160ff1660ff1681526020018b6102a001516000015160ff1660ff168152506060604051908101604052808c610260015160200151600019166000191681526020018c610280015160200151600019166000191681526020018c6102a001516020015160001916600019168152506060604051908101604052808d610260015160400151600019166000191681526020018d610280015160400151600019166000191681526020018d6102a0015160400151600019166000191681525095509550955095509550955091939550919395565b61153b611d28565b6000806000806000808895508573ffffffffffffffffffffffffffffffffffffffff1663ed8907d7896040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040161159c9190612f00565b60a060405180830381600087803b1580156115b657600080fd5b505af11580156115ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506115ee9190810190612a81565b9450945094509450945060a06040519081016040528086815260200185815260200184815260200183815260200182815250965050505050505092915050565b611f4081565b60004282109050919050565b600080600061166e6004600a0a611660878a6116bd90919063ffffffff16565b6116bd90919063ffffffff16565b915061168384876116bd90919063ffffffff16565b90506116988183611d1290919063ffffffff16565b92505050949350505050565b60008282111515156116b257fe5b818303905092915050565b6000808314156116d057600090506116ef565b81830290508183828115156116e157fe5b041415156116eb57fe5b8090505b92915050565b60008060008060006102584203935083876020015110806117195750838660200151105b156117275760009450611838565b866000015187604001518860200151604051808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c01000000000000000000000000028152601401828152602001935050505060405180910390209250856000015186604001518760200151604051808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140182815260200193505050506040518091039020915061181488848960600151610824565b90508015156118265760009450611838565b61183588838860600151610824565b94505b505050509392505050565b60008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e611f4061ffff1685856040518463ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016118a3929190612d82565b602060405180830381600088803b1580156118bd57600080fd5b5087f11580156118d1573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052506118f69190810190612a09565b90509392505050565b6000818301905082811015151561191257fe5b80905092915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630eefdbad6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156119bf57600080fd5b505af11580156119d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506119f79190810190612911565b846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611a31929190612e56565b602060405180830381600087803b158015611a4b57600080fd5b505af1158015611a5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611a83919081019061281b565b905092915050565b60008473ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611ae693929190612dab565b602060405180830381600087803b158015611b0057600080fd5b505af1158015611b14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611b38919081019061281b565b9050949350505050565b6000611b4c611f56565b611b54611f79565b611b5c611f9d565b611b64611fc0565b611b6c611fe3565b611b74611fe3565b611b7d88611238565b809650819750829850839950849a50859b50505050505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663079dd4b76040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611c1b57600080fd5b505af1158015611c2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611c5391908101906128bf565b73ffffffffffffffffffffffffffffffffffffffff1663e6488fc9308888888888886040518863ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401611cb39796959493929190612de2565b602060405180830381600087803b158015611ccd57600080fd5b505af1158015611ce1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611d05919081019061286d565b9650505050505050919050565b60008183811515611d1f57fe5b04905092915050565b60a06040519081016040528060008152602001600081526020016000815260200160008152602001600081525090565b6060604051908101604052806000815260200160008152602001600081525090565b602060405190810160405280600081525090565b61038060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600080191681526020016000815260200160008152602001611ef1612006565b8152602001611efe612006565b8152602001611f0b612006565b81525090565b60c0604051908101604052806000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001611f50612006565b81525090565b60c060405190810160405280600690602082028038833980820191505090505090565b61010060405190810160405280600890602082028038833980820191505090505090565b602060405190810160405280600190602082028038833980820191505090505090565b606060405190810160405280600390602082028038833980820191505090505090565b606060405190810160405280600390602082028038833980820191505090505090565b606060405190810160405280600060ff16815260200160008019168152602001600080191681525090565b600061203d8235613119565b905092915050565b60006120518251613139565b905092915050565b60006120658235613145565b905092915050565b60006120798251613145565b905092915050565b600061208d825161314f565b905092915050565b60006120a18251613161565b905092915050565b60006120b58251613173565b905092915050565b60006120c98251613185565b905092915050565b6000602082840312156120e357600080fd5b6120ed6020612fe7565b905060006120fd84828501612754565b60008301525092915050565b60006020828403121561211b57600080fd5b6121256020612fe7565b9050600061213584828501612754565b60008301525092915050565b60006080828403121561215357600080fd5b61215d6040612fe7565b9050600061216d848285016120d1565b600083015250602061218184828501612581565b60208301525092915050565b600061038082840312156121a057600080fd5b6121ab6102c0612fe7565b905060006121bb84828501612031565b60008301525060206121cf84828501612031565b60208301525060406121e384828501612754565b60408301525060606121f784828501612031565b606083015250608061220b84828501612754565b60808301525060a061221f84828501612031565b60a08301525060c061223384828501612031565b60c08301525060e061224784828501612754565b60e08301525061010061225c84828501612031565b6101008301525061012061227284828501612754565b6101208301525061014061228884828501612031565b6101408301525061016061229e84828501612754565b610160830152506101806122b484828501612031565b610180830152506101a06122ca84828501612754565b6101a0830152506101c06122e084828501612754565b6101c0830152506101e06122f684828501612031565b6101e08301525061020061230c84828501612059565b6102008301525061022061232284828501612754565b6102208301525061024061233884828501612754565b6102408301525061026061234e84828501612581565b610260830152506102c061236484828501612581565b6102808301525061032061237a84828501612581565b6102a08301525092915050565b6000610380828403121561239a57600080fd5b6123a56102c0612fe7565b905060006123b584828501612031565b60008301525060206123c984828501612031565b60208301525060406123dd84828501612754565b60408301525060606123f184828501612031565b606083015250608061240584828501612754565b60808301525060a061241984828501612031565b60a08301525060c061242d84828501612031565b60c08301525060e061244184828501612754565b60e08301525061010061245684828501612031565b6101008301525061012061246c84828501612754565b6101208301525061014061248284828501612031565b6101408301525061016061249884828501612754565b610160830152506101806124ae84828501612031565b610180830152506101a06124c484828501612754565b6101a0830152506101c06124da84828501612754565b6101c0830152506101e06124f084828501612031565b6101e08301525061020061250684828501612059565b6102008301525061022061251c84828501612754565b6102208301525061024061253284828501612754565b6102408301525061026061254884828501612581565b610260830152506102c061255e84828501612581565b6102808301525061032061257484828501612581565b6102a08301525092915050565b60006060828403121561259357600080fd5b61259d6060612fe7565b905060006125ad8482850161277c565b60008301525060206125c184828501612059565b60208301525060406125d584828501612059565b60408301525092915050565b6000606082840312156125f357600080fd5b6125fd6060612fe7565b9050600061260d8482850161277c565b600083015250602061262184828501612059565b602083015250604061263584828501612059565b60408301525092915050565b60006105c0828403121561265457600080fd5b61265e60c0612fe7565b9050600061266e84828501612031565b600083015250602061268284828501612031565b602083015250604061269684828501612141565b60408301525060c06126aa848285016126e0565b6060830152506101806126bf848285016126e0565b6080830152506102406126d48482850161218d565b60a08301525092915050565b600060c082840312156126f257600080fd5b6126fc6080612fe7565b9050600061270c84828501612754565b600083015250602061272084828501612754565b602083015250604061273484828501612031565b604083015250606061274884828501612581565b60608301525092915050565b60006127608235613197565b905092915050565b60006127748251613197565b905092915050565b600061278882356131a1565b905092915050565b600080604083850312156127a357600080fd5b60006127b185828601612031565b92505060206127c285828601612059565b9150509250929050565b600080600060a084860312156127e157600080fd5b60006127ef86828701612031565b935050602061280086828701612059565b9250506040612811868287016125e1565b9150509250925092565b60006020828403121561282d57600080fd5b600061283b84828501612045565b91505092915050565b60006020828403121561285657600080fd5b600061286484828501612059565b91505092915050565b60006020828403121561287f57600080fd5b600061288d8482850161206d565b91505092915050565b6000602082840312156128a857600080fd5b60006128b684828501612081565b91505092915050565b6000602082840312156128d157600080fd5b60006128df84828501612095565b91505092915050565b6000602082840312156128fa57600080fd5b6000612908848285016120a9565b91505092915050565b60006020828403121561292357600080fd5b6000612931848285016120bd565b91505092915050565b6000806103a0838503121561294e57600080fd5b600061295c85828601612109565b925050602061296d85828601612387565b9150509250929050565b6000610380828403121561298a57600080fd5b600061299884828501612387565b91505092915050565b60006105c082840312156129b457600080fd5b60006129c284828501612641565b91505092915050565b6000806105e083850312156129df57600080fd5b60006129ed85828601612641565b9250506105c06129ff85828601612059565b9150509250929050565b600060208284031215612a1b57600080fd5b6000612a2984828501612768565b91505092915050565b600080600060608486031215612a4757600080fd5b6000612a5586828701612768565b9350506020612a6686828701612768565b9250506040612a7786828701612768565b9150509250925092565b600080600080600060a08688031215612a9957600080fd5b6000612aa788828901612768565b9550506020612ab888828901612768565b9450506040612ac988828901612768565b9350506060612ada88828901612768565b9250506080612aeb88828901612768565b9150509295509295909350565b612b01816130be565b82525050565b612b1081613046565b612b1982613014565b60005b82811015612b4b57612b2f858351612af8565b612b388261307d565b9150602085019450600181019050612b1c565b5050505050565b612b5b81613051565b612b648261301e565b60005b82811015612b9657612b7a858351612c8d565b612b838261308a565b9150602085019450600181019050612b67565b5050505050565b612ba68161305c565b612baf82613028565b60005b82811015612be157612bc5858351612c8d565b612bce82613097565b9150602085019450600181019050612bb2565b5050505050565b612bf181613067565b612bfa82613032565b60005b82811015612c2c57612c10858351612d64565b612c19826130a4565b9150602085019450600181019050612bfd565b5050505050565b612c3c81613072565b612c458261303c565b60005b82811015612c7757612c5b858351612d73565b612c64826130b1565b9150602085019450600181019050612c48565b5050505050565b612c87816130de565b82525050565b612c96816130ea565b82525050565b612ca5816131ae565b82525050565b606082016000820151612cc16000850182612d64565b506020820151612cd46020850182612d64565b506040820151612ce76040850182612d64565b50505050565b60a082016000820151612d036000850182612d64565b506020820151612d166020850182612d64565b506040820151612d296040850182612d64565b506060820151612d3c6060850182612d64565b506080820151612d4f6080850182612d64565b50505050565b612d5e816130f4565b82525050565b612d6d81613102565b82525050565b612d7c8161310c565b82525050565b6000604082019050612d976000830185612af8565b612da46020830184612af8565b9392505050565b6000606082019050612dc06000830186612af8565b612dcd6020830185612af8565b612dda6040830184612d64565b949350505050565b600061032082019050612df8600083018a612af8565b612e056020830189612b07565b612e1260e0830188612be8565b612e206101e0830187612b52565b612e2e610200830186612c33565b612e3c610260830185612b9d565b612e4a6102c0830184612b9d565b98975050505050505050565b6000604082019050612e6b6000830185612af8565b612e786020830184612d64565b9392505050565b600061030082019050612e956000830189612b07565b612ea260c0830188612be8565b612eb06101c0830187612b52565b612ebe6101e0830186612c33565b612ecc610240830185612b9d565b612eda6102a0830184612b9d565b979650505050505050565b6000602082019050612efa6000830184612c7e565b92915050565b6000602082019050612f156000830184612c8d565b92915050565b6000608082019050612f306000830187612c8d565b612f3d6020830186612d73565b612f4a6040830185612c8d565b612f576060830184612c8d565b95945050505050565b6000602082019050612f756000830184612c9c565b92915050565b6000606082019050612f906000830184612cab565b92915050565b600060a082019050612fab6000830184612ced565b92915050565b6000602082019050612fc66000830184612d55565b92915050565b6000602082019050612fe16000830184612d64565b92915050565b6000604051905081810181811067ffffffffffffffff8211171561300a57600080fd5b8060405250919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b600060069050919050565b600060019050919050565b600060039050919050565b600060089050919050565b600060039050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60008115159050919050565b6000819050919050565b600061ffff82169050919050565b6000819050919050565b600060ff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60008115159050919050565b6000819050919050565b600061315a826130be565b9050919050565b600061316c826130be565b9050919050565b600061317e826130be565b9050919050565b6000613190826130be565b9050919050565b6000819050919050565b600060ff82169050919050565b60006131b9826130be565b90509190505600a265627a7a72305820caa4e28da1005da8ae3f3feb1037e235192094e1abd9b2e74d24a7685c45d5636c6578706572696d656e74616cf50037000000000000000000000000e1ccba52a8f7c4885ef10b10c3ba438072bd96e1

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

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000e1ccba52a8f7c4885ef10b10c3ba438072bd96e1


   Swarm Source:
bzzr://caa4e28da1005da8ae3f3feb1037e235192094e1abd9b2e74d24a7685c45d563

 

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