{
  "contractName": "NaiveDecisionEngine",
  "abi": [
    {
      "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": [
        {
          "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": [
        {
          "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": "commitmentHash",
          "type": "bytes32"
        }
      ],
      "name": "evaluateConsent",
      "outputs": [
        {
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "pure",
      "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": "hashCreditorCommitmentForOrder",
      "outputs": [
        {
          "name": "_creditorCommitmentHash",
          "type": "bytes32"
        }
      ],
      "payable": false,
      "stateMutability": "pure",
      "type": "function"
    }
  ],
  "bytecode": "0x608060405234801561001057600080fd5b50611033806100206000396000f300608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063072f262e14610067578063578911ac146100a4578063d46b836d146100e1578063e301885c1461011e575b600080fd5b34801561007357600080fd5b5061008e60048036036100899190810190610b89565b610160565b60405161009b9190610e34565b60405180910390f35b3480156100b057600080fd5b506100cb60048036036100c69190810190610b3a565b610324565b6040516100d89190610e19565b60405180910390f35b3480156100ed57600080fd5b5061010860048036036101039190810190610bb3565b610466565b6040516101159190610e19565b60405180910390f35b34801561012a57600080fd5b5061014560048036036101409190810190610b89565b610485565b60405161015796959493929190610db3565b60405180910390f35b600081610100015182600001518360200151846101e00151856060015186610240015187604001518861012001518961022001518a6102000151604051808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140186815260200185815260200184815260200183815260200182600019166000191681526020019a505050505050505050505060405180910390209050919050565b6000806040805190810160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250846040518083805190602001908083835b602083101515610393578051825260208201915060208101905060208303925061036e565b6001836020036101000a038019825116818451168082178552505050505050905001826000191660001916815260200192505050604051809103902090508473ffffffffffffffffffffffffffffffffffffffff16600182856000015186602001518760400151604051600081526020016040526040516104179493929190610e4f565b60206040516020810390808403906000865af115801561043b573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16149150509392505050565b600061047d83610100015183856102800151610324565b905092915050565b61048d610780565b6104956107a3565b61049d6107c7565b6104a56107ea565b6104ad61080d565b6104b561080d565b60c060405190810160405280886000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018860c0015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200188610180015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001886101e0015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001886060015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200188610140015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525061010060405190810160405280896101c001518152602001896102400151815260200189604001518152602001896101a001518152602001896101600151815260200189610120015181526020018960e0015181526020018961022001518152506020604051908101604052808a610200015160001916600019168152506060604051908101604052808b61026001516000015160ff1660ff1681526020018b61028001516000015160ff1660ff1681526020018b6102a001516000015160ff1660ff168152506060604051908101604052808c610260015160200151600019166000191681526020018c610280015160200151600019166000191681526020018c6102a001516020015160001916600019168152506060604051908101604052808d610260015160400151600019166000191681526020018d610280015160400151600019166000191681526020018d6102a0015160400151600019166000191681525095509550955095509550955091939550919395565b60c060405190810160405280600690602082028038833980820191505090505090565b61010060405190810160405280600890602082028038833980820191505090505090565b602060405190810160405280600190602082028038833980820191505090505090565b606060405190810160405280600390602082028038833980820191505090505090565b606060405190810160405280600390602082028038833980820191505090505090565b600061083c8235610fb8565b905092915050565b60006108508235610fd8565b905092915050565b6000610380828403121561086b57600080fd5b6108766102c0610e94565b9050600061088684828501610830565b600083015250602061089a84828501610830565b60208301525060406108ae84828501610b12565b60408301525060606108c284828501610830565b60608301525060806108d684828501610b12565b60808301525060a06108ea84828501610830565b60a08301525060c06108fe84828501610830565b60c08301525060e061091284828501610b12565b60e08301525061010061092784828501610830565b6101008301525061012061093d84828501610b12565b6101208301525061014061095384828501610830565b6101408301525061016061096984828501610b12565b6101608301525061018061097f84828501610830565b610180830152506101a061099584828501610b12565b6101a0830152506101c06109ab84828501610b12565b6101c0830152506101e06109c184828501610830565b6101e0830152506102006109d784828501610844565b610200830152506102206109ed84828501610b12565b61022083015250610240610a0384828501610b12565b61024083015250610260610a1984828501610a52565b610260830152506102c0610a2f84828501610a52565b61028083015250610320610a4584828501610a52565b6102a08301525092915050565b600060608284031215610a6457600080fd5b610a6e6060610e94565b90506000610a7e84828501610b26565b6000830152506020610a9284828501610844565b6020830152506040610aa684828501610844565b60408301525092915050565b600060608284031215610ac457600080fd5b610ace6060610e94565b90506000610ade84828501610b26565b6000830152506020610af284828501610844565b6020830152506040610b0684828501610844565b60408301525092915050565b6000610b1e8235610fe2565b905092915050565b6000610b328235610fec565b905092915050565b600080600060a08486031215610b4f57600080fd5b6000610b5d86828701610830565b9350506020610b6e86828701610844565b9250506040610b7f86828701610ab2565b9150509250925092565b60006103808284031215610b9c57600080fd5b6000610baa84828501610858565b91505092915050565b6000806103a08385031215610bc757600080fd5b6000610bd585828601610858565b925050610380610be785828601610844565b9150509250929050565b610bfa81610f6b565b82525050565b610c0981610ef3565b610c1282610ec1565b60005b82811015610c4457610c28858351610bf1565b610c3182610f2a565b9150602085019450600181019050610c15565b5050505050565b610c5481610efe565b610c5d82610ecb565b60005b82811015610c8f57610c73858351610d86565b610c7c82610f37565b9150602085019450600181019050610c60565b5050505050565b610c9f81610f09565b610ca882610ed5565b60005b82811015610cda57610cbe858351610d86565b610cc782610f44565b9150602085019450600181019050610cab565b5050505050565b610cea81610f14565b610cf382610edf565b60005b82811015610d2557610d09858351610d95565b610d1282610f51565b9150602085019450600181019050610cf6565b5050505050565b610d3581610f1f565b610d3e82610ee9565b60005b82811015610d7057610d54858351610da4565b610d5d82610f5e565b9150602085019450600181019050610d41565b5050505050565b610d8081610f8b565b82525050565b610d8f81610f97565b82525050565b610d9e81610fa1565b82525050565b610dad81610fab565b82525050565b600061030082019050610dc96000830189610c00565b610dd660c0830188610ce1565b610de46101c0830187610c4b565b610df26101e0830186610d2c565b610e00610240830185610c96565b610e0e6102a0830184610c96565b979650505050505050565b6000602082019050610e2e6000830184610d77565b92915050565b6000602082019050610e496000830184610d86565b92915050565b6000608082019050610e646000830187610d86565b610e716020830186610da4565b610e7e6040830185610d86565b610e8b6060830184610d86565b95945050505050565b6000604051905081810181811067ffffffffffffffff82111715610eb757600080fd5b8060405250919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b600060069050919050565b600060019050919050565b600060039050919050565b600060089050919050565b600060039050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60008115159050919050565b6000819050919050565b6000819050919050565b600060ff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000819050919050565b600060ff821690509190505600a265627a7a7230582071f74b3206ac12889d8fa3e6e32773dc41e44a9a47b86c88637b1806766c61b16c6578706572696d656e74616cf50037",
  "deployedBytecode": "0x608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063072f262e14610067578063578911ac146100a4578063d46b836d146100e1578063e301885c1461011e575b600080fd5b34801561007357600080fd5b5061008e60048036036100899190810190610b89565b610160565b60405161009b9190610e34565b60405180910390f35b3480156100b057600080fd5b506100cb60048036036100c69190810190610b3a565b610324565b6040516100d89190610e19565b60405180910390f35b3480156100ed57600080fd5b5061010860048036036101039190810190610bb3565b610466565b6040516101159190610e19565b60405180910390f35b34801561012a57600080fd5b5061014560048036036101409190810190610b89565b610485565b60405161015796959493929190610db3565b60405180910390f35b600081610100015182600001518360200151846101e00151856060015186610240015187604001518861012001518961022001518a6102000151604051808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140186815260200185815260200184815260200183815260200182600019166000191681526020019a505050505050505050505060405180910390209050919050565b6000806040805190810160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250846040518083805190602001908083835b602083101515610393578051825260208201915060208101905060208303925061036e565b6001836020036101000a038019825116818451168082178552505050505050905001826000191660001916815260200192505050604051809103902090508473ffffffffffffffffffffffffffffffffffffffff16600182856000015186602001518760400151604051600081526020016040526040516104179493929190610e4f565b60206040516020810390808403906000865af115801561043b573d6000803e3d6000fd5b5050506020604051035173ffffffffffffffffffffffffffffffffffffffff16149150509392505050565b600061047d83610100015183856102800151610324565b905092915050565b61048d610780565b6104956107a3565b61049d6107c7565b6104a56107ea565b6104ad61080d565b6104b561080d565b60c060405190810160405280886000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018860c0015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200188610180015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001886101e0015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001886060015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200188610140015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525061010060405190810160405280896101c001518152602001896102400151815260200189604001518152602001896101a001518152602001896101600151815260200189610120015181526020018960e0015181526020018961022001518152506020604051908101604052808a610200015160001916600019168152506060604051908101604052808b61026001516000015160ff1660ff1681526020018b61028001516000015160ff1660ff1681526020018b6102a001516000015160ff1660ff168152506060604051908101604052808c610260015160200151600019166000191681526020018c610280015160200151600019166000191681526020018c6102a001516020015160001916600019168152506060604051908101604052808d610260015160400151600019166000191681526020018d610280015160400151600019166000191681526020018d6102a0015160400151600019166000191681525095509550955095509550955091939550919395565b60c060405190810160405280600690602082028038833980820191505090505090565b61010060405190810160405280600890602082028038833980820191505090505090565b602060405190810160405280600190602082028038833980820191505090505090565b606060405190810160405280600390602082028038833980820191505090505090565b606060405190810160405280600390602082028038833980820191505090505090565b600061083c8235610fb8565b905092915050565b60006108508235610fd8565b905092915050565b6000610380828403121561086b57600080fd5b6108766102c0610e94565b9050600061088684828501610830565b600083015250602061089a84828501610830565b60208301525060406108ae84828501610b12565b60408301525060606108c284828501610830565b60608301525060806108d684828501610b12565b60808301525060a06108ea84828501610830565b60a08301525060c06108fe84828501610830565b60c08301525060e061091284828501610b12565b60e08301525061010061092784828501610830565b6101008301525061012061093d84828501610b12565b6101208301525061014061095384828501610830565b6101408301525061016061096984828501610b12565b6101608301525061018061097f84828501610830565b610180830152506101a061099584828501610b12565b6101a0830152506101c06109ab84828501610b12565b6101c0830152506101e06109c184828501610830565b6101e0830152506102006109d784828501610844565b610200830152506102206109ed84828501610b12565b61022083015250610240610a0384828501610b12565b61024083015250610260610a1984828501610a52565b610260830152506102c0610a2f84828501610a52565b61028083015250610320610a4584828501610a52565b6102a08301525092915050565b600060608284031215610a6457600080fd5b610a6e6060610e94565b90506000610a7e84828501610b26565b6000830152506020610a9284828501610844565b6020830152506040610aa684828501610844565b60408301525092915050565b600060608284031215610ac457600080fd5b610ace6060610e94565b90506000610ade84828501610b26565b6000830152506020610af284828501610844565b6020830152506040610b0684828501610844565b60408301525092915050565b6000610b1e8235610fe2565b905092915050565b6000610b328235610fec565b905092915050565b600080600060a08486031215610b4f57600080fd5b6000610b5d86828701610830565b9350506020610b6e86828701610844565b9250506040610b7f86828701610ab2565b9150509250925092565b60006103808284031215610b9c57600080fd5b6000610baa84828501610858565b91505092915050565b6000806103a08385031215610bc757600080fd5b6000610bd585828601610858565b925050610380610be785828601610844565b9150509250929050565b610bfa81610f6b565b82525050565b610c0981610ef3565b610c1282610ec1565b60005b82811015610c4457610c28858351610bf1565b610c3182610f2a565b9150602085019450600181019050610c15565b5050505050565b610c5481610efe565b610c5d82610ecb565b60005b82811015610c8f57610c73858351610d86565b610c7c82610f37565b9150602085019450600181019050610c60565b5050505050565b610c9f81610f09565b610ca882610ed5565b60005b82811015610cda57610cbe858351610d86565b610cc782610f44565b9150602085019450600181019050610cab565b5050505050565b610cea81610f14565b610cf382610edf565b60005b82811015610d2557610d09858351610d95565b610d1282610f51565b9150602085019450600181019050610cf6565b5050505050565b610d3581610f1f565b610d3e82610ee9565b60005b82811015610d7057610d54858351610da4565b610d5d82610f5e565b9150602085019450600181019050610d41565b5050505050565b610d8081610f8b565b82525050565b610d8f81610f97565b82525050565b610d9e81610fa1565b82525050565b610dad81610fab565b82525050565b600061030082019050610dc96000830189610c00565b610dd660c0830188610ce1565b610de46101c0830187610c4b565b610df26101e0830186610d2c565b610e00610240830185610c96565b610e0e6102a0830184610c96565b979650505050505050565b6000602082019050610e2e6000830184610d77565b92915050565b6000602082019050610e496000830184610d86565b92915050565b6000608082019050610e646000830187610d86565b610e716020830186610da4565b610e7e6040830185610d86565b610e8b6060830184610d86565b95945050505050565b6000604051905081810181811067ffffffffffffffff82111715610eb757600080fd5b8060405250919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050919050565b600060069050919050565b600060019050919050565b600060039050919050565b600060089050919050565b600060039050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60008115159050919050565b6000819050919050565b6000819050919050565b600060ff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000819050919050565b600060ff821690509190505600a265627a7a7230582071f74b3206ac12889d8fa3e6e32773dc41e44a9a47b86c88637b1806766c61b16c6578706572696d656e74616cf50037",
  "sourceMap": "167:1027:1:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;167:1027:1;;;;;;;",
  "deployedSourceMap": "167:1027:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;446:746;;8:9:-1;5:2;;;30:1;27;20:12;5:2;446:746:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;228:268:16;;8:9:-1;5:2;;;30:1;27;20:12;5:2;228:268:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;235:208:1;;8:9:-1;5:2;;;30:1;27;20:12;5:2;235:208:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;757:906:15;;8:9:-1;5:2;;;30:1;27;20:12;5:2;757:906:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;446:746:1;555:31;632:5;:14;;;672:5;:19;;;728:5;:21;;;791:5;:19;;;850:5;:20;;;911:5;:10;;;943:5;:21;;;998:5;:17;;;1045:5;:30;;;1117:5;:29;;;609:576;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;602:583;;446:746;;;:::o;228:268:16:-;346:10;363:20;396:6;;;;;;;;;;;;;;;;;;404:4;386:23;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;386:23:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;363:46;;486:6;420:72;;:62;430:12;444:9;:11;;;457:9;:11;;;470:9;:11;;;420:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;420:62:16;;;;;;;;:72;;;413:79;;228:268;;;;;;:::o;235:208:1:-;335:4;353:86;374:5;:14;;;393;412:5;:23;;;353:16;:86::i;:::-;346:93;;235:208;;;;:::o;757:906:15:-;843:25;;:::i;:::-;879:19;;:::i;:::-;909:23;;:::i;:::-;943:20;;:::i;:::-;974:22;;:::i;:::-;1007;;:::i;:::-;1039:620;;;;;;;;;1052:5;:19;;;1039:620;;;;;;;;1073:5;:12;;;1039:620;;;;;;;;1087:5;:17;;;1039:620;;;;;;;;1106:5;:19;;;1039:620;;;;;;;;1127:5;:20;;;1039:620;;;;;;;;1149:5;:13;;;1039:620;;;;;;;;;;;;;;;;1178:5;:27;;;1039:620;;;;1207:5;:10;;;1039:620;;;;1219:5;:21;;;1039:620;;;;1242:5;:20;;;1039:620;;;;1264:5;:16;;;1039:620;;;;1282:5;:17;;;1039:620;;;;1301:5;:15;;;1039:620;;;;1318:5;:30;;;1039:620;;;;;;;;;;;;1355:5;:29;;;1039:620;;;;;;;;;;;;;;;;;;1400:5;:21;;;:23;;;1039:620;;;;;;;;1425:5;:23;;;:25;;;1039:620;;;;;;;;1452:5;:26;;;:28;;;1039:620;;;;;;;;;;;;;;;;1487:5;:21;;;:23;;;1039:620;;;;;;;;;;1512:5;:23;;;:25;;;1039:620;;;;;;;;;;1539:5;:26;;;:28;;;1039:620;;;;;;;;;;;;;;;;;;1574:5;:21;;;:23;;;1039:620;;;;;;;;;;1599:5;:23;;;:25;;;1039:620;;;;;;;;;;1626:5;:26;;;:28;;;1039:620;;;;;;;;;;;;;;;;;;;;;757:906;;;;;;;:::o;167:1027:1:-;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;167:1027:1;;;;:::o;:::-;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;167:1027:1;;;;:::o;:::-;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;167:1027:1;;;;:::o;:::-;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;167:1027:1;;;;:::o;:::-;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;167:1027:1;;;;:::o;5:118:-1:-;;72:46;110:6;97:20;72:46;;;63:55;;57:66;;;;;130:118;;197:46;235:6;222:20;197:46;;;188:55;;182:66;;;;;291:3679;;407:5;395:9;390:3;386:19;382:31;379:2;;;426:1;423;416:12;379:2;444:21;459:5;444:21;;;435:30;;524:1;555:49;600:3;591:6;580:9;576:22;555:49;;;549:3;542:5;538:15;531:74;475:141;677:2;710:49;755:3;746:6;735:9;731:22;710:49;;;703:4;696:5;692:16;685:75;626:145;832:2;865:49;910:3;901:6;890:9;886:22;865:49;;;858:4;851:5;847:16;840:75;781:145;986:2;1019:49;1064:3;1055:6;1044:9;1040:22;1019:49;;;1012:4;1005:5;1001:16;994:75;936:144;1142:3;1176:49;1221:3;1212:6;1201:9;1197:22;1176:49;;;1169:4;1162:5;1158:16;1151:75;1090:147;1298:3;1332:49;1377:3;1368:6;1357:9;1353:22;1332:49;;;1325:4;1318:5;1314:16;1307:75;1247:146;1445:3;1479:49;1524:3;1515:6;1504:9;1500:22;1479:49;;;1472:4;1465:5;1461:16;1454:75;1403:137;1595:3;1629:49;1674:3;1665:6;1654:9;1650:22;1629:49;;;1622:4;1615:5;1611:16;1604:75;1550:140;1744:3;1779:49;1824:3;1815:6;1804:9;1800:22;1779:49;;;1771:5;1764;1760:17;1753:76;1700:140;1897:3;1932:49;1977:3;1968:6;1957:9;1953:22;1932:49;;;1924:5;1917;1913:17;1906:76;1850:143;2046:3;2081:49;2126:3;2117:6;2106:9;2102:22;2081:49;;;2073:5;2066;2062:17;2055:76;2003:139;2198:3;2233:49;2278:3;2269:6;2258:9;2254:22;2233:49;;;2225:5;2218;2214:17;2207:76;2152:142;2351:3;2386:49;2431:3;2422:6;2411:9;2407:22;2386:49;;;2378:5;2371;2367:17;2360:76;2304:143;2507:3;2542:49;2587:3;2578:6;2567:9;2563:22;2542:49;;;2534:5;2527;2523:17;2516:76;2457:146;2670:3;2705:49;2750:3;2741:6;2730:9;2726:22;2705:49;;;2697:5;2690;2686:17;2679:76;2613:153;2825:3;2860:49;2905:3;2896:6;2885:9;2881:22;2860:49;;;2852:5;2845;2841:17;2834:76;2776:145;2990:3;3025:49;3070:3;3061:6;3050:9;3046:22;3025:49;;;3017:5;3010;3006:17;2999:76;2931:155;3156:3;3191:49;3236:3;3227:6;3216:9;3212:22;3191:49;;;3183:5;3176;3172:17;3165:76;3096:156;3302:3;3337:49;3382:3;3373:6;3362:9;3358:22;3337:49;;;3329:5;3322;3318:17;3311:76;3262:136;3459:3;3494:77;3567:3;3558:6;3547:9;3543:22;3494:77;;;3486:5;3479;3475:17;3468:104;3408:175;3646:3;3681:77;3754:3;3745:6;3734:9;3730:22;3681:77;;;3673:5;3666;3662:17;3655:104;3593:177;3836:3;3871:77;3944:3;3935:6;3924:9;3920:22;3871:77;;;3863:5;3856;3852:17;3845:104;3780:180;373:3597;;;;;4023:602;;4140:4;4128:9;4123:3;4119:19;4115:30;4112:2;;;4158:1;4155;4148:12;4112:2;4176:20;4191:4;4176:20;;;4167:29;;4243:1;4274:47;4317:3;4308:6;4297:9;4293:22;4274:47;;;4268:3;4261:5;4257:15;4250:72;4206:127;4380:2;4413:49;4458:3;4449:6;4438:9;4434:22;4413:49;;;4406:4;4399:5;4395:16;4388:75;4343:131;4521:2;4554:49;4599:3;4590:6;4579:9;4575:22;4554:49;;;4547:4;4540:5;4536:16;4529:75;4484:131;4106:519;;;;;4678:606;;4799:4;4787:9;4782:3;4778:19;4774:30;4771:2;;;4817:1;4814;4807:12;4771:2;4835:20;4850:4;4835:20;;;4826:29;;4902:1;4933:47;4976:3;4967:6;4956:9;4952:22;4933:47;;;4927:3;4920:5;4916:15;4909:72;4865:127;5039:2;5072:49;5117:3;5108:6;5097:9;5093:22;5072:49;;;5065:4;5058:5;5054:16;5047:75;5002:131;5180:2;5213:49;5258:3;5249:6;5238:9;5234:22;5213:49;;;5206:4;5199:5;5195:16;5188:75;5143:131;4765:519;;;;;5291:118;;5358:46;5396:6;5383:20;5358:46;;;5349:55;;5343:66;;;;;5416:114;;5481:44;5517:6;5504:20;5481:44;;;5472:53;;5466:64;;;;;5537:556;;;;5707:3;5695:9;5686:7;5682:23;5678:33;5675:2;;;5724:1;5721;5714:12;5675:2;5759:1;5776:53;5821:7;5812:6;5801:9;5797:22;5776:53;;;5766:63;;5738:97;5866:2;5884:53;5929:7;5920:6;5909:9;5905:22;5884:53;;;5874:63;;5845:98;5974:2;5992:85;6069:7;6060:6;6049:9;6045:22;5992:85;;;5982:95;;5953:130;5669:424;;;;;;6100:296;;6231:3;6219:9;6210:7;6206:23;6202:33;6199:2;;;6248:1;6245;6238:12;6199:2;6283:1;6300:80;6372:7;6363:6;6352:9;6348:22;6300:80;;;6290:90;;6262:124;6193:203;;;;;6403:422;;;6551:3;6539:9;6530:7;6526:23;6522:33;6519:2;;;6568:1;6565;6558:12;6519:2;6603:1;6620:80;6692:7;6683:6;6672:9;6668:22;6620:80;;;6610:90;;6582:124;6737:3;6756:53;6801:7;6792:6;6781:9;6777:22;6756:53;;;6746:63;;6716:99;6513:312;;;;;;6832:110;6905:31;6930:5;6905:31;;;6900:3;6893:44;6887:55;;;6982:521;7105:52;7151:5;7105:52;;;7203:54;7251:5;7203:54;;;7278:1;7263:228;7288:6;7285:1;7282:13;7263:228;;;7328:53;7377:3;7368:6;7362:13;7328:53;;;7398:58;7449:6;7398:58;;;7388:68;;7479:4;7474:3;7470:14;7463:21;;7310:1;7307;7303:9;7298:14;;7263:228;;;7267:14;7084:419;;;;;7544:521;7667:52;7713:5;7667:52;;;7765:54;7813:5;7765:54;;;7840:1;7825:228;7850:6;7847:1;7844:13;7825:228;;;7890:53;7939:3;7930:6;7924:13;7890:53;;;7960:58;8011:6;7960:58;;;7950:68;;8041:4;8036:3;8032:14;8025:21;;7872:1;7869;7865:9;7860:14;;7825:228;;;7829:14;7646:419;;;;;8106:521;8229:52;8275:5;8229:52;;;8327:54;8375:5;8327:54;;;8402:1;8387:228;8412:6;8409:1;8406:13;8387:228;;;8452:53;8501:3;8492:6;8486:13;8452:53;;;8522:58;8573:6;8522:58;;;8512:68;;8603:4;8598:3;8594:14;8587:21;;8434:1;8431;8427:9;8422:14;;8387:228;;;8391:14;8208:419;;;;;8668:521;8791:52;8837:5;8791:52;;;8889:54;8937:5;8889:54;;;8964:1;8949:228;8974:6;8971:1;8968:13;8949:228;;;9014:53;9063:3;9054:6;9048:13;9014:53;;;9084:58;9135:6;9084:58;;;9074:68;;9165:4;9160:3;9156:14;9149:21;;8996:1;8993;8989:9;8984:14;;8949:228;;;8953:14;8770:419;;;;;9226:507;9345:50;9389:5;9345:50;;;9441:52;9487:5;9441:52;;;9514:1;9499:222;9524:6;9521:1;9518:13;9499:222;;;9564:49;9609:3;9600:6;9594:13;9564:49;;;9630:56;9679:6;9630:56;;;9620:66;;9709:4;9704:3;9700:14;9693:21;;9546:1;9543;9539:9;9534:14;;9499:222;;;9503:14;9324:409;;;;;9741:101;9808:28;9830:5;9808:28;;;9803:3;9796:41;9790:52;;;9849:110;9922:31;9947:5;9922:31;;;9917:3;9910:44;9904:55;;;9966:110;10039:31;10064:5;10039:31;;;10034:3;10027:44;10021:55;;;10083:104;10152:29;10175:5;10152:29;;;10147:3;10140:42;10134:53;;;10194:1248;;10714:3;10703:9;10699:19;10691:27;;10729:107;10833:1;10822:9;10818:17;10809:6;10729:107;;;10847:109;10951:3;10940:9;10936:19;10927:6;10847:109;;;10967;11071:3;11060:9;11056:19;11047:6;10967:109;;;11087:105;11187:3;11176:9;11172:19;11163:6;11087:105;;;11203:109;11307:3;11296:9;11292:19;11283:6;11203:109;;;11323;11427:3;11416:9;11412:19;11403:6;11323:109;;;10685:757;;;;;;;;;;11449:181;;11551:2;11540:9;11536:18;11528:26;;11565:55;11617:1;11606:9;11602:17;11593:6;11565:55;;;11522:108;;;;;11637:193;;11745:2;11734:9;11730:18;11722:26;;11759:61;11817:1;11806:9;11802:17;11793:6;11759:61;;;11716:114;;;;;11837:489;;12025:3;12014:9;12010:19;12002:27;;12040:61;12098:1;12087:9;12083:17;12074:6;12040:61;;;12112:58;12166:2;12155:9;12151:18;12142:6;12112:58;;;12181:62;12239:2;12228:9;12224:18;12215:6;12181:62;;;12254;12312:2;12301:9;12297:18;12288:6;12254:62;;;11996:330;;;;;;;;12333:256;;12395:2;12389:9;12379:19;;12433:4;12425:6;12421:17;12532:6;12520:10;12517:22;12496:18;12484:10;12481:34;12478:62;12475:2;;;12553:1;12550;12543:12;12475:2;12573:10;12569:2;12562:22;12373:216;;;;;12598:108;;12693:6;12682:17;;12674:32;;;;12717:108;;12812:6;12801:17;;12793:32;;;;12836:108;;12931:6;12920:17;;12912:32;;;;12955:108;;13050:6;13039:17;;13031:32;;;;13074:106;;13167:6;13156:17;;13148:32;;;;13189:96;;13277:3;13267:13;;13261:24;;;;13292:96;;13380:3;13370:13;;13364:24;;;;13395:96;;13483:3;13473:13;;13467:24;;;;13498:96;;13586:3;13576:13;;13570:24;;;;13601:94;;13687:3;13677:13;;13671:24;;;;13703:120;;13812:4;13804:6;13800:17;13789:28;;13782:41;;;;13832:120;;13941:4;13933:6;13929:17;13918:28;;13911:41;;;;13961:120;;14070:4;14062:6;14058:17;14047:28;;14040:41;;;;14090:120;;14199:4;14191:6;14187:17;14176:28;;14169:41;;;;14219:118;;14326:4;14318:6;14314:17;14303:28;;14296:41;;;;14345:128;;14425:42;14418:5;14414:54;14403:65;;14397:76;;;;14480:92;;14560:5;14553:13;14546:21;14535:32;;14529:43;;;;14579:79;;14648:5;14637:16;;14631:27;;;;14665:79;;14734:5;14723:16;;14717:27;;;;14751:88;;14829:4;14822:5;14818:16;14807:27;;14801:38;;;;14846:128;;14926:42;14919:5;14915:54;14904:65;;14898:76;;;;14981:79;;15050:5;15039:16;;15033:27;;;;15067:79;;15136:5;15125:16;;15119:27;;;;15153:88;;15231:4;15224:5;15220:16;15209:27;;15203:38;;;",
  "source": "pragma solidity ^0.4.24;\npragma experimental ABIEncoderV2;\n\nimport \"../../shared/libraries/OrderLibrary.sol\";\nimport \"../../shared/libraries/SignaturesLibrary.sol\";\n\n\ncontract NaiveDecisionEngine is SignaturesLibrary, OrderLibrary {\n\n\tfunction evaluateConsent(DebtOrder memory order, bytes32 commitmentHash)\n\t\tpublic\n\t\tpure\n\t\treturns (bool)\n\t{\n\t\treturn isValidSignature(\n\t\t\torder.creditor,\n\t\t\tcommitmentHash,\n\t\t\torder.creditorSignature\n\t\t);\n\t}\n\n\tfunction hashCreditorCommitmentForOrder(DebtOrder memory order)\n        public\n        pure\n        returns (bytes32 _creditorCommitmentHash)\n    {\n        return keccak256(\n            order.creditor, // creditor\n            order.kernelVersion, // debt kernel version\n            order.issuanceVersion, // repayment router version\n            order.termsContract, // terms contract address\n            order.principalToken, // principal token address\n            order.salt, // salt\n            order.principalAmount, // principal amount\n            order.creditorFee, // creditor fee\n            order.expirationTimestampInSec, // expirationTimestampInSec\n            order.termsContractParameters // terms contract parameters\n        );\n    }\n}\n",
  "sourcePath": "/Users/graemeboy/Dharma/experimental/contracts/src/CreditorDrivenLoans/DecisionEngines/NaiveDecisionEngine.sol",
  "ast": {
    "absolutePath": "/Users/graemeboy/Dharma/experimental/contracts/src/CreditorDrivenLoans/DecisionEngines/NaiveDecisionEngine.sol",
    "exportedSymbols": {
      "NaiveDecisionEngine": [
        500
      ]
    },
    "id": 501,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 443,
        "literals": [
          "solidity",
          "^",
          "0.4",
          ".24"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:1"
      },
      {
        "id": 444,
        "literals": [
          "experimental",
          "ABIEncoderV2"
        ],
        "nodeType": "PragmaDirective",
        "src": "25:33:1"
      },
      {
        "absolutePath": "/Users/graemeboy/Dharma/experimental/contracts/src/shared/libraries/OrderLibrary.sol",
        "file": "../../shared/libraries/OrderLibrary.sol",
        "id": 445,
        "nodeType": "ImportDirective",
        "scope": 501,
        "sourceUnit": 1741,
        "src": "60:49:1",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/graemeboy/Dharma/experimental/contracts/src/shared/libraries/SignaturesLibrary.sol",
        "file": "../../shared/libraries/SignaturesLibrary.sol",
        "id": 446,
        "nodeType": "ImportDirective",
        "scope": 501,
        "sourceUnit": 1786,
        "src": "110:54:1",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 447,
              "name": "SignaturesLibrary",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 1785,
              "src": "199:17:1",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SignaturesLibrary_$1785",
                "typeString": "contract SignaturesLibrary"
              }
            },
            "id": 448,
            "nodeType": "InheritanceSpecifier",
            "src": "199:17:1"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 449,
              "name": "OrderLibrary",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 1740,
              "src": "218:12:1",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_OrderLibrary_$1740",
                "typeString": "contract OrderLibrary"
              }
            },
            "id": 450,
            "nodeType": "InheritanceSpecifier",
            "src": "218:12:1"
          }
        ],
        "contractDependencies": [
          1740,
          1785
        ],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 500,
        "linearizedBaseContracts": [
          500,
          1740,
          1785
        ],
        "name": "NaiveDecisionEngine",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 467,
              "nodeType": "Block",
              "src": "342:101:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 460,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 452,
                          "src": "374:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 461,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "creditor",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1617,
                        "src": "374:14:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 462,
                        "name": "commitmentHash",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 454,
                        "src": "393:14:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 463,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 452,
                          "src": "412:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 464,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "creditorSignature",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1641,
                        "src": "412:23:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_ECDSASignature_$1753_memory",
                          "typeString": "struct SignaturesLibrary.ECDSASignature memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_struct$_ECDSASignature_$1753_memory",
                          "typeString": "struct SignaturesLibrary.ECDSASignature memory"
                        }
                      ],
                      "id": 459,
                      "name": "isValidSignature",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1784,
                      "src": "353:16:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_address_$_t_bytes32_$_t_struct$_ECDSASignature_$1753_memory_ptr_$returns$_t_bool_$",
                        "typeString": "function (address,bytes32,struct SignaturesLibrary.ECDSASignature memory) pure returns (bool)"
                      }
                    },
                    "id": 465,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "353:86:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 458,
                  "id": 466,
                  "nodeType": "Return",
                  "src": "346:93:1"
                }
              ]
            },
            "documentation": null,
            "id": 468,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "evaluateConsent",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 455,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 452,
                  "name": "order",
                  "nodeType": "VariableDeclaration",
                  "scope": 468,
                  "src": "260:22:1",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                    "typeString": "struct OrderLibrary.DebtOrder"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 451,
                    "name": "DebtOrder",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1644,
                    "src": "260:9:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_DebtOrder_$1644_storage_ptr",
                      "typeString": "struct OrderLibrary.DebtOrder"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 454,
                  "name": "commitmentHash",
                  "nodeType": "VariableDeclaration",
                  "scope": 468,
                  "src": "284:22:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 453,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "284:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "259:48:1"
            },
            "payable": false,
            "returnParameters": {
              "id": 458,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 457,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 468,
                  "src": "335:4:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 456,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "335:4:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "334:6:1"
            },
            "scope": 500,
            "src": "235:208:1",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 498,
              "nodeType": "Block",
              "src": "592:600:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 476,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "632:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 477,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "creditor",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1617,
                        "src": "632:14:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 478,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "672:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 479,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "kernelVersion",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1601,
                        "src": "672:19:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 480,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "728:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 481,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "issuanceVersion",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1603,
                        "src": "728:21:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 482,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "791:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 483,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "termsContract",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1631,
                        "src": "791:19:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 484,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "850:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 485,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "principalToken",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1607,
                        "src": "850:20:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 486,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "911:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 487,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "salt",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1637,
                        "src": "911:10:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 488,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "943:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 489,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "principalAmount",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1605,
                        "src": "943:21:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 490,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "998:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 491,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "creditorFee",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1619,
                        "src": "998:17:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 492,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "1045:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 493,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "expirationTimestampInSec",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1635,
                        "src": "1045:30:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 494,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "1117:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 495,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "termsContractParameters",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1633,
                        "src": "1117:29:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "id": 475,
                      "name": "keccak256",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1963,
                      "src": "609:9:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$",
                        "typeString": "function () pure returns (bytes32)"
                      }
                    },
                    "id": 496,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "609:576:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "functionReturnParameters": 474,
                  "id": 497,
                  "nodeType": "Return",
                  "src": "602:583:1"
                }
              ]
            },
            "documentation": null,
            "id": 499,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "hashCreditorCommitmentForOrder",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 471,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 470,
                  "name": "order",
                  "nodeType": "VariableDeclaration",
                  "scope": 499,
                  "src": "486:22:1",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                    "typeString": "struct OrderLibrary.DebtOrder"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 469,
                    "name": "DebtOrder",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1644,
                    "src": "486:9:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_DebtOrder_$1644_storage_ptr",
                      "typeString": "struct OrderLibrary.DebtOrder"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "485:24:1"
            },
            "payable": false,
            "returnParameters": {
              "id": 474,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 473,
                  "name": "_creditorCommitmentHash",
                  "nodeType": "VariableDeclaration",
                  "scope": 499,
                  "src": "555:31:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 472,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "555:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "554:33:1"
            },
            "scope": 500,
            "src": "446:746:1",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "public"
          }
        ],
        "scope": 501,
        "src": "167:1027:1"
      }
    ],
    "src": "0:1195:1"
  },
  "legacyAST": {
    "absolutePath": "/Users/graemeboy/Dharma/experimental/contracts/src/CreditorDrivenLoans/DecisionEngines/NaiveDecisionEngine.sol",
    "exportedSymbols": {
      "NaiveDecisionEngine": [
        500
      ]
    },
    "id": 501,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 443,
        "literals": [
          "solidity",
          "^",
          "0.4",
          ".24"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:1"
      },
      {
        "id": 444,
        "literals": [
          "experimental",
          "ABIEncoderV2"
        ],
        "nodeType": "PragmaDirective",
        "src": "25:33:1"
      },
      {
        "absolutePath": "/Users/graemeboy/Dharma/experimental/contracts/src/shared/libraries/OrderLibrary.sol",
        "file": "../../shared/libraries/OrderLibrary.sol",
        "id": 445,
        "nodeType": "ImportDirective",
        "scope": 501,
        "sourceUnit": 1741,
        "src": "60:49:1",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "/Users/graemeboy/Dharma/experimental/contracts/src/shared/libraries/SignaturesLibrary.sol",
        "file": "../../shared/libraries/SignaturesLibrary.sol",
        "id": 446,
        "nodeType": "ImportDirective",
        "scope": 501,
        "sourceUnit": 1786,
        "src": "110:54:1",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 447,
              "name": "SignaturesLibrary",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 1785,
              "src": "199:17:1",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SignaturesLibrary_$1785",
                "typeString": "contract SignaturesLibrary"
              }
            },
            "id": 448,
            "nodeType": "InheritanceSpecifier",
            "src": "199:17:1"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 449,
              "name": "OrderLibrary",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 1740,
              "src": "218:12:1",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_OrderLibrary_$1740",
                "typeString": "contract OrderLibrary"
              }
            },
            "id": 450,
            "nodeType": "InheritanceSpecifier",
            "src": "218:12:1"
          }
        ],
        "contractDependencies": [
          1740,
          1785
        ],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 500,
        "linearizedBaseContracts": [
          500,
          1740,
          1785
        ],
        "name": "NaiveDecisionEngine",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 467,
              "nodeType": "Block",
              "src": "342:101:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 460,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 452,
                          "src": "374:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 461,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "creditor",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1617,
                        "src": "374:14:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 462,
                        "name": "commitmentHash",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 454,
                        "src": "393:14:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 463,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 452,
                          "src": "412:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 464,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "creditorSignature",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1641,
                        "src": "412:23:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_ECDSASignature_$1753_memory",
                          "typeString": "struct SignaturesLibrary.ECDSASignature memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_struct$_ECDSASignature_$1753_memory",
                          "typeString": "struct SignaturesLibrary.ECDSASignature memory"
                        }
                      ],
                      "id": 459,
                      "name": "isValidSignature",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1784,
                      "src": "353:16:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_address_$_t_bytes32_$_t_struct$_ECDSASignature_$1753_memory_ptr_$returns$_t_bool_$",
                        "typeString": "function (address,bytes32,struct SignaturesLibrary.ECDSASignature memory) pure returns (bool)"
                      }
                    },
                    "id": 465,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "353:86:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 458,
                  "id": 466,
                  "nodeType": "Return",
                  "src": "346:93:1"
                }
              ]
            },
            "documentation": null,
            "id": 468,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "evaluateConsent",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 455,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 452,
                  "name": "order",
                  "nodeType": "VariableDeclaration",
                  "scope": 468,
                  "src": "260:22:1",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                    "typeString": "struct OrderLibrary.DebtOrder"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 451,
                    "name": "DebtOrder",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1644,
                    "src": "260:9:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_DebtOrder_$1644_storage_ptr",
                      "typeString": "struct OrderLibrary.DebtOrder"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 454,
                  "name": "commitmentHash",
                  "nodeType": "VariableDeclaration",
                  "scope": 468,
                  "src": "284:22:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 453,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "284:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "259:48:1"
            },
            "payable": false,
            "returnParameters": {
              "id": 458,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 457,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 468,
                  "src": "335:4:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 456,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "335:4:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "334:6:1"
            },
            "scope": 500,
            "src": "235:208:1",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 498,
              "nodeType": "Block",
              "src": "592:600:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 476,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "632:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 477,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "creditor",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1617,
                        "src": "632:14:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 478,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "672:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 479,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "kernelVersion",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1601,
                        "src": "672:19:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 480,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "728:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 481,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "issuanceVersion",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1603,
                        "src": "728:21:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 482,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "791:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 483,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "termsContract",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1631,
                        "src": "791:19:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 484,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "850:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 485,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "principalToken",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1607,
                        "src": "850:20:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 486,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "911:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 487,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "salt",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1637,
                        "src": "911:10:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 488,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "943:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 489,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "principalAmount",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1605,
                        "src": "943:21:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 490,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "998:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 491,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "creditorFee",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1619,
                        "src": "998:17:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 492,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "1045:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 493,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "expirationTimestampInSec",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1635,
                        "src": "1045:30:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 494,
                          "name": "order",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 470,
                          "src": "1117:5:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                            "typeString": "struct OrderLibrary.DebtOrder memory"
                          }
                        },
                        "id": 495,
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "termsContractParameters",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 1633,
                        "src": "1117:29:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "id": 475,
                      "name": "keccak256",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 1963,
                      "src": "609:9:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$",
                        "typeString": "function () pure returns (bytes32)"
                      }
                    },
                    "id": 496,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "609:576:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "functionReturnParameters": 474,
                  "id": 497,
                  "nodeType": "Return",
                  "src": "602:583:1"
                }
              ]
            },
            "documentation": null,
            "id": 499,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "hashCreditorCommitmentForOrder",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 471,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 470,
                  "name": "order",
                  "nodeType": "VariableDeclaration",
                  "scope": 499,
                  "src": "486:22:1",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_DebtOrder_$1644_memory_ptr",
                    "typeString": "struct OrderLibrary.DebtOrder"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 469,
                    "name": "DebtOrder",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 1644,
                    "src": "486:9:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_DebtOrder_$1644_storage_ptr",
                      "typeString": "struct OrderLibrary.DebtOrder"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "485:24:1"
            },
            "payable": false,
            "returnParameters": {
              "id": 474,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 473,
                  "name": "_creditorCommitmentHash",
                  "nodeType": "VariableDeclaration",
                  "scope": 499,
                  "src": "555:31:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 472,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "555:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "554:33:1"
            },
            "scope": 500,
            "src": "446:746:1",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "public"
          }
        ],
        "scope": 501,
        "src": "167:1027:1"
      }
    ],
    "src": "0:1195:1"
  },
  "compiler": {
    "name": "solc",
    "version": "0.4.24+commit.e67f0147.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "2.0.1",
  "updatedAt": "2018-10-16T21:00:42.049Z"
}