Batch 1: ok, echo, error, cpu, slow Batch 2: jsonout, recurse, bigdata, math, timestamp Batch 3: multiline, encoding, nested, memory, chain Tests: create, update (code_hash), idempotency, destroy, re-create All 15 functions verified via curl with JWT auth
10 lines
271 B
Python
10 lines
271 B
Python
import hashlib
|
|
import json
|
|
|
|
def main():
|
|
data = {"step": 1, "value": "start"}
|
|
for i in range(2, 6):
|
|
h = hashlib.sha256(json.dumps(data).encode()).hexdigest()[:8]
|
|
data = {"step": i, "prev_hash": h, "value": f"chain-{i}"}
|
|
return json.dumps(data)
|