diff --git a/contracts/Requests.sol b/contracts/Requests.sol index 39ca1d3..90a1ac1 100644 --- a/contracts/Requests.sol +++ b/contracts/Requests.sol @@ -23,7 +23,7 @@ struct Ask { } struct Content { - string cid; // content id, used to download the dataset + bytes cid; // content id, used to download the dataset bytes32 merkleRoot; // merkle root of the dataset, used to verify storage proofs } diff --git a/test/examples.js b/test/examples.js index ac88a71..bdb01f5 100644 --- a/test/examples.js +++ b/test/examples.js @@ -34,7 +34,7 @@ const exampleRequest = async () => { collateral: 200, }, content: { - cid: "zb2rhheVmk3bLks5MgzTqyznLu1zqGH5jrfTA1eAZXrjx7Vob", + cid: Buffer.from("zb2rhheVmk3bLks5MgzTqyznLu1zqGH5jrfTA1eAZXrjx7Vob"), merkleRoot: Array.from(randomBytes(32)), }, expiry: hours(1), diff --git a/test/ids.js b/test/ids.js index 5ef1220..0a3e003 100644 --- a/test/ids.js +++ b/test/ids.js @@ -22,7 +22,7 @@ function askToArray(ask) { } function contentToArray(content) { - return [content.cid, content.merkleRoot] + return [content.cid.toString(), content.merkleRoot] } function requestToArray(request) {