Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions crates/dips/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,8 @@ pub async fn validate_and_create_rca(
))
})?;

// Only support version 1 terms for now
if metadata.version != 1 {
// Only support V1 terms (IndexingAgreementVersion.V1 = 0 in Solidity enum)
if metadata.version != 0 {
return Err(DipsError::UnsupportedMetadataVersion(metadata.version));
}

Expand Down Expand Up @@ -569,7 +569,7 @@ mod test {
let metadata = AcceptIndexingAgreementMetadata {
// Any bytes32 works - MockIpfsFetcher ignores the deployment ID
subgraphDeploymentId: FixedBytes::ZERO,
version: 1,
version: 0, // IndexingAgreementVersion.V1 = 0
terms: terms.abi_encode().into(),
};

Expand Down Expand Up @@ -824,7 +824,7 @@ mod test {

let metadata = AcceptIndexingAgreementMetadata {
subgraphDeploymentId: FixedBytes::ZERO,
version: 1,
version: 0, // IndexingAgreementVersion.V1 = 0
terms: terms.abi_encode().into(),
};

Expand Down Expand Up @@ -868,7 +868,7 @@ mod test {

let metadata = AcceptIndexingAgreementMetadata {
subgraphDeploymentId: FixedBytes::ZERO,
version: 1,
version: 0, // IndexingAgreementVersion.V1 = 0
terms: terms.abi_encode().into(),
};

Expand Down
Loading