Skip to content

Commit

Permalink
fix: change Decimal to BigDecimal (#1084)
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenzing authored Oct 9, 2024
1 parent f358c8b commit 72a446d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions libs/blockscout-db/entity/src/blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ pub struct Model {
#[sea_orm(column_type = "Decimal(Some((50, 0)))", nullable)]
pub difficulty: Option<Decimal>,
#[sea_orm(column_type = "Decimal(Some((100, 0)))")]
pub gas_limit: Decimal,
pub gas_limit: BigDecimal,
#[sea_orm(column_type = "Decimal(Some((100, 0)))")]
pub gas_used: Decimal,
pub gas_used: BigDecimal,
#[sea_orm(
primary_key,
auto_increment = false,
Expand Down
2 changes: 1 addition & 1 deletion libs/blockscout-db/entity/src/internal_transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub struct Model {
pub trace_address: Vec<i32>,
pub r#type: String,
#[sea_orm(column_type = "Decimal(Some((100, 0)))")]
pub value: Decimal,
pub value: BigDecimal,
pub inserted_at: DateTime,
pub updated_at: DateTime,
#[sea_orm(column_type = "VarBinary(StringLen::None)", nullable)]
Expand Down
10 changes: 5 additions & 5 deletions libs/blockscout-db/entity/src/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub struct Model {
pub cumulative_gas_used: Option<Decimal>,
pub error: Option<String>,
#[sea_orm(column_type = "Decimal(Some((100, 0)))")]
pub gas: Decimal,
pub gas: BigDecimal,
#[sea_orm(column_type = "Decimal(Some((100, 0)))", nullable)]
pub gas_price: Option<Decimal>,
#[sea_orm(column_type = "Decimal(Some((100, 0)))", nullable)]
Expand All @@ -25,14 +25,14 @@ pub struct Model {
pub input: Vec<u8>,
pub nonce: i32,
#[sea_orm(column_type = "Decimal(Some((100, 0)))")]
pub r: Decimal,
pub r: BigDecimal,
#[sea_orm(column_type = "Decimal(Some((100, 0)))")]
pub s: Decimal,
pub s: BigDecimal,
pub status: Option<i32>,
#[sea_orm(column_type = "Decimal(Some((100, 0)))")]
pub v: Decimal,
pub v: BigDecimal,
#[sea_orm(column_type = "Decimal(Some((100, 0)))")]
pub value: Decimal,
pub value: BigDecimal,
pub inserted_at: DateTime,
pub updated_at: DateTime,
#[sea_orm(column_type = "VarBinary(StringLen::None)", nullable)]
Expand Down
2 changes: 1 addition & 1 deletion libs/blockscout-db/entity/src/withdrawals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub struct Model {
pub index: i32,
pub validator_index: i32,
#[sea_orm(column_type = "Decimal(Some((100, 0)))")]
pub amount: Decimal,
pub amount: BigDecimal,
pub inserted_at: DateTime,
pub updated_at: DateTime,
#[sea_orm(column_type = "VarBinary(StringLen::None)")]
Expand Down

0 comments on commit 72a446d

Please sign in to comment.