Initialize the Cid using init function

This commit is contained in:
Arnaud 2025-01-16 17:55:53 +01:00 committed by Eric
parent eaf8b5ad32
commit 93e7b92d05
No known key found for this signature in database

View File

@ -57,8 +57,8 @@ proc example*(_: type StorageRequest): StorageRequest =
maxSlotLoss: 2, # 2 slots can be freed without data considered to be lost
),
content: StorageContent(
cid: "zb2rhheVmk3bLks5MgzTqyznLu1zqGH5jrfTA1eAZXrjx7Vob".toBytes,
merkleRoot: array[32, byte].example,
cid: Cid.init("zb2rhheVmk3bLks5MgzTqyznLu1zqGH5jrfTA1eAZXrjx7Vob").tryGet.data.buffer,
merkleRoot: array[32, byte].example
),
expiry: (60 * 60).u256, # 1 hour ,
nonce: Nonce.example,