Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
710a41c
feat: add scaffolding for contracts
graemecode Sep 28, 2018
2898c5a
feat: add scaffolding for tests
graemecode Sep 28, 2018
f71963f
feat: scaffold more functionality for LTV
graemecode Sep 28, 2018
6718609
fix: introduce precision into our LTV calculations
saturnial Sep 28, 2018
a0b4dd3
feat: add signature validation
saturnial Sep 28, 2018
c36e6b4
feat: mark isValidSignature function as public and pure
saturnial Oct 1, 2018
4807572
feat: expose getSignature as public
saturnial Oct 1, 2018
da23220
feat: introduce LTVCreditorCommitmentParams type
saturnial Oct 1, 2018
483e90c
feat: introduce SignableCreditorCommitment
saturnial Oct 1, 2018
0455738
test: add test for is valid signature
saturnial Oct 1, 2018
4663719
test: introduce LTVScenario type
saturnial Oct 1, 2018
9adbe31
test: add test for invalid signature and hash combination
graemecode Oct 1, 2018
de2645c
fix: valid decision params test
graemecode Oct 1, 2018
bd30eba
feat: add isexpiration check to evaluate
saturnial Oct 1, 2018
a901e69
Merge branch 'ltv-decision-engine' of https://github.com/dharmaprotoc…
saturnial Oct 1, 2018
903cf52
test: fix evaluate tests and refactor
graemecode Oct 1, 2018
a0a0d70
Merge branch 'ltv-decision-engine' of https://github.com/dharmaprotoc…
graemecode Oct 1, 2018
63a24e7
refactor: remove unnecessary variable declaration
graemecode Oct 1, 2018
34e112c
fix: mark is expired function as view
saturnial Oct 1, 2018
af3ea75
Merge branch 'ltv-decision-engine' of https://github.com/dharmaprotoc…
saturnial Oct 1, 2018
e846e5c
test: add test for isExpired
graemecode Oct 1, 2018
5c2fae6
feat: pull out signature validation from evaulate and into verify
saturnial Oct 2, 2018
1bc2c96
Merge branch 'ltv-decision-engine' of https://github.com/dharmaprotoc…
saturnial Oct 2, 2018
4e57c3c
test: create SignablePrice class
saturnial Oct 3, 2018
ac99c92
test: create price scenario interface
saturnial Oct 3, 2018
1f00416
feat: simplify logerror event
saturnial Oct 3, 2018
093d0e5
docs: remove outdated docs
saturnial Oct 3, 2018
7477f25
test: add test suite for #verify
saturnial Oct 3, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
235 changes: 235 additions & 0 deletions artifacts/json/BooleanDecisionEngine.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
{
"contractName": "BooleanDecisionEngine",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "result",
"type": "bool"
}
],
"name": "evaluate",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x6060604052341561000f57600080fd5b60b48061001d6000396000f300606060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063474e7563146044575b600080fd5b3415604e57600080fd5b606460048080351515906020019091905050607e565b604051808215151515815260200191505060405180910390f35b60008190509190505600a165627a7a723058200d3ae4e28f9bcd4e4f88bc00fa5f9279deb639955e2280adfe27f3970a5ca1f40029",
"deployedBytecode": "0x606060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063474e7563146044575b600080fd5b3415604e57600080fd5b606460048080351515906020019091905050607e565b604051808215151515815260200191505060405180910390f35b60008190509190505600a165627a7a723058200d3ae4e28f9bcd4e4f88bc00fa5f9279deb639955e2280adfe27f3970a5ca1f40029",
"sourceMap": "145:152:22:-;;;;;;;;;;;;;;;;;",
"deployedSourceMap": "145:152:22:-;;;;;;;;;;;;;;;;;;;;;;;;212:83;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;259:4;282:6;275:13;;212:83;;;:::o",
"source": "import \"zeppelin-solidity/contracts/math/SafeMath.sol\";\n\n\n/**\n * A decision engine that returns true or false, depending on the value given.\n */\ncontract BooleanDecisionEngine {\n using SafeMath for uint;\n\n function evaluate(bool result) public returns (bool) {\n return result;\n }\n}\n",
"sourcePath": "/Users/graemeboy/Dharma/charta/contracts/test/decision_engines/BooleanDecisionEngine.sol",
"ast": {
"attributes": {
"absolutePath": "/Users/graemeboy/Dharma/charta/contracts/test/decision_engines/BooleanDecisionEngine.sol",
"exportedSymbols": {
"BooleanDecisionEngine": [
10099
]
}
},
"children": [
{
"attributes": {
"SourceUnit": 14203,
"absolutePath": "zeppelin-solidity/contracts/math/SafeMath.sol",
"file": "zeppelin-solidity/contracts/math/SafeMath.sol",
"scope": 10100,
"symbolAliases": [
null
],
"unitAlias": ""
},
"id": 10085,
"name": "ImportDirective",
"src": "0:55:22"
},
{
"attributes": {
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "contract",
"documentation": "A decision engine that returns true or false, depending on the value given.",
"fullyImplemented": true,
"linearizedBaseContracts": [
10099
],
"name": "BooleanDecisionEngine",
"scope": 10100
},
"children": [
{
"children": [
{
"attributes": {
"contractScope": null,
"name": "SafeMath",
"referencedDeclaration": 14202,
"type": "library SafeMath"
},
"id": 10086,
"name": "UserDefinedTypeName",
"src": "188:8:22"
},
{
"attributes": {
"name": "uint",
"type": "uint256"
},
"id": 10087,
"name": "ElementaryTypeName",
"src": "201:4:22"
}
],
"id": 10088,
"name": "UsingForDirective",
"src": "182:24:22"
},
{
"attributes": {
"constant": false,
"implemented": true,
"isConstructor": false,
"modifiers": [
null
],
"name": "evaluate",
"payable": false,
"scope": 10099,
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"name": "result",
"scope": 10098,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 10089,
"name": "ElementaryTypeName",
"src": "230:4:22"
}
],
"id": 10090,
"name": "VariableDeclaration",
"src": "230:11:22"
}
],
"id": 10091,
"name": "ParameterList",
"src": "229:13:22"
},
{
"children": [
{
"attributes": {
"constant": false,
"name": "",
"scope": 10098,
"stateVariable": false,
"storageLocation": "default",
"type": "bool",
"value": null,
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bool",
"type": "bool"
},
"id": 10092,
"name": "ElementaryTypeName",
"src": "259:4:22"
}
],
"id": 10093,
"name": "VariableDeclaration",
"src": "259:4:22"
}
],
"id": 10094,
"name": "ParameterList",
"src": "258:6:22"
},
{
"children": [
{
"attributes": {
"functionReturnParameters": 10094
},
"children": [
{
"attributes": {
"argumentTypes": null,
"overloadedDeclarations": [
null
],
"referencedDeclaration": 10090,
"type": "bool",
"value": "result"
},
"id": 10095,
"name": "Identifier",
"src": "282:6:22"
}
],
"id": 10096,
"name": "Return",
"src": "275:13:22"
}
],
"id": 10097,
"name": "Block",
"src": "265:30:22"
}
],
"id": 10098,
"name": "FunctionDefinition",
"src": "212:83:22"
}
],
"id": 10099,
"name": "ContractDefinition",
"src": "145:152:22"
}
],
"id": 10100,
"name": "SourceUnit",
"src": "0:298:22"
},
"compiler": {
"name": "solc",
"version": "0.4.18+commit.9cf6e910.Emscripten.clang"
},
"networks": {},
"schemaVersion": "1.0.1",
"updatedAt": "2018-09-28T20:51:14.888Z"
}
Loading