Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
[tezos] - Generify tezos subscriber
Browse files Browse the repository at this point in the history
 * 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
RomarQ committed May 5, 2021
1 parent 3b386d7 commit 4246609
Show file tree
Hide file tree
Showing 14 changed files with 7,551 additions and 1,420 deletions.
910 changes: 910 additions & 0 deletions blockchain/testdata/tezos/block_operations_with_internal_calls.json

Large diffs are not rendered by default.

200 changes: 200 additions & 0 deletions blockchain/testdata/tezos/contract_script_normalized.json
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"
}
]
}
}
Loading

0 comments on commit 4246609

Please sign in to comment.