mirror of
https://github.com/status-im/dagger-contracts.git
synced 2025-01-16 01:27:21 +00:00
Change the cid from string to bytes
This commit is contained in:
parent
02e3b8d22b
commit
f1e674f91c
@ -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
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ const exampleRequest = async () => {
|
||||
collateral: 200,
|
||||
},
|
||||
content: {
|
||||
cid: "zb2rhheVmk3bLks5MgzTqyznLu1zqGH5jrfTA1eAZXrjx7Vob",
|
||||
cid: Buffer.from("zb2rhheVmk3bLks5MgzTqyznLu1zqGH5jrfTA1eAZXrjx7Vob"),
|
||||
merkleRoot: Array.from(randomBytes(32)),
|
||||
},
|
||||
expiry: hours(1),
|
||||
|
@ -22,7 +22,7 @@ function askToArray(ask) {
|
||||
}
|
||||
|
||||
function contentToArray(content) {
|
||||
return [content.cid, content.merkleRoot]
|
||||
return [content.cid.toString(), content.merkleRoot]
|
||||
}
|
||||
|
||||
function requestToArray(request) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user