diff --git a/eth-bytecode-db/eth-bytecode-db-server/tests/verifier_alliance.rs b/eth-bytecode-db/eth-bytecode-db-server/tests/verifier_alliance.rs index 447b15a30..591cc03be 100644 --- a/eth-bytecode-db/eth-bytecode-db-server/tests/verifier_alliance.rs +++ b/eth-bytecode-db/eth-bytecode-db-server/tests/verifier_alliance.rs @@ -225,6 +225,10 @@ async fn insert_contract_deployment(txn: &DatabaseTransaction, test_case: &TestC contract_deployments::ActiveModel { id: Default::default(), + created_at: Default::default(), + updated_at: Default::default(), + created_by: Default::default(), + updated_by: Default::default(), chain_id: Set(test_case.chain_id.into()), address: Set(test_case.address.to_vec()), transaction_hash: Set(test_case.transaction_hash.to_vec()), @@ -258,6 +262,10 @@ async fn insert_contract( contracts::ActiveModel { id: Default::default(), + created_at: Default::default(), + updated_at: Default::default(), + created_by: Default::default(), + updated_by: Default::default(), creation_code_hash: Set(creation_code_hash.clone()), runtime_code_hash: Set(runtime_code_hash.clone()), } @@ -281,6 +289,10 @@ async fn insert_code(txn: &DatabaseTransaction, code: Vec) -> Vec { let code_hash_keccak = keccak_hash::keccak(&code).0.to_vec(); code::ActiveModel { code_hash: Set(code_hash.clone()), + created_at: Default::default(), + updated_at: Default::default(), + created_by: Default::default(), + updated_by: Default::default(), code_hash_keccak: Set(code_hash_keccak), code: Set(Some(code)), } diff --git a/eth-bytecode-db/eth-bytecode-db/src/verification/db/verifier_alliance_db.rs b/eth-bytecode-db/eth-bytecode-db/src/verification/db/verifier_alliance_db.rs index 8ecfd10ea..e140d722e 100644 --- a/eth-bytecode-db/eth-bytecode-db/src/verification/db/verifier_alliance_db.rs +++ b/eth-bytecode-db/eth-bytecode-db/src/verification/db/verifier_alliance_db.rs @@ -266,6 +266,10 @@ async fn insert_contract_deployment( ) -> Result { let active_model = contract_deployments::ActiveModel { id: Default::default(), + created_at: Default::default(), + updated_at: Default::default(), + created_by: Default::default(), + updated_by: Default::default(), chain_id: Set(deployment_data.chain_id.into()), address: Set(deployment_data.contract_address.clone()), transaction_hash: Set(deployment_data.transaction_hash.clone()), @@ -325,6 +329,10 @@ async fn insert_contract( let active_model = contracts::ActiveModel { id: Default::default(), + created_at: Default::default(), + updated_at: Default::default(), + created_by: Default::default(), + updated_by: Default::default(), creation_code_hash: Set(creation_code_hash.clone()), runtime_code_hash: Set(runtime_code_hash.clone()), }; @@ -353,6 +361,10 @@ async fn insert_code( let active_model = code::ActiveModel { code_hash: Set(code_hash.clone()), + created_at: Default::default(), + updated_at: Default::default(), + created_by: Default::default(), + updated_by: Default::default(), code_hash_keccak: Set(code_hash_keccak), code: Set(Some(code)), }; diff --git a/eth-bytecode-db/eth-bytecode-db/tests/verifier_alliance.rs b/eth-bytecode-db/eth-bytecode-db/tests/verifier_alliance.rs index 0d2047853..c662cce72 100644 --- a/eth-bytecode-db/eth-bytecode-db/tests/verifier_alliance.rs +++ b/eth-bytecode-db/eth-bytecode-db/tests/verifier_alliance.rs @@ -220,6 +220,10 @@ async fn insert_contract_deployment(txn: &DatabaseTransaction, test_case: &TestC contract_deployments::ActiveModel { id: Default::default(), + created_at: Default::default(), + updated_at: Default::default(), + created_by: Default::default(), + updated_by: Default::default(), chain_id: Set(test_case.chain_id.into()), address: Set(test_case.address.to_vec()), transaction_hash: Set(test_case.transaction_hash.to_vec()), @@ -250,6 +254,10 @@ async fn insert_contract( contracts::ActiveModel { id: Default::default(), + created_at: Default::default(), + updated_at: Default::default(), + created_by: Default::default(), + updated_by: Default::default(), creation_code_hash: Set(creation_code_hash.clone()), runtime_code_hash: Set(runtime_code_hash.clone()), } @@ -273,6 +281,10 @@ async fn insert_code(txn: &DatabaseTransaction, code: Vec) -> Vec { let code_hash_keccak = keccak_hash::keccak(&code).0.to_vec(); code::ActiveModel { code_hash: Set(code_hash.clone()), + created_at: Default::default(), + updated_at: Default::default(), + created_by: Default::default(), + updated_by: Default::default(), code_hash_keccak: Set(code_hash_keccak), code: Set(Some(code)), } diff --git a/eth-bytecode-db/eth-bytecode-db/verifier-alliance-entity/src/code.rs b/eth-bytecode-db/eth-bytecode-db/verifier-alliance-entity/src/code.rs index 545b67a10..4f9f223d4 100644 --- a/eth-bytecode-db/eth-bytecode-db/verifier-alliance-entity/src/code.rs +++ b/eth-bytecode-db/eth-bytecode-db/verifier-alliance-entity/src/code.rs @@ -11,6 +11,10 @@ pub struct Model { column_type = "Binary(BlobSize::Blob(None))" )] pub code_hash: Vec, + pub created_at: DateTimeWithTimeZone, + pub updated_at: DateTimeWithTimeZone, + pub created_by: String, + pub updated_by: String, #[sea_orm(column_type = "Binary(BlobSize::Blob(None))")] pub code_hash_keccak: Vec, #[sea_orm(column_type = "Binary(BlobSize::Blob(None))", nullable)] diff --git a/eth-bytecode-db/eth-bytecode-db/verifier-alliance-entity/src/contract_deployments.rs b/eth-bytecode-db/eth-bytecode-db/verifier-alliance-entity/src/contract_deployments.rs index 1fe85be4e..e1e44d125 100644 --- a/eth-bytecode-db/eth-bytecode-db/verifier-alliance-entity/src/contract_deployments.rs +++ b/eth-bytecode-db/eth-bytecode-db/verifier-alliance-entity/src/contract_deployments.rs @@ -7,6 +7,10 @@ use sea_orm::entity::prelude::*; pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: Uuid, + pub created_at: DateTimeWithTimeZone, + pub updated_at: DateTimeWithTimeZone, + pub created_by: String, + pub updated_by: String, pub chain_id: Decimal, #[sea_orm(column_type = "Binary(BlobSize::Blob(None))")] pub address: Vec, diff --git a/eth-bytecode-db/eth-bytecode-db/verifier-alliance-entity/src/contracts.rs b/eth-bytecode-db/eth-bytecode-db/verifier-alliance-entity/src/contracts.rs index 158b2bc0f..e4d52e3ad 100644 --- a/eth-bytecode-db/eth-bytecode-db/verifier-alliance-entity/src/contracts.rs +++ b/eth-bytecode-db/eth-bytecode-db/verifier-alliance-entity/src/contracts.rs @@ -7,6 +7,10 @@ use sea_orm::entity::prelude::*; pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: Uuid, + pub created_at: DateTimeWithTimeZone, + pub updated_at: DateTimeWithTimeZone, + pub created_by: String, + pub updated_by: String, #[sea_orm(column_type = "Binary(BlobSize::Blob(None))")] pub creation_code_hash: Vec, #[sea_orm(column_type = "Binary(BlobSize::Blob(None))")]