const struct = require('./jspack/jspack')

f0 = 0; f1 = 0; f2 = 2; f3 = 6; f4 = 2
a = []
chain_id = struct.PackTo(">I", chain_id) 
exec_id = struct.PackTo(">I", exec_id)  

dataInt = random.randint(1, 1000)
data = struct.PackTo(">I", dataInt)

function_count = struct.PackTo("B", function_count)
function_id = struct.PackTo("B", function_id)
f0 = struct.PackTo("B", f0) 
f1 = struct.PackTo("B", f1) 
f2 = struct.PackTo("B", f2) 
f3 = struct.PackTo("B", f3) 
f4 = struct.PackTo("B", f4) 


base = 0
// chain_id = struct.unpack(">I", )
// base += 4
// exec_id = struct.unpack(">I", packet[base: base + 4])[0]
// base += 4
// function_id = struct.unpack("B", packet[base])[0]
// base += 1
// data = struct.unpack(">I", packet[base: base + 4])[0]
base += 4