diff --git a/user-ops-indexer/Cargo.lock b/user-ops-indexer/Cargo.lock
index 6122d7f41..0ba866a10 100644
--- a/user-ops-indexer/Cargo.lock
+++ b/user-ops-indexer/Cargo.lock
@@ -1170,8 +1170,10 @@ checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38"
dependencies = [
"android-tzdata",
"iana-time-zone",
+ "js-sys",
"num-traits",
"serde",
+ "wasm-bindgen",
"windows-targets 0.48.5",
]
@@ -6465,6 +6467,7 @@ dependencies = [
"blockscout-display-bytes",
"blockscout-service-launcher 0.9.0",
"bytes",
+ "chrono",
"ethabi",
"ethers",
"ethers-core",
diff --git a/user-ops-indexer/user-ops-indexer-logic/Cargo.toml b/user-ops-indexer/user-ops-indexer-logic/Cargo.toml
index 496304c92..b1dbd5bfa 100644
--- a/user-ops-indexer/user-ops-indexer-logic/Cargo.toml
+++ b/user-ops-indexer/user-ops-indexer-logic/Cargo.toml
@@ -41,6 +41,7 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
ethers = { version = "2.0.11", features = ["ws"] }
num-traits = "0.2.17"
itertools = "0.11.0"
+chrono = "0.4.31"
[dev-dependencies]
async-trait = "0.1"
diff --git a/user-ops-indexer/user-ops-indexer-logic/src/indexer/v06/indexer.rs b/user-ops-indexer/user-ops-indexer-logic/src/indexer/v06/indexer.rs
index 98733109b..801e9f21e 100644
--- a/user-ops-indexer/user-ops-indexer-logic/src/indexer/v06/indexer.rs
+++ b/user-ops-indexer/user-ops-indexer-logic/src/indexer/v06/indexer.rs
@@ -275,8 +275,8 @@ impl<'a, C: PubsubClient> IndexerV06<'a, C> {
.filter_map(|(j, (raw_user_op, logs))| {
match build_user_op_model(
bundler,
- i as u64,
- j as u64,
+ i as u32,
+ j as u32,
raw_user_op,
logs,
&tx_deposits,
@@ -322,8 +322,8 @@ impl<'a, C: PubsubClient> IndexerV06<'a, C> {
fn build_user_op_model(
bundler: Address,
- bundle_index: u64,
- index: u64,
+ bundle_index: u32,
+ index: u32,
raw_user_op: RawUserOperation,
logs: &[Log],
tx_deposits: &[DepositedFilter],
@@ -411,8 +411,8 @@ fn build_user_op_model(
sponsor_type,
user_logs_start_index: logs
.first()
- .map_or(0, |l| l.log_index.map_or(0, |v| v.as_u64())),
- user_logs_count: user_logs_count as u64,
+ .map_or(0, |l| l.log_index.map_or(0, |v| v.as_u32())),
+ user_logs_count: user_logs_count as u32,
fee: user_op_event.actual_gas_cost,
consensus: None,
diff --git a/user-ops-indexer/user-ops-indexer-logic/src/repository/account.rs b/user-ops-indexer/user-ops-indexer-logic/src/repository/account.rs
index 5149c6ffe..bde314cbc 100644
--- a/user-ops-indexer/user-ops-indexer-logic/src/repository/account.rs
+++ b/user-ops-indexer/user-ops-indexer-logic/src/repository/account.rs
@@ -134,7 +134,7 @@ mod tests {
factory: Some(Address::from_low_u64_be(0xf1)),
creation_transaction_hash: Some(H256::from_low_u64_be(0x3204)),
creation_op_hash: Some(H256::from_low_u64_be(0x3201)),
- creation_timestamp: Some(1704067260),
+ creation_timestamp: Some("2024-01-01T00:01:00.000000Z".to_string()),
total_ops: 100,
})
);
diff --git a/user-ops-indexer/user-ops-indexer-logic/src/repository/bundle.rs b/user-ops-indexer/user-ops-indexer-logic/src/repository/bundle.rs
index b82e4d24e..b4cc191b8 100644
--- a/user-ops-indexer/user-ops-indexer-logic/src/repository/bundle.rs
+++ b/user-ops-indexer/user-ops-indexer-logic/src/repository/bundle.rs
@@ -16,9 +16,9 @@ pub async fn list_bundles(
db: &DatabaseConnection,
bundler_filter: Option
,
entry_point_filter: Option,
- page_token: Option<(u64, H256, u64)>,
+ page_token: Option<(u64, H256, u32)>,
limit: u64,
-) -> Result<(Vec, Option<(u64, H256, u64)>), anyhow::Error> {
+) -> Result<(Vec, Option<(u64, H256, u32)>), anyhow::Error> {
let page_token = page_token.unwrap_or((i64::MAX as u64, H256::zero(), 0));
let bundles: Vec = BundleDB::find_by_statement(Statement::from_sql_and_values(
db.get_database_backend(),
diff --git a/user-ops-indexer/user-ops-indexer-logic/src/repository/user_op.rs b/user-ops-indexer/user-ops-indexer-logic/src/repository/user_op.rs
index 2cae3fe7c..b09e435b1 100644
--- a/user-ops-indexer/user-ops-indexer-logic/src/repository/user_op.rs
+++ b/user-ops-indexer/user-ops-indexer-logic/src/repository/user_op.rs
@@ -65,9 +65,10 @@ pub async fn find_user_op_by_op_hash(
let user_op = Model::from_query_result(&res, "")?;
let mut user_op = UserOp::from(user_op);
user_op.consensus = res.try_get("", "consensus")?;
- user_op.timestamp = res
- .try_get::