pricing for ots_

This commit is contained in:
Bryan Stitt 2023-06-29 10:24:05 -07:00
parent da13542789
commit b4f02b24f3

View File

@ -20,7 +20,11 @@ impl ComputeUnit {
return Self::subscription_response(response_bytes);
}
let cu = match (chain_id, method) {
let cu = if method.starts_with("ots_") {
// TODO: refine the different methods
1000
} else {
match (chain_id, method) {
(1101, "zkevm_batchNumber") => 0,
(1101, "zkevm_batchNumberByBlockNumber") => 0,
(1101, "zkevm_consolidatedBlockNumber") => 0,
@ -108,6 +112,7 @@ impl ComputeUnit {
warn!("unknown method {}", method);
return Self::unimplemented();
}
}
};
let cu = Decimal::from(cu);