Skip to content

Commit

Permalink
feat(blockscout-client): update transactions model
Browse files Browse the repository at this point in the history
  • Loading branch information
rimrakhimov committed Feb 13, 2025
1 parent 387f11c commit b3ea7d7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
21 changes: 12 additions & 9 deletions libs/blockscout-client/crate/src/models/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ pub struct Transaction {
pub exchange_rate: String,
#[serde(rename = "to")]
pub to: Option<models::AddressParam>, // changed
#[serde(rename = "tx_burnt_fee")]
pub tx_burnt_fee: Option<String>, // changed
#[serde(rename = "transaction_burnt_fee", alias = "tx_burnt_fee")] //changed
pub transaction_burnt_fee: Option<String>, // changed
#[serde(rename = "max_fee_per_gas")]
pub max_fee_per_gas: Option<String>, // changed
#[serde(rename = "result")]
Expand All @@ -50,9 +50,9 @@ pub struct Transaction {
#[serde(rename = "from")]
pub from: models::AddressParam,
#[serde(rename = "token_transfers")]
pub token_transfers: Option<Vec<models::TokenTransfer>>,
#[serde(rename = "tx_types")]
pub tx_types: Vec<String>,
pub token_transfers: Option<Vec<models::TokenTransfer>>, //changed
#[serde(rename = "transaction_types", alias = "tx_types")]
pub transaction_types: Vec<String>,
#[serde(rename = "gas_used")]
pub gas_used: String,
#[serde(rename = "created_contract")]
Expand All @@ -61,8 +61,11 @@ pub struct Transaction {
pub position: i32,
#[serde(rename = "nonce")]
pub nonce: i32,
#[serde(rename = "has_error_in_internal_txs")]
pub has_error_in_internal_txs: Option<bool>, // changed
#[serde(
rename = "has_error_in_internal_transactions",
alias = "has_error_in_internal_txs"
)] // changed
pub has_error_in_internal_transactions: Option<bool>, // changed
#[serde(rename = "actions")]
pub actions: Vec<models::TransactionAction>,
#[serde(rename = "decoded_input")]
Expand All @@ -79,6 +82,6 @@ pub struct Transaction {
pub revert_reason: Option<serde_json::Value>, // changed
#[serde(rename = "confirmation_duration")]
pub confirmation_duration: serde_json::Value,
#[serde(rename = "tx_tag")]
pub tx_tag: Option<String>, // changed
#[serde(rename = "transaction_tag", alias = "tx_tag")] // changed
pub transaction_tag: Option<String>, // changed
}
3 changes: 3 additions & 0 deletions libs/blockscout-client/swaggers/blockscout-api-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2138,6 +2138,7 @@ components:
type: string
example: '1866.51'
to:
nullable: true,
$ref: '#/components/schemas/AddressParam'
transaction_burnt_fee:
type: string
Expand Down Expand Up @@ -2180,6 +2181,7 @@ components:
type: string
example: '41309'
created_contract:
nullable: true,
$ref: '#/components/schemas/AddressParam'
position:
type: integer
Expand Down Expand Up @@ -3400,6 +3402,7 @@ components:
example: '1.0'
indexed_internal_transactions_ratio:
type: string
nullable: true
example: '1.0'
StatsResponse:
required:
Expand Down
3 changes: 3 additions & 0 deletions libs/blockscout-client/swaggers/blockscout-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2119,6 +2119,7 @@ components:
type: string
example: '1866.51'
to:
nullable: 'true,'
$ref: '#/components/schemas/AddressParam'
transaction_burnt_fee:
type: string
Expand Down Expand Up @@ -2161,6 +2162,7 @@ components:
type: string
example: '41309'
created_contract:
nullable: 'true,'
$ref: '#/components/schemas/AddressParam'
position:
type: integer
Expand Down Expand Up @@ -3381,6 +3383,7 @@ components:
example: '1.0'
indexed_internal_transactions_ratio:
type: string
nullable: true
example: '1.0'
StatsResponse:
required:
Expand Down

0 comments on commit b3ea7d7

Please sign in to comment.