This repository has been archived by the owner on Sep 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use type annotations to identify the values and their respective field names; * Validate big_map identifier when accessing the big_map_diff; * Support custom contract storage as long as mandatory annotations exist in the storage type (%requests, %id, %jobId, %parameters).
- Loading branch information
Showing
13 changed files
with
2,390 additions
and
1,395 deletions.
There are no files selected for viewing
602 changes: 602 additions & 0 deletions
602
blockchain/testdata/tezos/block_operations_with_internal_calls.json
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
200 changes: 200 additions & 0 deletions
200
blockchain/testdata/tezos/contract_script_normalized.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,200 @@ | ||
{ | ||
"code": [ | ||
{ | ||
"prim": "parameter", | ||
"args": [] | ||
}, | ||
{ | ||
"prim": "storage", | ||
"args": [ | ||
{ | ||
"prim": "pair", | ||
"args": [ | ||
{ | ||
"prim": "pair", | ||
"args": [ | ||
{ | ||
"prim": "pair", | ||
"args": [ | ||
{ | ||
"prim": "bool", | ||
"annots": [ | ||
"%active" | ||
] | ||
}, | ||
{ | ||
"prim": "address", | ||
"annots": [ | ||
"%adminAddress" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"prim": "int", | ||
"annots": [ | ||
"%minCancelTimeout" | ||
] | ||
}, | ||
{ | ||
"prim": "nat", | ||
"annots": [ | ||
"%minPayment" | ||
] | ||
}, | ||
{ | ||
"prim": "address", | ||
"annots": [ | ||
"%tokenAddress" | ||
] | ||
} | ||
], | ||
"annots": [ | ||
"%config" | ||
] | ||
}, | ||
{ | ||
"prim": "big_map", | ||
"args": [ | ||
{ | ||
"prim": "bytes" | ||
}, | ||
{ | ||
"prim": "pair", | ||
"args": [ | ||
{ | ||
"prim": "nat", | ||
"annots": [ | ||
"%payment" | ||
] | ||
}, | ||
{ | ||
"prim": "pair", | ||
"args": [ | ||
{ | ||
"prim": "address", | ||
"annots": [ | ||
"%callbackAddress" | ||
] | ||
}, | ||
{ | ||
"prim": "timestamp", | ||
"annots": [ | ||
"%cancelTimeout" | ||
] | ||
}, | ||
{ | ||
"prim": "address", | ||
"annots": [ | ||
"%clientAddress" | ||
] | ||
}, | ||
{ | ||
"prim": "nat", | ||
"annots": [ | ||
"%id" | ||
] | ||
}, | ||
{ | ||
"prim": "string", | ||
"annots": [ | ||
"%jobId" | ||
] | ||
}, | ||
{ | ||
"prim": "address", | ||
"annots": [ | ||
"%oracleAddress" | ||
] | ||
}, | ||
{ | ||
"prim": "map", | ||
"args": [ | ||
{ | ||
"prim": "string" | ||
}, | ||
{ | ||
"prim": "or", | ||
"args": [ | ||
{ | ||
"prim": "bytes", | ||
"annots": [ | ||
"%bytes" | ||
] | ||
}, | ||
{ | ||
"prim": "or", | ||
"args": [ | ||
{ | ||
"prim": "int", | ||
"annots": [ | ||
"%int" | ||
] | ||
}, | ||
{ | ||
"prim": "string", | ||
"annots": [ | ||
"%string" | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"annots": [ | ||
"%parameters" | ||
] | ||
} | ||
], | ||
"annots": [ | ||
"%request" | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"annots": [ | ||
"%requests" | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"prim": "code", | ||
"args": [] | ||
} | ||
], | ||
"storage": { | ||
"prim": "Pair", | ||
"args": [ | ||
[ | ||
{ | ||
"prim": "Pair", | ||
"args": [ | ||
{ | ||
"prim": "True" | ||
}, | ||
{ | ||
"bytes": "0000d3789f9f4223c271403bde738fd304691e796ee8" | ||
} | ||
] | ||
}, | ||
{ | ||
"int": "5" | ||
}, | ||
{ | ||
"int": "1" | ||
}, | ||
{ | ||
"bytes": "019e5225d7e53fce0fe227ced8286460e91f78cd3e00" | ||
} | ||
], | ||
{ | ||
"int": "6" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
[ | ||
{ | ||
"prim": "Pair", | ||
"args": [ | ||
{ | ||
"string": "from" | ||
}, | ||
{ | ||
"prim": "Right", | ||
"args": [ | ||
{ | ||
"prim": "Right", | ||
"args": [ | ||
{ | ||
"string": "EUR" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"prim": "Pair", | ||
"args": [ | ||
{ | ||
"string": "to" | ||
}, | ||
{ | ||
"prim": "Right", | ||
"args": [ | ||
{ | ||
"prim": "Right", | ||
"args": [ | ||
{ | ||
"string": "XTZ" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
[ | ||
{ | ||
"prim": "Elt", | ||
"args": [ | ||
{ | ||
"string": "from" | ||
}, | ||
{ | ||
"prim": "Right", | ||
"args": [ | ||
{ | ||
"prim": "Right", | ||
"args": [ | ||
{ | ||
"string": "EUR" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"prim": "Elt", | ||
"args": [ | ||
{ | ||
"string": "to" | ||
}, | ||
{ | ||
"prim": "Right", | ||
"args": [ | ||
{ | ||
"prim": "Right", | ||
"args": [ | ||
{ | ||
"string": "XTZ" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
{ | ||
"prim": "pair", | ||
"args": [ | ||
{ | ||
"prim": "nat", | ||
"annots": [ | ||
"%payment" | ||
] | ||
}, | ||
{ | ||
"prim": "pair", | ||
"args": [ | ||
{ | ||
"prim": "address", | ||
"annots": [ | ||
"%callbackAddress" | ||
] | ||
}, | ||
{ | ||
"prim": "timestamp", | ||
"annots": [ | ||
"%cancelTimeout" | ||
] | ||
}, | ||
{ | ||
"prim": "address", | ||
"annots": [ | ||
"%clientAddress" | ||
] | ||
}, | ||
{ | ||
"prim": "nat", | ||
"annots": [ | ||
"%id" | ||
] | ||
}, | ||
{ | ||
"prim": "string", | ||
"annots": [ | ||
"%jobId" | ||
] | ||
}, | ||
{ | ||
"prim": "address", | ||
"annots": [ | ||
"%oracleAddress" | ||
] | ||
}, | ||
{ | ||
"prim": "map", | ||
"args": [ | ||
{ | ||
"prim": "string" | ||
}, | ||
{ | ||
"prim": "or", | ||
"args": [ | ||
{ | ||
"prim": "bytes", | ||
"annots": [ | ||
"%bytes" | ||
] | ||
}, | ||
{ | ||
"prim": "or", | ||
"args": [ | ||
{ | ||
"prim": "int", | ||
"annots": [ | ||
"%int" | ||
] | ||
}, | ||
{ | ||
"prim": "string", | ||
"annots": [ | ||
"%string" | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"annots": [ | ||
"%parameters" | ||
] | ||
} | ||
], | ||
"annots": [ | ||
"%request" | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.