From 68ff854e140697455b74aac265474caefdf3987a Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Tue, 7 Jan 2025 15:44:25 +0100 Subject: [PATCH 01/10] use coinbase-mesh with optional timestamp --- Cargo.lock | 30 +++++++++++++----------------- Cargo.toml | 2 +- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 68ff0aa..d8b3e0d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -410,9 +410,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", @@ -464,8 +464,7 @@ checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "coinbase-mesh" version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e8e3d7eeb99a7f0b6ae4b2d992627e1ba5fbe0ed2a399b9d788522199f086ea" +source = "git+https://github.com/MinaFoundation/coinbase-mesh.git?branch=optional-timestamp-field#d1e7b432e9682d93ba36c79efccbb09bdbf54cbf" dependencies = [ "reqwest", "serde", @@ -2401,9 +2400,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.10.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9720086b3357bcb44fce40117d769a4d068c70ecfa190850a980a71755f66fcc" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" dependencies = [ "base64", "chrono", @@ -2419,9 +2418,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.10.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f1abbfe725f27678f4663bcacb75a83e829fd464c25d78dd038a3a29e307cec" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" dependencies = [ "darling", "proc-macro2", @@ -2917,9 +2916,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", @@ -2938,9 +2937,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", @@ -3173,12 +3172,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-bidi" diff --git a/Cargo.toml b/Cargo.toml index 262058d..bbb0b51 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ anyhow = "1.0.86" axum = { version = "0.7.5", features = ["macros"] } bs58 = "0.5.1" clap = { version = "4.5.11", features = ["derive", "env"] } -coinbase-mesh = "0.1.0" +coinbase-mesh = { git = "https://github.com/MinaFoundation/coinbase-mesh.git", branch = "optional-timestamp-field" } convert_case = "0.6.0" cynic = { version = "3.7.3", features = ["http-reqwest-blocking"] } dashmap = "6.1.0" From 56810ac38be9964c0491276a5431ff73baefadb2 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Tue, 7 Jan 2025 15:45:10 +0100 Subject: [PATCH 02/10] user commands with optional timestamp --- sql/queries/indexer_user_commands.sql | 3 +- .../indexer_user_commands_optimized.sql | 3 +- src/api/search_transactions.rs | 17 +- src/types.rs | 1 + ...tions__search_transactions_failed.snap.new | 640 +++ ...rch_transactions_internal_command.snap.new | 64 + ..._search_transactions_offset_limit.snap.new | 4610 +++++++++++++++++ ...ns__search_transactions_specified.snap.new | 612 +++ ..._search_transactions_zkapp_failed.snap.new | 134 + ...search_transactions_zkapp_success.snap.new | 134 + ...s_zkapp_tokens_account_identifier.snap.new | 103 + ...transactions_zkapp_tokens_tx_hash.snap.new | 173 + 12 files changed, 6491 insertions(+), 3 deletions(-) create mode 100644 tests/snapshots/search_transactions__search_transactions_failed.snap.new create mode 100644 tests/snapshots/search_transactions__search_transactions_internal_command.snap.new create mode 100644 tests/snapshots/search_transactions__search_transactions_offset_limit.snap.new create mode 100644 tests/snapshots/search_transactions__search_transactions_specified.snap.new create mode 100644 tests/snapshots/search_transactions__search_transactions_zkapp_failed.snap.new create mode 100644 tests/snapshots/search_transactions__search_transactions_zkapp_success.snap.new create mode 100644 tests/snapshots/search_transactions__search_transactions_zkapp_tokens_account_identifier.snap.new create mode 100644 tests/snapshots/search_transactions__search_transactions_zkapp_tokens_tx_hash.snap.new diff --git a/sql/queries/indexer_user_commands.sql b/sql/queries/indexer_user_commands.sql index 5919fbf..e3db629 100644 --- a/sql/queries/indexer_user_commands.sql +++ b/sql/queries/indexer_user_commands.sql @@ -45,7 +45,8 @@ WITH buc.failure_reason, b.state_hash, b.chain_status AS "chain_status: ChainStatus", - b.height + b.height, + b.timestamp FROM user_commands AS u INNER JOIN blocks_user_commands AS buc ON u.id=buc.user_command_id diff --git a/sql/queries/indexer_user_commands_optimized.sql b/sql/queries/indexer_user_commands_optimized.sql index a298d81..e41860e 100644 --- a/sql/queries/indexer_user_commands_optimized.sql +++ b/sql/queries/indexer_user_commands_optimized.sql @@ -41,7 +41,8 @@ WITH uca.failure_reason, b.state_hash, b.chain_status AS "chain_status: ChainStatus", - b.height + b.height, + b.timestamp FROM user_commands_aggregated AS uca INNER JOIN public_keys AS pk ON uca.fee_payer_id=pk.id diff --git a/src/api/search_transactions.rs b/src/api/search_transactions.rs index 36ab43a..587ff67 100644 --- a/src/api/search_transactions.rs +++ b/src/api/search_transactions.rs @@ -25,11 +25,25 @@ impl MinaMesh { tracing::debug!("Offset: {}, Limit: {}", offset, limit); let query_params = SearchTransactionsQueryParams::try_from(req.clone())?; + let include_timestamp = req.include_timestamp.unwrap_or(false); // User Commands let user_commands = self.fetch_user_commands(&query_params, offset, limit).await?; let user_commands_total_count = user_commands.first().and_then(|uc| uc.total_count).unwrap_or(0); - transactions.extend(user_commands.into_iter().map(|ic| ic.into())); + let user_transactions: Vec = user_commands + .into_iter() + .map(|uc| { + let timestamp = uc.timestamp.clone(); + let mut transaction: BlockTransaction = uc.into(); + if include_timestamp { + transaction.timestamp = timestamp.map(|ts| ts.parse::().unwrap_or_default()); + } else { + transaction.timestamp = None; + } + transaction + }) + .collect(); + transactions.extend(user_transactions); total_count += user_commands_total_count; tracing::debug!("User commands total: {}, retrieved: {}", user_commands_total_count, transactions.len()); @@ -240,6 +254,7 @@ pub fn zkapp_commands_to_block_transactions(commands: Vec) -> Vec< metadata: None, related_transactions: None, }), + timestamp: None, }; result.push(transaction); } diff --git a/src/types.rs b/src/types.rs index 3259c56..7aeb9a0 100644 --- a/src/types.rs +++ b/src/types.rs @@ -136,6 +136,7 @@ pub struct UserCommand { pub source: String, pub receiver: String, pub creation_fee: Option, + pub timestamp: Option, } // Used in block diff --git a/tests/snapshots/search_transactions__search_transactions_failed.snap.new b/tests/snapshots/search_transactions__search_transactions_failed.snap.new new file mode 100644 index 0000000..56424b8 --- /dev/null +++ b/tests/snapshots/search_transactions__search_transactions_failed.snap.new @@ -0,0 +1,640 @@ +--- +source: tests/search_transactions.rs +assertion_line: 56 +expression: response +--- +Ok( + SearchTransactionsResponse { + transactions: [ + BlockTransaction { + block_identifier: BlockIdentifier { + index: 6, + hash: "3NK5miztenFxHTRjJNNUFEPuZALfbEL3jrJ96SJKSsgF275kvDDm", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "CkpZCr7krbJnKzEdxdBCXr52A3mVtkgVBYtMuDqTRDf7iqrYoC1fc", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "fee_payment", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qnEdPB1V5YPEcGaETb19naLJV6sWdveCZEjSLhcVyrPcPWHkGGax", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-89989705", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: Some( + Object { + "reason": String("Amount_insufficient_to_create_account"), + }, + ), + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "payment_source_dec", + status: Some( + "Failed", + ), + account: Some( + AccountIdentifier { + address: "B62qnEdPB1V5YPEcGaETb19naLJV6sWdveCZEjSLhcVyrPcPWHkGGax", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: None, + coin_change: None, + metadata: Some( + Object { + "reason": String("Amount_insufficient_to_create_account"), + }, + ), + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: Some( + [ + OperationIdentifier { + index: 1, + network_index: None, + }, + ], + ), + type: "payment_receiver_inc", + status: Some( + "Failed", + ), + account: Some( + AccountIdentifier { + address: "B62qovA62w9f2xW9XGv1X6t7Bn6SmqyQf618xC3LM9TsQeL7KLSfxPV", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: None, + coin_change: None, + metadata: Some( + Object { + "reason": String("Amount_insufficient_to_create_account"), + }, + ), + }, + ], + related_transactions: None, + metadata: Some( + Object { + "memo": String("BeepBoop"), + "nonce": Number(0), + }, + ), + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 6, + hash: "3NK5miztenFxHTRjJNNUFEPuZALfbEL3jrJ96SJKSsgF275kvDDm", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "CkpZsnkrLDa3NaktTxoK5unrHoFdoS1Z8GEav7nW69io5SuGpTXYk", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "fee_payment", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qnEdPB1V5YPEcGaETb19naLJV6sWdveCZEjSLhcVyrPcPWHkGGax", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-87832963", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: Some( + Object { + "reason": String("Amount_insufficient_to_create_account"), + }, + ), + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "payment_source_dec", + status: Some( + "Failed", + ), + account: Some( + AccountIdentifier { + address: "B62qnEdPB1V5YPEcGaETb19naLJV6sWdveCZEjSLhcVyrPcPWHkGGax", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: None, + coin_change: None, + metadata: Some( + Object { + "reason": String("Amount_insufficient_to_create_account"), + }, + ), + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: Some( + [ + OperationIdentifier { + index: 1, + network_index: None, + }, + ], + ), + type: "payment_receiver_inc", + status: Some( + "Failed", + ), + account: Some( + AccountIdentifier { + address: "B62qovA62w9f2xW9XGv1X6t7Bn6SmqyQf618xC3LM9TsQeL7KLSfxPV", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: None, + coin_change: None, + metadata: Some( + Object { + "reason": String("Amount_insufficient_to_create_account"), + }, + ), + }, + ], + related_transactions: None, + metadata: Some( + Object { + "memo": String("BeepBoop"), + "nonce": Number(1), + }, + ), + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 6, + hash: "3NK5miztenFxHTRjJNNUFEPuZALfbEL3jrJ96SJKSsgF275kvDDm", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "CkpZ9pXfjDHQd5b59M2BS37TCoUmZNyLiHZrnjdknvTXKavw2ySuH", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "fee_payment", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qnEdPB1V5YPEcGaETb19naLJV6sWdveCZEjSLhcVyrPcPWHkGGax", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-93992190", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: Some( + Object { + "reason": String("Amount_insufficient_to_create_account"), + }, + ), + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "payment_source_dec", + status: Some( + "Failed", + ), + account: Some( + AccountIdentifier { + address: "B62qnEdPB1V5YPEcGaETb19naLJV6sWdveCZEjSLhcVyrPcPWHkGGax", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: None, + coin_change: None, + metadata: Some( + Object { + "reason": String("Amount_insufficient_to_create_account"), + }, + ), + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: Some( + [ + OperationIdentifier { + index: 1, + network_index: None, + }, + ], + ), + type: "payment_receiver_inc", + status: Some( + "Failed", + ), + account: Some( + AccountIdentifier { + address: "B62qovA62w9f2xW9XGv1X6t7Bn6SmqyQf618xC3LM9TsQeL7KLSfxPV", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: None, + coin_change: None, + metadata: Some( + Object { + "reason": String("Amount_insufficient_to_create_account"), + }, + ), + }, + ], + related_transactions: None, + metadata: Some( + Object { + "memo": String("BeepBoop"), + "nonce": Number(2), + }, + ), + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 6, + hash: "3NK5miztenFxHTRjJNNUFEPuZALfbEL3jrJ96SJKSsgF275kvDDm", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "CkpaLd6Frx8rBhPjDiZuH5dJrjMqTDxgCijaz9dPLssxEWJN3rXmX", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "fee_payment", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qp3B9VW1ir5qL1MWRwr6ecjC2NZbGr8vysGeme9vXGcFXTMNXb2t", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-69271587", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: Some( + Object { + "reason": String("Amount_insufficient_to_create_account"), + }, + ), + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "payment_source_dec", + status: Some( + "Failed", + ), + account: Some( + AccountIdentifier { + address: "B62qp3B9VW1ir5qL1MWRwr6ecjC2NZbGr8vysGeme9vXGcFXTMNXb2t", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: None, + coin_change: None, + metadata: Some( + Object { + "reason": String("Amount_insufficient_to_create_account"), + }, + ), + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: Some( + [ + OperationIdentifier { + index: 1, + network_index: None, + }, + ], + ), + type: "payment_receiver_inc", + status: Some( + "Failed", + ), + account: Some( + AccountIdentifier { + address: "B62qke56mUTT8ihsfL8vEFwbDmqBpWrX1CpBFHm27otQJdvW7GKaEpV", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: None, + coin_change: None, + metadata: Some( + Object { + "reason": String("Amount_insufficient_to_create_account"), + }, + ), + }, + ], + related_transactions: None, + metadata: Some( + Object { + "memo": String("BeepBoop"), + "nonce": Number(0), + }, + ), + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 6, + hash: "3NK5miztenFxHTRjJNNUFEPuZALfbEL3jrJ96SJKSsgF275kvDDm", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "CkpYrNnffheFrq8wZ6LhW9HY6V7LhsMZLBELJ5mSk4QZmYtxC4Msn", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "fee_payment", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qp3B9VW1ir5qL1MWRwr6ecjC2NZbGr8vysGeme9vXGcFXTMNXb2t", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-86841096", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: Some( + Object { + "reason": String("Amount_insufficient_to_create_account"), + }, + ), + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "payment_source_dec", + status: Some( + "Failed", + ), + account: Some( + AccountIdentifier { + address: "B62qp3B9VW1ir5qL1MWRwr6ecjC2NZbGr8vysGeme9vXGcFXTMNXb2t", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: None, + coin_change: None, + metadata: Some( + Object { + "reason": String("Amount_insufficient_to_create_account"), + }, + ), + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: Some( + [ + OperationIdentifier { + index: 1, + network_index: None, + }, + ], + ), + type: "payment_receiver_inc", + status: Some( + "Failed", + ), + account: Some( + AccountIdentifier { + address: "B62qke56mUTT8ihsfL8vEFwbDmqBpWrX1CpBFHm27otQJdvW7GKaEpV", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: None, + coin_change: None, + metadata: Some( + Object { + "reason": String("Amount_insufficient_to_create_account"), + }, + ), + }, + ], + related_transactions: None, + metadata: Some( + Object { + "memo": String("BeepBoop"), + "nonce": Number(1), + }, + ), + }, + timestamp: None, + }, + ], + total_count: 317, + next_offset: Some( + 5, + ), + }, +) diff --git a/tests/snapshots/search_transactions__search_transactions_internal_command.snap.new b/tests/snapshots/search_transactions__search_transactions_internal_command.snap.new new file mode 100644 index 0000000..011a74a --- /dev/null +++ b/tests/snapshots/search_transactions__search_transactions_internal_command.snap.new @@ -0,0 +1,64 @@ +--- +source: tests/search_transactions.rs +assertion_line: 78 +expression: response +--- +Ok( + SearchTransactionsResponse { + transactions: [ + BlockTransaction { + block_identifier: BlockIdentifier { + index: 2, + hash: "3NLszFtKjd6gDcCwcbwqTQLJoB1jfU9QL1DW2Y8A9g4FRH9ySWLp", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "coinbase:0:0:CkpYcKc2oGs8JUd4tmdGBsZXQCQVkayuyffEjrNWctX5Wuad3vVNe", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "coinbase_inc", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmM4HnDHDwVXqBdCcXQJ9U2zAPNkhqmo8SNWAxKWoEok7GzQEkTv", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "1440000000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + ], + total_count: 1, + next_offset: None, + }, +) diff --git a/tests/snapshots/search_transactions__search_transactions_offset_limit.snap.new b/tests/snapshots/search_transactions__search_transactions_offset_limit.snap.new new file mode 100644 index 0000000..e0a83bf --- /dev/null +++ b/tests/snapshots/search_transactions__search_transactions_offset_limit.snap.new @@ -0,0 +1,4610 @@ +--- +source: tests/search_transactions.rs +assertion_line: 204 +expression: response +--- +Ok( + SearchTransactionsResponse { + transactions: [ + BlockTransaction { + block_identifier: BlockIdentifier { + index: 358031, + hash: "3NLV621iURxrb94hkgAEDvdpXAwVYimbV8Y4LASvoEY37wuLNrkv", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5JuxqkYS4KarMCyCdi4nESzCTeFTZJfdjvU6HmX2M4Z7ycQ6MMwo", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-200000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 3, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 4, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 5, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 6, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 7, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkrmYG3iGanZWAT3xf6rEsFXcQfyNcFcwRNyCPPm6F3wYLcf4Dav", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 358178, + hash: "3NLtqnuNYATuWR2SDucdaZupVvn1e2ZsEpXgdhSuHQPg5Eergjwf", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5JusbiUA33pBrujSYdGvQmzjzgFeM4Ankeeegfh959q3GoKtbGnY", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-200000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 3, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 4, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 5, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 6, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-1000000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 7, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "9405000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 8, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qoP53ToLGhovZLCo23qEyTCfN4nb2HbF2JSCgasSd7UejR8zxFZB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "9405000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 359772, + hash: "3NKAeoFtwLhV8CQPLgZfLwFSTLUYhPSvmsEXDotWz91goTTXA7Jr", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5JtxVrf8A1SNuHy2ZQL7KmsCeTeKZJULJcXKwCoQqSvnr2dY9r3a", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-200000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 3, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 4, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 5, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 6, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "9405000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 7, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qoP53ToLGhovZLCo23qEyTCfN4nb2HbF2JSCgasSd7UejR8zxFZB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "9405000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 359975, + hash: "3NLH7NN6QjhQXUGZr8VAjBcn7Hj8nxWox67W22R1KEcSqLhBSGF4", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5JuCaRrXYJw51iT7xV4Xb8DDLSznMkX7F1MTPq6KrAmbt15oWEdq", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-200000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 3, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 4, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 5, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 6, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qoP53ToLGhovZLCo23qEyTCfN4nb2HbF2JSCgasSd7UejR8zxFZB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "9405000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 7, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "9405000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 360055, + hash: "3NKpsSjSdNnWqyobrz2cw9yTxrYz4sTr7Lh6Y6FKZjLojs9bsaLW", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5JuFvfASDPX8yixvJAzRxF8At8wTCYhdhwxn3A5oxch5yL8usqzi", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-200000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 3, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 4, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 5, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 6, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qoP53ToLGhovZLCo23qEyTCfN4nb2HbF2JSCgasSd7UejR8zxFZB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "9405000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 7, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "9405000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 360070, + hash: "3NLV3NoxL547ymZVPa9em9iUxfkTDya5mirjGoMsX69jCP1A5s5M", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5JtkFjqmAsAV8NVTN9HjD9WuN9DkUVzwBnBTSJWuG8MWEHr8xaxg", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-200000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 3, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 4, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 5, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 6, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "2755000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 7, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkrmYG3iGanZWAT3xf6rEsFXcQfyNcFcwRNyCPPm6F3wYLcf4Dav", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "2755000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 360075, + hash: "3NKnQDuYTs2gfL6MnyPej6GbdkaYMM7W8FK1ib5cDJMVkKe8epoh", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5JuJsmfYrz2bwkAi7WrP2Bbant5WXnoijW2dQHfZk3X26CmAFbnJ", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-200000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 3, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 4, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 5, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkrmYG3iGanZWAT3xf6rEsFXcQfyNcFcwRNyCPPm6F3wYLcf4Dav", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 6, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 7, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 360104, + hash: "3NKRqjzx7UFTpRN6FKHpYg94KDDkmnnBA6a8RfDAmCkNDFTckoeC", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5JtykW8N4Y7WFqBTALZQ1pVd8R4NFpAkmveN7b3N4iJcNKAqVqLt", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-200000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 3, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 4, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 5, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 6, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkrmYG3iGanZWAT3xf6rEsFXcQfyNcFcwRNyCPPm6F3wYLcf4Dav", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "2849050", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 7, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "2849050", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 360388, + hash: "3NLYL1BGsxasqfgBDVFjAkwRkN7QZF5LErJxSAGtTdro6pnhTGJ9", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5Juudbjr2ePB7fNCRSZyx1BSiiHmxt5ngBURb2hSqyLbnCtNdeaR", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-200000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 3, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 4, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 5, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 6, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkrmYG3iGanZWAT3xf6rEsFXcQfyNcFcwRNyCPPm6F3wYLcf4Dav", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "2755000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 7, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "2755000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 360391, + hash: "3NKEsr4yH44CoV1gk9bskE9FH4tUPt7Kuw8FuG8zahYBgsBwJzC4", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5Jtg85F2wxmqeSYadGd1cGRKeSLba2SyuLBFH8sRZmd2sYqTnpEj", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-200000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 3, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 4, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 5, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 6, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkrmYG3iGanZWAT3xf6rEsFXcQfyNcFcwRNyCPPm6F3wYLcf4Dav", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "2755000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 7, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "2755000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 360403, + hash: "3NLNFQH2ZRfcZ7CJuxpxrT2RedgtF4LkDEEPEu27kBpDUzq8ABu5", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5Ju3rHHmVGRSnmGrmNVxnw8pL58n46y96ViX2Trjr4eJ7udbdKMy", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-200000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 3, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 4, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 5, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 6, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "519175000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 7, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkrmYG3iGanZWAT3xf6rEsFXcQfyNcFcwRNyCPPm6F3wYLcf4Dav", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "519175000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 360426, + hash: "3NKCP8HpfWGgMbELzv5wDg8TrsxE1GBioZFDm5av1a4YhJf8pMTm", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5JudiBsVoSoa12DqqTVmFRqd9X4m7SER7RFLJabL9Ebms63PsMjc", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-200000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 3, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 4, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 5, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 6, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkrmYG3iGanZWAT3xf6rEsFXcQfyNcFcwRNyCPPm6F3wYLcf4Dav", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "4655000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 7, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "4655000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 362591, + hash: "3NLpQrLdN3tM8Dfq524GihvJjeAmV4aDmutacAxwUZ9eCtD3xuHS", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5Jts9E1CxBzfb5kfXE3i4MWhkXKrntUHgZAN1b1SXGEk7tiknEJb", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-200000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 3, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 4, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 5, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 6, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "1899050", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 7, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkrmYG3iGanZWAT3xf6rEsFXcQfyNcFcwRNyCPPm6F3wYLcf4Dav", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "1899050", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 362694, + hash: "3NKqfeYgbU97LCajktUb5LdAf5KnHtTQo3gxJ4ezUVj8BE6Atx2k", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5JuSiSC15HK2QnMD2jQqsqyWs4ZtxbGcnCeMLG7Y1CtMdxM9nUbG", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-200000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 3, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 4, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 5, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 6, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "9499050", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 7, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qoP53ToLGhovZLCo23qEyTCfN4nb2HbF2JSCgasSd7UejR8zxFZB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "9499050", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 364249, + hash: "3NLLRb2L9MyAz9DYkzrLpV3SKMdnjsjjY7pRKDtpiv4cEfprQsau", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5Ju8MfT129GGqRtbUGtDSkjahSmdgL8NU5VC69kjJNQ5e4r4SBnD", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-200000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 3, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 4, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 5, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 6, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "9499050", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 7, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qoP53ToLGhovZLCo23qEyTCfN4nb2HbF2JSCgasSd7UejR8zxFZB", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "9499050", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + ], + total_count: 26, + next_offset: Some( + 20, + ), + }, +) diff --git a/tests/snapshots/search_transactions__search_transactions_specified.snap.new b/tests/snapshots/search_transactions__search_transactions_specified.snap.new new file mode 100644 index 0000000..5c4950e --- /dev/null +++ b/tests/snapshots/search_transactions__search_transactions_specified.snap.new @@ -0,0 +1,612 @@ +--- +source: tests/search_transactions.rs +assertion_line: 37 +expression: response_addr +--- +Ok( + SearchTransactionsResponse { + transactions: [ + BlockTransaction { + block_identifier: BlockIdentifier { + index: 16674, + hash: "3NLYrK5fabWDRVRoxk4e3kF62gUDGcPdfL1mqnbqxYJyVouX4qBX", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "CkpZUFsTxw7THWoXoSPHiJp3mi92TxL8oBgpdHhJczmNjd7D87jUD", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "fee_payment", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmQsEHcsPUs5xdtHKjEmWqqhUPRSF2GNmdguqnNvpEZpKftPC69e", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-250000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "account_creation_fee_via_payment", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-1000000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "payment_source_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmQsEHcsPUs5xdtHKjEmWqqhUPRSF2GNmdguqnNvpEZpKftPC69e", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-2000000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 3, + network_index: None, + }, + related_operations: Some( + [ + OperationIdentifier { + index: 2, + network_index: None, + }, + ], + ), + type: "payment_receiver_inc", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "2000000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: Some( + Object { + "nonce": Number(61), + }, + ), + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 16675, + hash: "3NKbtfTG6RwxgE4baCCYQNcHsnhQ1pzLvKHGwEdT28UoAeUx1ZZ3", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "CkpZHzUPh2j4fpawaza6kVRtj4dcUNqBZUS4yGgB9qAoHjf7NJcEn", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "fee_payment", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-250000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "payment_source_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-100000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: Some( + [ + OperationIdentifier { + index: 1, + network_index: None, + }, + ], + ), + type: "payment_receiver_inc", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmQsEHcsPUs5xdtHKjEmWqqhUPRSF2GNmdguqnNvpEZpKftPC69e", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "100000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: Some( + Object { + "nonce": Number(0), + }, + ), + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 16677, + hash: "3NLf87FpL1tzVEF2TqAe6Wrt5brR1rrQKKKNdCW3XbEJE5Joz2ZR", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "CkpZMrLr36G2Bnq5hLo4tcwuo3L4hda5ScyQRHfa5o4fKCCaHNWcn", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "fee_payment", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmQsEHcsPUs5xdtHKjEmWqqhUPRSF2GNmdguqnNvpEZpKftPC69e", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-250000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "payment_source_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmQsEHcsPUs5xdtHKjEmWqqhUPRSF2GNmdguqnNvpEZpKftPC69e", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-50000000000000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: Some( + [ + OperationIdentifier { + index: 1, + network_index: None, + }, + ], + ), + type: "payment_receiver_inc", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "50000000000000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: Some( + Object { + "nonce": Number(62), + }, + ), + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 16679, + hash: "3NKyk5Xw1aMhkXa81tkn8EJS28SbMkNt7g81XiddERE9WXoQUV7V", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "CkpaAwUS7j64iTVz6oxU6VfGVWjbSPrizo5DuS1DAWZNfSN5fQxsi", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "fee_payment", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-250000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "delegate_change", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: None, + coin_change: None, + metadata: Some( + Object { + "delegate_change_target": String("B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww"), + }, + ), + }, + ], + related_transactions: None, + metadata: Some( + Object { + "nonce": Number(1), + }, + ), + }, + timestamp: None, + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 140303, + hash: "3NLbvXACjTAMXZkXV4pJomU9SU1xev9EWfh9PKjzCQdJcpZsMFH3", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "CkpYtpCsRgvtFs2P8zFtwxSUftgKYMqR6QCJH2Fxx4YZ6kHTZiYaf", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "fee_payment", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qifTiRqudGJUgHuCr8EC9a48bBNSBEisGPQMRwLcUkSXVaaNwRLx", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-200100000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "delegate_change", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qifTiRqudGJUgHuCr8EC9a48bBNSBEisGPQMRwLcUkSXVaaNwRLx", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: None, + coin_change: None, + metadata: Some( + Object { + "delegate_change_target": String("B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP"), + }, + ), + }, + ], + related_transactions: None, + metadata: Some( + Object { + "nonce": Number(2), + }, + ), + }, + timestamp: None, + }, + ], + total_count: 5, + next_offset: None, + }, +) diff --git a/tests/snapshots/search_transactions__search_transactions_zkapp_failed.snap.new b/tests/snapshots/search_transactions__search_transactions_zkapp_failed.snap.new new file mode 100644 index 0000000..66cc298 --- /dev/null +++ b/tests/snapshots/search_transactions__search_transactions_zkapp_failed.snap.new @@ -0,0 +1,134 @@ +--- +source: tests/search_transactions.rs +assertion_line: 120 +expression: response +--- +Ok( + SearchTransactionsResponse { + transactions: [ + BlockTransaction { + block_identifier: BlockIdentifier { + index: 356949, + hash: "3NLViPD1oW4XgMsSXsorkhphgREkBfNgAfu2EGFTKSH5EUV9YDNe", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5JujBt8rnKheA7CHBnTwUDXrHtQxqPB9LL5Q8y4KwLjPBsBSJuSE", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qjGsPY47SMkTykivPBAU3riS9gvMMrGr7ve6ynoHJNBzAhQmtoBn", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-100000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Failed", + ), + account: Some( + AccountIdentifier { + address: "B62qide3tEVFgzLFo72rhrF4p8Luv6R5NAmvwo83SnZGnwV9Q6fiVTK", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Failed", + ), + account: Some( + AccountIdentifier { + address: "B62qjGsPY47SMkTykivPBAU3riS9gvMMrGr7ve6ynoHJNBzAhQmtoBn", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + ], + total_count: 1, + next_offset: None, + }, +) diff --git a/tests/snapshots/search_transactions__search_transactions_zkapp_success.snap.new b/tests/snapshots/search_transactions__search_transactions_zkapp_success.snap.new new file mode 100644 index 0000000..c0d9c59 --- /dev/null +++ b/tests/snapshots/search_transactions__search_transactions_zkapp_success.snap.new @@ -0,0 +1,134 @@ +--- +source: tests/search_transactions.rs +assertion_line: 99 +expression: response +--- +Ok( + SearchTransactionsResponse { + transactions: [ + BlockTransaction { + block_identifier: BlockIdentifier { + index: 337818, + hash: "3NKdrqcGAwSgfK6T8az4cauXExHs7D9eKC6Ywotm8qEeudPLxepG", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5JvFoEyvuPu9zmi4bDGbhqsakre2SPQU1KKbeh2Lk5uC9eYrc2h2", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qjGsPY47SMkTykivPBAU3riS9gvMMrGr7ve6ynoHJNBzAhQmtoBn", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-10000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qqieAv9AQCsLHfinPESXB9exSJBpTVLpgkjqWT9cSGBc67pBkNxs", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qjGsPY47SMkTykivPBAU3riS9gvMMrGr7ve6ynoHJNBzAhQmtoBn", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + ], + total_count: 1, + next_offset: None, + }, +) diff --git a/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_account_identifier.snap.new b/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_account_identifier.snap.new new file mode 100644 index 0000000..5d76901 --- /dev/null +++ b/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_account_identifier.snap.new @@ -0,0 +1,103 @@ +--- +source: tests/search_transactions.rs +assertion_line: 163 +expression: response_address1_token +--- +Ok( + SearchTransactionsResponse { + transactions: [ + BlockTransaction { + block_identifier: BlockIdentifier { + index: 319856, + hash: "3NKjAbntQZNxPwbHkRbDAjPrMRoR58MAFepDsPtyQ3vSbhAWEeuu", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5JuotEHhjuYbu2oucyTiVhJX3Abx5DPL4NXnM7CP9hfJZLE5G8n9", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qituGxc1ZNbWfz4SnftNUaJ78YYYsmuuuJr1FFHjbRqLir7tvBew", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-100000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qjwDWxjf4LtJ4YWJQDdTNPqZ69ZyeCzbpAFKN7EoZzYig5ZRz8JE", + sub_account: None, + metadata: Some( + Object { + "token_id": String("xBxjFpJkbWpbGua7Lf36S1NLhffFoEChyP3pz6SYKnx7dFCTwg"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "10000000000000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("xBxjFpJkbWpbGua7Lf36S1NLhffFoEChyP3pz6SYKnx7dFCTwg"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + ], + total_count: 1, + next_offset: None, + }, +) diff --git a/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_tx_hash.snap.new b/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_tx_hash.snap.new new file mode 100644 index 0000000..1197c89 --- /dev/null +++ b/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_tx_hash.snap.new @@ -0,0 +1,173 @@ +--- +source: tests/search_transactions.rs +assertion_line: 183 +expression: response_tx_hash +--- +Ok( + SearchTransactionsResponse { + transactions: [ + BlockTransaction { + block_identifier: BlockIdentifier { + index: 319856, + hash: "3NKjAbntQZNxPwbHkRbDAjPrMRoR58MAFepDsPtyQ3vSbhAWEeuu", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5JuotEHhjuYbu2oucyTiVhJX3Abx5DPL4NXnM7CP9hfJZLE5G8n9", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qituGxc1ZNbWfz4SnftNUaJ78YYYsmuuuJr1FFHjbRqLir7tvBew", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-100000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qjwDWxjf4LtJ4YWJQDdTNPqZ69ZyeCzbpAFKN7EoZzYig5ZRz8JE", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qituGxc1ZNbWfz4SnftNUaJ78YYYsmuuuJr1FFHjbRqLir7tvBew", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-1000000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 3, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qjwDWxjf4LtJ4YWJQDdTNPqZ69ZyeCzbpAFKN7EoZzYig5ZRz8JE", + sub_account: None, + metadata: Some( + Object { + "token_id": String("xBxjFpJkbWpbGua7Lf36S1NLhffFoEChyP3pz6SYKnx7dFCTwg"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "10000000000000", + currency: Currency { + symbol: "MINA+", + decimals: 9, + metadata: Some( + Object { + "token_id": String("xBxjFpJkbWpbGua7Lf36S1NLhffFoEChyP3pz6SYKnx7dFCTwg"), + }, + ), + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: None, + }, + ], + total_count: 1, + next_offset: None, + }, +) From 4321cc5995757dd50fd4d239b97bace813549c33 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Wed, 8 Jan 2025 11:22:17 +0100 Subject: [PATCH 03/10] internal commands --- sql/queries/indexer_internal_commands.sql | 3 +- .../indexer_internal_commands_optimized.sql | 3 +- src/api/search_transactions.rs | 18 +- src/types.rs | 1 + ...nsactions__search_transactions_failed.snap | 5 + ...tions__search_transactions_failed.snap.new | 640 --- ..._search_transactions_internal_command.snap | 1 + ...rch_transactions_internal_command.snap.new | 64 - ...ons__search_transactions_offset_limit.snap | 15 + ..._search_transactions_offset_limit.snap.new | 4610 ----------------- ...ctions__search_transactions_specified.snap | 7 +- ...ns__search_transactions_specified.snap.new | 612 --- ...ons__search_transactions_zkapp_failed.snap | 1 + ..._search_transactions_zkapp_failed.snap.new | 134 - ...ns__search_transactions_zkapp_success.snap | 1 + ...search_transactions_zkapp_success.snap.new | 134 - ...tions_zkapp_tokens_account_identifier.snap | 1 + ...s_zkapp_tokens_account_identifier.snap.new | 103 - ...rch_transactions_zkapp_tokens_tx_hash.snap | 1 + ...transactions_zkapp_tokens_tx_hash.snap.new | 173 - 20 files changed, 51 insertions(+), 6476 deletions(-) delete mode 100644 tests/snapshots/search_transactions__search_transactions_failed.snap.new delete mode 100644 tests/snapshots/search_transactions__search_transactions_internal_command.snap.new delete mode 100644 tests/snapshots/search_transactions__search_transactions_offset_limit.snap.new delete mode 100644 tests/snapshots/search_transactions__search_transactions_specified.snap.new delete mode 100644 tests/snapshots/search_transactions__search_transactions_zkapp_failed.snap.new delete mode 100644 tests/snapshots/search_transactions__search_transactions_zkapp_success.snap.new delete mode 100644 tests/snapshots/search_transactions__search_transactions_zkapp_tokens_account_identifier.snap.new delete mode 100644 tests/snapshots/search_transactions__search_transactions_zkapp_tokens_tx_hash.snap.new diff --git a/sql/queries/indexer_internal_commands.sql b/sql/queries/indexer_internal_commands.sql index cd8deeb..75c8197 100644 --- a/sql/queries/indexer_internal_commands.sql +++ b/sql/queries/indexer_internal_commands.sql @@ -62,7 +62,8 @@ WITH bic.block_id, bic.status AS "status: TransactionStatus", b.state_hash, - b.height + b.height, + b.timestamp FROM internal_commands AS i INNER JOIN blocks_internal_commands AS bic ON i.id=bic.internal_command_id diff --git a/sql/queries/indexer_internal_commands_optimized.sql b/sql/queries/indexer_internal_commands_optimized.sql index 8908570..a1b4a40 100644 --- a/sql/queries/indexer_internal_commands_optimized.sql +++ b/sql/queries/indexer_internal_commands_optimized.sql @@ -62,7 +62,8 @@ WITH ica.block_id, ica.status AS "status: TransactionStatus", b.state_hash, - b.height + b.height, + b.timestamp FROM internal_commands_aggregated AS ica INNER JOIN blocks AS b ON ica.block_id=b.id diff --git a/src/api/search_transactions.rs b/src/api/search_transactions.rs index 587ff67..8118a3d 100644 --- a/src/api/search_transactions.rs +++ b/src/api/search_transactions.rs @@ -30,7 +30,7 @@ impl MinaMesh { // User Commands let user_commands = self.fetch_user_commands(&query_params, offset, limit).await?; let user_commands_total_count = user_commands.first().and_then(|uc| uc.total_count).unwrap_or(0); - let user_transactions: Vec = user_commands + let user_transactions_bt: Vec = user_commands .into_iter() .map(|uc| { let timestamp = uc.timestamp.clone(); @@ -43,7 +43,7 @@ impl MinaMesh { transaction }) .collect(); - transactions.extend(user_transactions); + transactions.extend(user_transactions_bt); total_count += user_commands_total_count; tracing::debug!("User commands total: {}, retrieved: {}", user_commands_total_count, transactions.len()); @@ -55,7 +55,19 @@ impl MinaMesh { tracing::debug!("Offset: {}, Limit: {}", offset, limit); let internal_commands = self.fetch_internal_commands(&query_params, offset, limit).await?; let internal_commands_total_count = internal_commands.first().and_then(|ic| ic.total_count).unwrap_or(0); - let internal_commands_bt: Vec = internal_commands.into_iter().map(|ic| ic.into()).collect(); + let internal_commands_bt: Vec = internal_commands + .into_iter() + .map(|ic| { + let timestamp = ic.timestamp.clone(); + let mut transaction: BlockTransaction = ic.into(); + if include_timestamp { + transaction.timestamp = timestamp.map(|ts| ts.parse::().unwrap_or_default()); + } else { + transaction.timestamp = None; + } + transaction + }) + .collect(); internal_commands_bt_len = internal_commands_bt.len(); transactions.extend(internal_commands_bt); total_count += internal_commands_total_count; diff --git a/src/types.rs b/src/types.rs index 7aeb9a0..3498888 100644 --- a/src/types.rs +++ b/src/types.rs @@ -282,6 +282,7 @@ pub struct InternalCommand { pub height: Option, pub total_count: Option, pub creation_fee: Option, + pub timestamp: Option, } // Used in block diff --git a/tests/snapshots/search_transactions__search_transactions_failed.snap b/tests/snapshots/search_transactions__search_transactions_failed.snap index 7861889..0c0929f 100644 --- a/tests/snapshots/search_transactions__search_transactions_failed.snap +++ b/tests/snapshots/search_transactions__search_transactions_failed.snap @@ -128,6 +128,7 @@ Ok( }, ), }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -252,6 +253,7 @@ Ok( }, ), }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -376,6 +378,7 @@ Ok( }, ), }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -500,6 +503,7 @@ Ok( }, ), }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -624,6 +628,7 @@ Ok( }, ), }, + timestamp: None, }, ], total_count: 317, diff --git a/tests/snapshots/search_transactions__search_transactions_failed.snap.new b/tests/snapshots/search_transactions__search_transactions_failed.snap.new deleted file mode 100644 index 56424b8..0000000 --- a/tests/snapshots/search_transactions__search_transactions_failed.snap.new +++ /dev/null @@ -1,640 +0,0 @@ ---- -source: tests/search_transactions.rs -assertion_line: 56 -expression: response ---- -Ok( - SearchTransactionsResponse { - transactions: [ - BlockTransaction { - block_identifier: BlockIdentifier { - index: 6, - hash: "3NK5miztenFxHTRjJNNUFEPuZALfbEL3jrJ96SJKSsgF275kvDDm", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "CkpZCr7krbJnKzEdxdBCXr52A3mVtkgVBYtMuDqTRDf7iqrYoC1fc", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "fee_payment", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qnEdPB1V5YPEcGaETb19naLJV6sWdveCZEjSLhcVyrPcPWHkGGax", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-89989705", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: Some( - Object { - "reason": String("Amount_insufficient_to_create_account"), - }, - ), - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "payment_source_dec", - status: Some( - "Failed", - ), - account: Some( - AccountIdentifier { - address: "B62qnEdPB1V5YPEcGaETb19naLJV6sWdveCZEjSLhcVyrPcPWHkGGax", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: None, - coin_change: None, - metadata: Some( - Object { - "reason": String("Amount_insufficient_to_create_account"), - }, - ), - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: Some( - [ - OperationIdentifier { - index: 1, - network_index: None, - }, - ], - ), - type: "payment_receiver_inc", - status: Some( - "Failed", - ), - account: Some( - AccountIdentifier { - address: "B62qovA62w9f2xW9XGv1X6t7Bn6SmqyQf618xC3LM9TsQeL7KLSfxPV", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: None, - coin_change: None, - metadata: Some( - Object { - "reason": String("Amount_insufficient_to_create_account"), - }, - ), - }, - ], - related_transactions: None, - metadata: Some( - Object { - "memo": String("BeepBoop"), - "nonce": Number(0), - }, - ), - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 6, - hash: "3NK5miztenFxHTRjJNNUFEPuZALfbEL3jrJ96SJKSsgF275kvDDm", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "CkpZsnkrLDa3NaktTxoK5unrHoFdoS1Z8GEav7nW69io5SuGpTXYk", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "fee_payment", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qnEdPB1V5YPEcGaETb19naLJV6sWdveCZEjSLhcVyrPcPWHkGGax", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-87832963", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: Some( - Object { - "reason": String("Amount_insufficient_to_create_account"), - }, - ), - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "payment_source_dec", - status: Some( - "Failed", - ), - account: Some( - AccountIdentifier { - address: "B62qnEdPB1V5YPEcGaETb19naLJV6sWdveCZEjSLhcVyrPcPWHkGGax", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: None, - coin_change: None, - metadata: Some( - Object { - "reason": String("Amount_insufficient_to_create_account"), - }, - ), - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: Some( - [ - OperationIdentifier { - index: 1, - network_index: None, - }, - ], - ), - type: "payment_receiver_inc", - status: Some( - "Failed", - ), - account: Some( - AccountIdentifier { - address: "B62qovA62w9f2xW9XGv1X6t7Bn6SmqyQf618xC3LM9TsQeL7KLSfxPV", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: None, - coin_change: None, - metadata: Some( - Object { - "reason": String("Amount_insufficient_to_create_account"), - }, - ), - }, - ], - related_transactions: None, - metadata: Some( - Object { - "memo": String("BeepBoop"), - "nonce": Number(1), - }, - ), - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 6, - hash: "3NK5miztenFxHTRjJNNUFEPuZALfbEL3jrJ96SJKSsgF275kvDDm", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "CkpZ9pXfjDHQd5b59M2BS37TCoUmZNyLiHZrnjdknvTXKavw2ySuH", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "fee_payment", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qnEdPB1V5YPEcGaETb19naLJV6sWdveCZEjSLhcVyrPcPWHkGGax", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-93992190", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: Some( - Object { - "reason": String("Amount_insufficient_to_create_account"), - }, - ), - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "payment_source_dec", - status: Some( - "Failed", - ), - account: Some( - AccountIdentifier { - address: "B62qnEdPB1V5YPEcGaETb19naLJV6sWdveCZEjSLhcVyrPcPWHkGGax", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: None, - coin_change: None, - metadata: Some( - Object { - "reason": String("Amount_insufficient_to_create_account"), - }, - ), - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: Some( - [ - OperationIdentifier { - index: 1, - network_index: None, - }, - ], - ), - type: "payment_receiver_inc", - status: Some( - "Failed", - ), - account: Some( - AccountIdentifier { - address: "B62qovA62w9f2xW9XGv1X6t7Bn6SmqyQf618xC3LM9TsQeL7KLSfxPV", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: None, - coin_change: None, - metadata: Some( - Object { - "reason": String("Amount_insufficient_to_create_account"), - }, - ), - }, - ], - related_transactions: None, - metadata: Some( - Object { - "memo": String("BeepBoop"), - "nonce": Number(2), - }, - ), - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 6, - hash: "3NK5miztenFxHTRjJNNUFEPuZALfbEL3jrJ96SJKSsgF275kvDDm", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "CkpaLd6Frx8rBhPjDiZuH5dJrjMqTDxgCijaz9dPLssxEWJN3rXmX", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "fee_payment", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qp3B9VW1ir5qL1MWRwr6ecjC2NZbGr8vysGeme9vXGcFXTMNXb2t", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-69271587", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: Some( - Object { - "reason": String("Amount_insufficient_to_create_account"), - }, - ), - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "payment_source_dec", - status: Some( - "Failed", - ), - account: Some( - AccountIdentifier { - address: "B62qp3B9VW1ir5qL1MWRwr6ecjC2NZbGr8vysGeme9vXGcFXTMNXb2t", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: None, - coin_change: None, - metadata: Some( - Object { - "reason": String("Amount_insufficient_to_create_account"), - }, - ), - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: Some( - [ - OperationIdentifier { - index: 1, - network_index: None, - }, - ], - ), - type: "payment_receiver_inc", - status: Some( - "Failed", - ), - account: Some( - AccountIdentifier { - address: "B62qke56mUTT8ihsfL8vEFwbDmqBpWrX1CpBFHm27otQJdvW7GKaEpV", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: None, - coin_change: None, - metadata: Some( - Object { - "reason": String("Amount_insufficient_to_create_account"), - }, - ), - }, - ], - related_transactions: None, - metadata: Some( - Object { - "memo": String("BeepBoop"), - "nonce": Number(0), - }, - ), - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 6, - hash: "3NK5miztenFxHTRjJNNUFEPuZALfbEL3jrJ96SJKSsgF275kvDDm", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "CkpYrNnffheFrq8wZ6LhW9HY6V7LhsMZLBELJ5mSk4QZmYtxC4Msn", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "fee_payment", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qp3B9VW1ir5qL1MWRwr6ecjC2NZbGr8vysGeme9vXGcFXTMNXb2t", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-86841096", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: Some( - Object { - "reason": String("Amount_insufficient_to_create_account"), - }, - ), - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "payment_source_dec", - status: Some( - "Failed", - ), - account: Some( - AccountIdentifier { - address: "B62qp3B9VW1ir5qL1MWRwr6ecjC2NZbGr8vysGeme9vXGcFXTMNXb2t", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: None, - coin_change: None, - metadata: Some( - Object { - "reason": String("Amount_insufficient_to_create_account"), - }, - ), - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: Some( - [ - OperationIdentifier { - index: 1, - network_index: None, - }, - ], - ), - type: "payment_receiver_inc", - status: Some( - "Failed", - ), - account: Some( - AccountIdentifier { - address: "B62qke56mUTT8ihsfL8vEFwbDmqBpWrX1CpBFHm27otQJdvW7GKaEpV", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: None, - coin_change: None, - metadata: Some( - Object { - "reason": String("Amount_insufficient_to_create_account"), - }, - ), - }, - ], - related_transactions: None, - metadata: Some( - Object { - "memo": String("BeepBoop"), - "nonce": Number(1), - }, - ), - }, - timestamp: None, - }, - ], - total_count: 317, - next_offset: Some( - 5, - ), - }, -) diff --git a/tests/snapshots/search_transactions__search_transactions_internal_command.snap b/tests/snapshots/search_transactions__search_transactions_internal_command.snap index 8f2844b..74ea250 100644 --- a/tests/snapshots/search_transactions__search_transactions_internal_command.snap +++ b/tests/snapshots/search_transactions__search_transactions_internal_command.snap @@ -54,6 +54,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, ], total_count: 1, diff --git a/tests/snapshots/search_transactions__search_transactions_internal_command.snap.new b/tests/snapshots/search_transactions__search_transactions_internal_command.snap.new deleted file mode 100644 index 011a74a..0000000 --- a/tests/snapshots/search_transactions__search_transactions_internal_command.snap.new +++ /dev/null @@ -1,64 +0,0 @@ ---- -source: tests/search_transactions.rs -assertion_line: 78 -expression: response ---- -Ok( - SearchTransactionsResponse { - transactions: [ - BlockTransaction { - block_identifier: BlockIdentifier { - index: 2, - hash: "3NLszFtKjd6gDcCwcbwqTQLJoB1jfU9QL1DW2Y8A9g4FRH9ySWLp", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "coinbase:0:0:CkpYcKc2oGs8JUd4tmdGBsZXQCQVkayuyffEjrNWctX5Wuad3vVNe", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "coinbase_inc", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmM4HnDHDwVXqBdCcXQJ9U2zAPNkhqmo8SNWAxKWoEok7GzQEkTv", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "1440000000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - ], - total_count: 1, - next_offset: None, - }, -) diff --git a/tests/snapshots/search_transactions__search_transactions_offset_limit.snap b/tests/snapshots/search_transactions__search_transactions_offset_limit.snap index b1a141a..408c698 100644 --- a/tests/snapshots/search_transactions__search_transactions_offset_limit.snap +++ b/tests/snapshots/search_transactions__search_transactions_offset_limit.snap @@ -307,6 +307,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -645,6 +646,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -948,6 +950,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -1251,6 +1254,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -1554,6 +1558,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -1857,6 +1862,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -2160,6 +2166,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -2463,6 +2470,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -2766,6 +2774,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -3069,6 +3078,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -3372,6 +3382,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -3675,6 +3686,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -3978,6 +3990,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -4281,6 +4294,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -4584,6 +4598,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, ], total_count: 26, diff --git a/tests/snapshots/search_transactions__search_transactions_offset_limit.snap.new b/tests/snapshots/search_transactions__search_transactions_offset_limit.snap.new deleted file mode 100644 index e0a83bf..0000000 --- a/tests/snapshots/search_transactions__search_transactions_offset_limit.snap.new +++ /dev/null @@ -1,4610 +0,0 @@ ---- -source: tests/search_transactions.rs -assertion_line: 204 -expression: response ---- -Ok( - SearchTransactionsResponse { - transactions: [ - BlockTransaction { - block_identifier: BlockIdentifier { - index: 358031, - hash: "3NLV621iURxrb94hkgAEDvdpXAwVYimbV8Y4LASvoEY37wuLNrkv", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5JuxqkYS4KarMCyCdi4nESzCTeFTZJfdjvU6HmX2M4Z7ycQ6MMwo", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-200000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 3, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 4, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 5, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 6, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 7, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkrmYG3iGanZWAT3xf6rEsFXcQfyNcFcwRNyCPPm6F3wYLcf4Dav", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 358178, - hash: "3NLtqnuNYATuWR2SDucdaZupVvn1e2ZsEpXgdhSuHQPg5Eergjwf", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5JusbiUA33pBrujSYdGvQmzjzgFeM4Ankeeegfh959q3GoKtbGnY", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-200000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 3, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 4, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 5, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 6, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-1000000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 7, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "9405000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 8, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qoP53ToLGhovZLCo23qEyTCfN4nb2HbF2JSCgasSd7UejR8zxFZB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "9405000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 359772, - hash: "3NKAeoFtwLhV8CQPLgZfLwFSTLUYhPSvmsEXDotWz91goTTXA7Jr", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5JtxVrf8A1SNuHy2ZQL7KmsCeTeKZJULJcXKwCoQqSvnr2dY9r3a", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-200000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 3, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 4, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 5, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 6, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "9405000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 7, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qoP53ToLGhovZLCo23qEyTCfN4nb2HbF2JSCgasSd7UejR8zxFZB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "9405000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 359975, - hash: "3NLH7NN6QjhQXUGZr8VAjBcn7Hj8nxWox67W22R1KEcSqLhBSGF4", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5JuCaRrXYJw51iT7xV4Xb8DDLSznMkX7F1MTPq6KrAmbt15oWEdq", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-200000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 3, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 4, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 5, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 6, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qoP53ToLGhovZLCo23qEyTCfN4nb2HbF2JSCgasSd7UejR8zxFZB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "9405000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 7, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "9405000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 360055, - hash: "3NKpsSjSdNnWqyobrz2cw9yTxrYz4sTr7Lh6Y6FKZjLojs9bsaLW", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5JuFvfASDPX8yixvJAzRxF8At8wTCYhdhwxn3A5oxch5yL8usqzi", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-200000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 3, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 4, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 5, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 6, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qoP53ToLGhovZLCo23qEyTCfN4nb2HbF2JSCgasSd7UejR8zxFZB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "9405000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 7, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "9405000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 360070, - hash: "3NLV3NoxL547ymZVPa9em9iUxfkTDya5mirjGoMsX69jCP1A5s5M", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5JtkFjqmAsAV8NVTN9HjD9WuN9DkUVzwBnBTSJWuG8MWEHr8xaxg", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-200000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 3, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 4, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 5, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 6, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "2755000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 7, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkrmYG3iGanZWAT3xf6rEsFXcQfyNcFcwRNyCPPm6F3wYLcf4Dav", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "2755000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 360075, - hash: "3NKnQDuYTs2gfL6MnyPej6GbdkaYMM7W8FK1ib5cDJMVkKe8epoh", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5JuJsmfYrz2bwkAi7WrP2Bbant5WXnoijW2dQHfZk3X26CmAFbnJ", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-200000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 3, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 4, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 5, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkrmYG3iGanZWAT3xf6rEsFXcQfyNcFcwRNyCPPm6F3wYLcf4Dav", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 6, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 7, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 360104, - hash: "3NKRqjzx7UFTpRN6FKHpYg94KDDkmnnBA6a8RfDAmCkNDFTckoeC", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5JtykW8N4Y7WFqBTALZQ1pVd8R4NFpAkmveN7b3N4iJcNKAqVqLt", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-200000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 3, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 4, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 5, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 6, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkrmYG3iGanZWAT3xf6rEsFXcQfyNcFcwRNyCPPm6F3wYLcf4Dav", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "2849050", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 7, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "2849050", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 360388, - hash: "3NLYL1BGsxasqfgBDVFjAkwRkN7QZF5LErJxSAGtTdro6pnhTGJ9", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5Juudbjr2ePB7fNCRSZyx1BSiiHmxt5ngBURb2hSqyLbnCtNdeaR", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-200000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 3, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 4, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 5, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 6, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkrmYG3iGanZWAT3xf6rEsFXcQfyNcFcwRNyCPPm6F3wYLcf4Dav", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "2755000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 7, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "2755000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 360391, - hash: "3NKEsr4yH44CoV1gk9bskE9FH4tUPt7Kuw8FuG8zahYBgsBwJzC4", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5Jtg85F2wxmqeSYadGd1cGRKeSLba2SyuLBFH8sRZmd2sYqTnpEj", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-200000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 3, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 4, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 5, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 6, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkrmYG3iGanZWAT3xf6rEsFXcQfyNcFcwRNyCPPm6F3wYLcf4Dav", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "2755000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 7, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "2755000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 360403, - hash: "3NLNFQH2ZRfcZ7CJuxpxrT2RedgtF4LkDEEPEu27kBpDUzq8ABu5", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5Ju3rHHmVGRSnmGrmNVxnw8pL58n46y96ViX2Trjr4eJ7udbdKMy", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-200000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 3, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 4, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 5, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 6, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "519175000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 7, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkrmYG3iGanZWAT3xf6rEsFXcQfyNcFcwRNyCPPm6F3wYLcf4Dav", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "519175000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 360426, - hash: "3NKCP8HpfWGgMbELzv5wDg8TrsxE1GBioZFDm5av1a4YhJf8pMTm", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5JudiBsVoSoa12DqqTVmFRqd9X4m7SER7RFLJabL9Ebms63PsMjc", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-200000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 3, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 4, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 5, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 6, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkrmYG3iGanZWAT3xf6rEsFXcQfyNcFcwRNyCPPm6F3wYLcf4Dav", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "4655000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 7, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "4655000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 362591, - hash: "3NLpQrLdN3tM8Dfq524GihvJjeAmV4aDmutacAxwUZ9eCtD3xuHS", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5Jts9E1CxBzfb5kfXE3i4MWhkXKrntUHgZAN1b1SXGEk7tiknEJb", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-200000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 3, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 4, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 5, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 6, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "1899050", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 7, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkrmYG3iGanZWAT3xf6rEsFXcQfyNcFcwRNyCPPm6F3wYLcf4Dav", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "1899050", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 362694, - hash: "3NKqfeYgbU97LCajktUb5LdAf5KnHtTQo3gxJ4ezUVj8BE6Atx2k", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5JuSiSC15HK2QnMD2jQqsqyWs4ZtxbGcnCeMLG7Y1CtMdxM9nUbG", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-200000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 3, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 4, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 5, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 6, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "9499050", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 7, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qoP53ToLGhovZLCo23qEyTCfN4nb2HbF2JSCgasSd7UejR8zxFZB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "9499050", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 364249, - hash: "3NLLRb2L9MyAz9DYkzrLpV3SKMdnjsjjY7pRKDtpiv4cEfprQsau", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5Ju8MfT129GGqRtbUGtDSkjahSmdgL8NU5VC69kjJNQ5e4r4SBnD", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-200000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qrHd4Wg8z6N6tCC9pVtRtxEuBXLWPH61gbcgotURdiU1rSURMdFB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 3, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 4, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmvhHuyiZjKeHnKs7P2KaXHAi2H2j7ZcV5YKyf6SbcPa2CSiA3Th", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 5, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmhCKWHDEK6Pr5AMH55J8xe8HSh9ekMDYiT6hNP8PjkoCCDHYDSB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 6, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkop41jFsYh3MVRwacLvFoGCbPkBMCdPncaDfdx1tfGxmgZSrm6u", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "9499050", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 7, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qoP53ToLGhovZLCo23qEyTCfN4nb2HbF2JSCgasSd7UejR8zxFZB", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "9499050", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("wqt8AFhKhv3Z1wkRoWFgJ66Sx4Yep1EEeaSSQDYwRyhoTDxSin"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - ], - total_count: 26, - next_offset: Some( - 20, - ), - }, -) diff --git a/tests/snapshots/search_transactions__search_transactions_specified.snap b/tests/snapshots/search_transactions__search_transactions_specified.snap index 0853263..439a492 100644 --- a/tests/snapshots/search_transactions__search_transactions_specified.snap +++ b/tests/snapshots/search_transactions__search_transactions_specified.snap @@ -1,6 +1,6 @@ --- source: tests/search_transactions.rs -expression: response +expression: response_addr --- Ok( SearchTransactionsResponse { @@ -170,6 +170,7 @@ Ok( }, ), }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -301,6 +302,7 @@ Ok( }, ), }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -432,6 +434,7 @@ Ok( }, ), }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -515,6 +518,7 @@ Ok( }, ), }, + timestamp: None, }, BlockTransaction { block_identifier: BlockIdentifier { @@ -598,6 +602,7 @@ Ok( }, ), }, + timestamp: None, }, ], total_count: 5, diff --git a/tests/snapshots/search_transactions__search_transactions_specified.snap.new b/tests/snapshots/search_transactions__search_transactions_specified.snap.new deleted file mode 100644 index 5c4950e..0000000 --- a/tests/snapshots/search_transactions__search_transactions_specified.snap.new +++ /dev/null @@ -1,612 +0,0 @@ ---- -source: tests/search_transactions.rs -assertion_line: 37 -expression: response_addr ---- -Ok( - SearchTransactionsResponse { - transactions: [ - BlockTransaction { - block_identifier: BlockIdentifier { - index: 16674, - hash: "3NLYrK5fabWDRVRoxk4e3kF62gUDGcPdfL1mqnbqxYJyVouX4qBX", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "CkpZUFsTxw7THWoXoSPHiJp3mi92TxL8oBgpdHhJczmNjd7D87jUD", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "fee_payment", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmQsEHcsPUs5xdtHKjEmWqqhUPRSF2GNmdguqnNvpEZpKftPC69e", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-250000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "account_creation_fee_via_payment", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-1000000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "payment_source_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmQsEHcsPUs5xdtHKjEmWqqhUPRSF2GNmdguqnNvpEZpKftPC69e", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-2000000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 3, - network_index: None, - }, - related_operations: Some( - [ - OperationIdentifier { - index: 2, - network_index: None, - }, - ], - ), - type: "payment_receiver_inc", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "2000000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: Some( - Object { - "nonce": Number(61), - }, - ), - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 16675, - hash: "3NKbtfTG6RwxgE4baCCYQNcHsnhQ1pzLvKHGwEdT28UoAeUx1ZZ3", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "CkpZHzUPh2j4fpawaza6kVRtj4dcUNqBZUS4yGgB9qAoHjf7NJcEn", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "fee_payment", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-250000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "payment_source_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-100000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: Some( - [ - OperationIdentifier { - index: 1, - network_index: None, - }, - ], - ), - type: "payment_receiver_inc", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmQsEHcsPUs5xdtHKjEmWqqhUPRSF2GNmdguqnNvpEZpKftPC69e", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "100000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: Some( - Object { - "nonce": Number(0), - }, - ), - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 16677, - hash: "3NLf87FpL1tzVEF2TqAe6Wrt5brR1rrQKKKNdCW3XbEJE5Joz2ZR", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "CkpZMrLr36G2Bnq5hLo4tcwuo3L4hda5ScyQRHfa5o4fKCCaHNWcn", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "fee_payment", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmQsEHcsPUs5xdtHKjEmWqqhUPRSF2GNmdguqnNvpEZpKftPC69e", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-250000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "payment_source_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qmQsEHcsPUs5xdtHKjEmWqqhUPRSF2GNmdguqnNvpEZpKftPC69e", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-50000000000000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: Some( - [ - OperationIdentifier { - index: 1, - network_index: None, - }, - ], - ), - type: "payment_receiver_inc", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "50000000000000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: Some( - Object { - "nonce": Number(62), - }, - ), - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 16679, - hash: "3NKyk5Xw1aMhkXa81tkn8EJS28SbMkNt7g81XiddERE9WXoQUV7V", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "CkpaAwUS7j64iTVz6oxU6VfGVWjbSPrizo5DuS1DAWZNfSN5fQxsi", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "fee_payment", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-250000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "delegate_change", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: None, - coin_change: None, - metadata: Some( - Object { - "delegate_change_target": String("B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww"), - }, - ), - }, - ], - related_transactions: None, - metadata: Some( - Object { - "nonce": Number(1), - }, - ), - }, - timestamp: None, - }, - BlockTransaction { - block_identifier: BlockIdentifier { - index: 140303, - hash: "3NLbvXACjTAMXZkXV4pJomU9SU1xev9EWfh9PKjzCQdJcpZsMFH3", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "CkpYtpCsRgvtFs2P8zFtwxSUftgKYMqR6QCJH2Fxx4YZ6kHTZiYaf", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "fee_payment", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qifTiRqudGJUgHuCr8EC9a48bBNSBEisGPQMRwLcUkSXVaaNwRLx", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-200100000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "delegate_change", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qifTiRqudGJUgHuCr8EC9a48bBNSBEisGPQMRwLcUkSXVaaNwRLx", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: None, - coin_change: None, - metadata: Some( - Object { - "delegate_change_target": String("B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP"), - }, - ), - }, - ], - related_transactions: None, - metadata: Some( - Object { - "nonce": Number(2), - }, - ), - }, - timestamp: None, - }, - ], - total_count: 5, - next_offset: None, - }, -) diff --git a/tests/snapshots/search_transactions__search_transactions_zkapp_failed.snap b/tests/snapshots/search_transactions__search_transactions_zkapp_failed.snap index a35e65d..785ede0 100644 --- a/tests/snapshots/search_transactions__search_transactions_zkapp_failed.snap +++ b/tests/snapshots/search_transactions__search_transactions_zkapp_failed.snap @@ -124,6 +124,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, ], total_count: 1, diff --git a/tests/snapshots/search_transactions__search_transactions_zkapp_failed.snap.new b/tests/snapshots/search_transactions__search_transactions_zkapp_failed.snap.new deleted file mode 100644 index 66cc298..0000000 --- a/tests/snapshots/search_transactions__search_transactions_zkapp_failed.snap.new +++ /dev/null @@ -1,134 +0,0 @@ ---- -source: tests/search_transactions.rs -assertion_line: 120 -expression: response ---- -Ok( - SearchTransactionsResponse { - transactions: [ - BlockTransaction { - block_identifier: BlockIdentifier { - index: 356949, - hash: "3NLViPD1oW4XgMsSXsorkhphgREkBfNgAfu2EGFTKSH5EUV9YDNe", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5JujBt8rnKheA7CHBnTwUDXrHtQxqPB9LL5Q8y4KwLjPBsBSJuSE", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qjGsPY47SMkTykivPBAU3riS9gvMMrGr7ve6ynoHJNBzAhQmtoBn", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-100000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Failed", - ), - account: Some( - AccountIdentifier { - address: "B62qide3tEVFgzLFo72rhrF4p8Luv6R5NAmvwo83SnZGnwV9Q6fiVTK", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Failed", - ), - account: Some( - AccountIdentifier { - address: "B62qjGsPY47SMkTykivPBAU3riS9gvMMrGr7ve6ynoHJNBzAhQmtoBn", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - ], - total_count: 1, - next_offset: None, - }, -) diff --git a/tests/snapshots/search_transactions__search_transactions_zkapp_success.snap b/tests/snapshots/search_transactions__search_transactions_zkapp_success.snap index fdbc122..d96ab85 100644 --- a/tests/snapshots/search_transactions__search_transactions_zkapp_success.snap +++ b/tests/snapshots/search_transactions__search_transactions_zkapp_success.snap @@ -124,6 +124,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, ], total_count: 1, diff --git a/tests/snapshots/search_transactions__search_transactions_zkapp_success.snap.new b/tests/snapshots/search_transactions__search_transactions_zkapp_success.snap.new deleted file mode 100644 index c0d9c59..0000000 --- a/tests/snapshots/search_transactions__search_transactions_zkapp_success.snap.new +++ /dev/null @@ -1,134 +0,0 @@ ---- -source: tests/search_transactions.rs -assertion_line: 99 -expression: response ---- -Ok( - SearchTransactionsResponse { - transactions: [ - BlockTransaction { - block_identifier: BlockIdentifier { - index: 337818, - hash: "3NKdrqcGAwSgfK6T8az4cauXExHs7D9eKC6Ywotm8qEeudPLxepG", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5JvFoEyvuPu9zmi4bDGbhqsakre2SPQU1KKbeh2Lk5uC9eYrc2h2", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qjGsPY47SMkTykivPBAU3riS9gvMMrGr7ve6ynoHJNBzAhQmtoBn", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-10000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qqieAv9AQCsLHfinPESXB9exSJBpTVLpgkjqWT9cSGBc67pBkNxs", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qjGsPY47SMkTykivPBAU3riS9gvMMrGr7ve6ynoHJNBzAhQmtoBn", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - ], - total_count: 1, - next_offset: None, - }, -) diff --git a/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_account_identifier.snap b/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_account_identifier.snap index d548837..813b778 100644 --- a/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_account_identifier.snap +++ b/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_account_identifier.snap @@ -93,6 +93,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, ], total_count: 1, diff --git a/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_account_identifier.snap.new b/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_account_identifier.snap.new deleted file mode 100644 index 5d76901..0000000 --- a/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_account_identifier.snap.new +++ /dev/null @@ -1,103 +0,0 @@ ---- -source: tests/search_transactions.rs -assertion_line: 163 -expression: response_address1_token ---- -Ok( - SearchTransactionsResponse { - transactions: [ - BlockTransaction { - block_identifier: BlockIdentifier { - index: 319856, - hash: "3NKjAbntQZNxPwbHkRbDAjPrMRoR58MAFepDsPtyQ3vSbhAWEeuu", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5JuotEHhjuYbu2oucyTiVhJX3Abx5DPL4NXnM7CP9hfJZLE5G8n9", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qituGxc1ZNbWfz4SnftNUaJ78YYYsmuuuJr1FFHjbRqLir7tvBew", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-100000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qjwDWxjf4LtJ4YWJQDdTNPqZ69ZyeCzbpAFKN7EoZzYig5ZRz8JE", - sub_account: None, - metadata: Some( - Object { - "token_id": String("xBxjFpJkbWpbGua7Lf36S1NLhffFoEChyP3pz6SYKnx7dFCTwg"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "10000000000000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("xBxjFpJkbWpbGua7Lf36S1NLhffFoEChyP3pz6SYKnx7dFCTwg"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - ], - total_count: 1, - next_offset: None, - }, -) diff --git a/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_tx_hash.snap b/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_tx_hash.snap index 2e59d79..0a3b063 100644 --- a/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_tx_hash.snap +++ b/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_tx_hash.snap @@ -163,6 +163,7 @@ Ok( related_transactions: None, metadata: None, }, + timestamp: None, }, ], total_count: 1, diff --git a/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_tx_hash.snap.new b/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_tx_hash.snap.new deleted file mode 100644 index 1197c89..0000000 --- a/tests/snapshots/search_transactions__search_transactions_zkapp_tokens_tx_hash.snap.new +++ /dev/null @@ -1,173 +0,0 @@ ---- -source: tests/search_transactions.rs -assertion_line: 183 -expression: response_tx_hash ---- -Ok( - SearchTransactionsResponse { - transactions: [ - BlockTransaction { - block_identifier: BlockIdentifier { - index: 319856, - hash: "3NKjAbntQZNxPwbHkRbDAjPrMRoR58MAFepDsPtyQ3vSbhAWEeuu", - }, - transaction: Transaction { - transaction_identifier: TransactionIdentifier { - hash: "5JuotEHhjuYbu2oucyTiVhJX3Abx5DPL4NXnM7CP9hfJZLE5G8n9", - }, - operations: [ - Operation { - operation_identifier: OperationIdentifier { - index: 0, - network_index: None, - }, - related_operations: None, - type: "zkapp_fee_payer_dec", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qituGxc1ZNbWfz4SnftNUaJ78YYYsmuuuJr1FFHjbRqLir7tvBew", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-100000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 1, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qjwDWxjf4LtJ4YWJQDdTNPqZ69ZyeCzbpAFKN7EoZzYig5ZRz8JE", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "0", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 2, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qituGxc1ZNbWfz4SnftNUaJ78YYYsmuuuJr1FFHjbRqLir7tvBew", - sub_account: None, - metadata: Some( - Object { - "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "-1000000000", - currency: Currency { - symbol: "MINA", - decimals: 9, - metadata: None, - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - Operation { - operation_identifier: OperationIdentifier { - index: 3, - network_index: None, - }, - related_operations: None, - type: "zkapp_balance_update", - status: Some( - "Success", - ), - account: Some( - AccountIdentifier { - address: "B62qjwDWxjf4LtJ4YWJQDdTNPqZ69ZyeCzbpAFKN7EoZzYig5ZRz8JE", - sub_account: None, - metadata: Some( - Object { - "token_id": String("xBxjFpJkbWpbGua7Lf36S1NLhffFoEChyP3pz6SYKnx7dFCTwg"), - }, - ), - }, - ), - amount: Some( - Amount { - value: "10000000000000", - currency: Currency { - symbol: "MINA+", - decimals: 9, - metadata: Some( - Object { - "token_id": String("xBxjFpJkbWpbGua7Lf36S1NLhffFoEChyP3pz6SYKnx7dFCTwg"), - }, - ), - }, - metadata: None, - }, - ), - coin_change: None, - metadata: None, - }, - ], - related_transactions: None, - metadata: None, - }, - timestamp: None, - }, - ], - total_count: 1, - next_offset: None, - }, -) From ed37f64c79013c43aff68e244300ce9ca8dd52a7 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Wed, 8 Jan 2025 11:54:47 +0100 Subject: [PATCH 04/10] zkapp commands --- sql/queries/indexer_zkapp_commands.sql | 1 + .../indexer_zkapp_commands_optimized.sql | 1 + sql/queries/zkapp_commands.sql | 1 + src/api/search_transactions.rs | 18 ++++++++++++++---- src/transaction_operations.rs | 8 ++++---- src/types.rs | 1 + 6 files changed, 22 insertions(+), 8 deletions(-) diff --git a/sql/queries/indexer_zkapp_commands.sql b/sql/queries/indexer_zkapp_commands.sql index c930a83..f4c47b1 100644 --- a/sql/queries/indexer_zkapp_commands.sql +++ b/sql/queries/indexer_zkapp_commands.sql @@ -38,6 +38,7 @@ WITH bzc.block_id, b.state_hash, b.height, + b.timestamp, token_update_body.value AS token, ARRAY( SELECT diff --git a/sql/queries/indexer_zkapp_commands_optimized.sql b/sql/queries/indexer_zkapp_commands_optimized.sql index 8fb17d4..7ace9d0 100644 --- a/sql/queries/indexer_zkapp_commands_optimized.sql +++ b/sql/queries/indexer_zkapp_commands_optimized.sql @@ -38,6 +38,7 @@ WITH zca.block_id, b.state_hash, b.height, + b.timestamp, token_update_body.value AS token, ARRAY( SELECT diff --git a/sql/queries/zkapp_commands.sql b/sql/queries/zkapp_commands.sql index 4fe8458..37974cb 100644 --- a/sql/queries/zkapp_commands.sql +++ b/sql/queries/zkapp_commands.sql @@ -10,6 +10,7 @@ SELECT bzc.status AS "status: TransactionStatus", b.state_hash, b.height, + b.timestamp, bzc.block_id, cast(0 AS BIGINT) AS total_count, ARRAY( diff --git a/src/api/search_transactions.rs b/src/api/search_transactions.rs index 8118a3d..67c6a33 100644 --- a/src/api/search_transactions.rs +++ b/src/api/search_transactions.rs @@ -91,7 +91,7 @@ impl MinaMesh { tracing::debug!("Offset: {}, Limit: {}", offset, limit); let zkapp_commands = self.fetch_zkapp_commands(&query_params, offset, limit).await?; let zkapp_commands_total_count = zkapp_commands.first().and_then(|ic| ic.total_count).unwrap_or(0); - let zkapp_commands_bt = zkapp_commands_to_block_transactions(zkapp_commands); + let zkapp_commands_bt = zkapp_commands_to_block_transactions(zkapp_commands, include_timestamp); let zkapp_commands_bt_len = zkapp_commands_bt.len(); transactions.extend(zkapp_commands_bt); total_count += zkapp_commands_total_count; @@ -250,11 +250,14 @@ impl MinaMesh { } } -pub fn zkapp_commands_to_block_transactions(commands: Vec) -> Vec { +pub fn zkapp_commands_to_block_transactions( + commands: Vec, + include_timestamp: bool, +) -> Vec { let block_map = generate_operations_zkapp_command(commands); let mut result = Vec::new(); - for ((block_index, block_hash), tx_map) in block_map { + for ((block_index, block_hash, timestamp), tx_map) in block_map { let block_index = block_index.unwrap_or(0); let block_hash = block_hash.unwrap_or_default(); for (tx_hash, operations) in tx_map { @@ -266,7 +269,14 @@ pub fn zkapp_commands_to_block_transactions(commands: Vec) -> Vec< metadata: None, related_transactions: None, }), - timestamp: None, + timestamp: { + if include_timestamp { + let ts = timestamp.clone().unwrap_or_default(); + Some(ts.parse::().unwrap_or_default()) + } else { + None + } + }, }; result.push(transaction); } diff --git a/src/transaction_operations.rs b/src/transaction_operations.rs index 7428514..d707641 100644 --- a/src/transaction_operations.rs +++ b/src/transaction_operations.rs @@ -279,7 +279,7 @@ pub fn generate_operations_internal_command(da operations } -type BlockKey = (Option, Option); // Represents the block identifier +type BlockKey = (Option, Option, Option); // Represents the block identifier type TransactionOperations = BTreeMap>; // Maps transaction hashes to their operations type BlockMap = BTreeMap; // Maps block keys to transaction operations @@ -289,8 +289,8 @@ type BlockMap = BTreeMap; // Maps block keys to /// operations for each command and organizing them into /// `BlockMap = BTreeMap` a nested `BTreeMap` /// structure: -/// - `BlockKey`: `(Option, Option)` representing block height and -/// state hash. +/// - `BlockKey`: `(Option, Option ,Option)` representing +/// block height, state hash and timestamp. state hash. /// - `TransactionOperations = BTreeMap>` mapping /// - Inner key: `String` representing the transaction hash. /// - Value: `Vec` containing operations for each transaction. @@ -313,7 +313,7 @@ pub fn generate_operations_zkapp_command(commands: Vec) -> BlockMa let mut block_map: BlockMap = BTreeMap::new(); for command in commands { - let block_key = (command.height, command.state_hash.clone()); + let block_key = (command.height, command.state_hash.clone(), command.timestamp.clone()); let tx_hash = command.hash.clone(); let operations = block_map.entry(block_key).or_default().entry(tx_hash.clone()).or_default(); diff --git a/src/types.rs b/src/types.rs index 3498888..0ce7012 100644 --- a/src/types.rs +++ b/src/types.rs @@ -108,6 +108,7 @@ pub struct ZkAppCommand { pub height: Option, pub total_count: Option, pub block_id: Option, + pub timestamp: Option, } // Used in search transactions From 42545cc0fb0e8649d38447dd024ccbd6ecb87cb0 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Wed, 8 Jan 2025 12:26:24 +0100 Subject: [PATCH 05/10] testing --- tests/search_transactions.rs | 67 ++ ...rch_transactions_ic_include_timestamp.snap | 65 ++ ...rch_transactions_uc_include_timestamp.snap | 621 ++++++++++++++++++ ...rch_transactions_zk_include_timestamp.snap | 135 ++++ 4 files changed, 888 insertions(+) create mode 100644 tests/snapshots/search_transactions__search_transactions_ic_include_timestamp.snap create mode 100644 tests/snapshots/search_transactions__search_transactions_uc_include_timestamp.snap create mode 100644 tests/snapshots/search_transactions__search_transactions_zk_include_timestamp.snap diff --git a/tests/search_transactions.rs b/tests/search_transactions.rs index 2640a9b..9715f85 100644 --- a/tests/search_transactions.rs +++ b/tests/search_transactions.rs @@ -204,3 +204,70 @@ async fn search_transactions_offset_limit() -> Result<()> { assert_debug_snapshot!(response); Ok(()) } + +#[tokio::test] +async fn search_transactions_uc_include_timestamp() -> Result<()> { + let mina_mesh = MinaMeshConfig::from_env().to_mina_mesh().await?; + + let request = SearchTransactionsRequest { + network_identifier: Box::new(network_id()), + include_timestamp: Some(true), + address: Some( + // cspell:disable-next-line + "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP".to_string(), + ), + limit: Some(5), + ..Default::default() + }; + + let response = mina_mesh.search_transactions(request).await; + + assert!(response.is_ok()); + assert_debug_snapshot!(response); + Ok(()) +} + +#[tokio::test] +async fn search_transactions_ic_include_timestamp() -> Result<()> { + let mina_mesh = MinaMeshConfig::from_env().to_mina_mesh().await?; + + let request = SearchTransactionsRequest { + network_identifier: Box::new(network_id()), + max_block: Some(44), + include_timestamp: Some(true), + transaction_identifier: Some(Box::new(TransactionIdentifier::new( + // cspell:disable-next-line + "CkpYcKc2oGs8JUd4tmdGBsZXQCQVkayuyffEjrNWctX5Wuad3vVNe".to_string(), + ))), + limit: Some(5), + ..Default::default() + }; + + let response = mina_mesh.search_transactions(request).await; + + assert!(response.is_ok()); + assert_debug_snapshot!(response); + Ok(()) +} + +#[tokio::test] +async fn search_transactions_zk_include_timestamp() -> Result<()> { + let mina_mesh = MinaMeshConfig::from_env().to_mina_mesh().await?; + + let request = SearchTransactionsRequest { + network_identifier: Box::new(network_id()), + transaction_identifier: Some(Box::new(TransactionIdentifier::new( + // cspell:disable-next-line + "5JvFoEyvuPu9zmi4bDGbhqsakre2SPQU1KKbeh2Lk5uC9eYrc2h2".to_string(), + ))), + limit: Some(1), + include_timestamp: Some(true), + ..Default::default() + }; + + let response = mina_mesh.search_transactions(request).await; + + assert!(response.is_ok()); + assert_debug_snapshot!(response); + Ok(()) +} diff --git a/tests/snapshots/search_transactions__search_transactions_ic_include_timestamp.snap b/tests/snapshots/search_transactions__search_transactions_ic_include_timestamp.snap new file mode 100644 index 0000000..3d662cc --- /dev/null +++ b/tests/snapshots/search_transactions__search_transactions_ic_include_timestamp.snap @@ -0,0 +1,65 @@ +--- +source: tests/search_transactions.rs +expression: response +--- +Ok( + SearchTransactionsResponse { + transactions: [ + BlockTransaction { + block_identifier: BlockIdentifier { + index: 2, + hash: "3NLszFtKjd6gDcCwcbwqTQLJoB1jfU9QL1DW2Y8A9g4FRH9ySWLp", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "coinbase:0:0:CkpYcKc2oGs8JUd4tmdGBsZXQCQVkayuyffEjrNWctX5Wuad3vVNe", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "coinbase_inc", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmM4HnDHDwVXqBdCcXQJ9U2zAPNkhqmo8SNWAxKWoEok7GzQEkTv", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "1440000000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: Some( + 1632442320000, + ), + }, + ], + total_count: 1, + next_offset: None, + }, +) diff --git a/tests/snapshots/search_transactions__search_transactions_uc_include_timestamp.snap b/tests/snapshots/search_transactions__search_transactions_uc_include_timestamp.snap new file mode 100644 index 0000000..cfd84e9 --- /dev/null +++ b/tests/snapshots/search_transactions__search_transactions_uc_include_timestamp.snap @@ -0,0 +1,621 @@ +--- +source: tests/search_transactions.rs +expression: response +--- +Ok( + SearchTransactionsResponse { + transactions: [ + BlockTransaction { + block_identifier: BlockIdentifier { + index: 16674, + hash: "3NLYrK5fabWDRVRoxk4e3kF62gUDGcPdfL1mqnbqxYJyVouX4qBX", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "CkpZUFsTxw7THWoXoSPHiJp3mi92TxL8oBgpdHhJczmNjd7D87jUD", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "fee_payment", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmQsEHcsPUs5xdtHKjEmWqqhUPRSF2GNmdguqnNvpEZpKftPC69e", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-250000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "account_creation_fee_via_payment", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-1000000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "payment_source_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmQsEHcsPUs5xdtHKjEmWqqhUPRSF2GNmdguqnNvpEZpKftPC69e", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-2000000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 3, + network_index: None, + }, + related_operations: Some( + [ + OperationIdentifier { + index: 2, + network_index: None, + }, + ], + ), + type: "payment_receiver_inc", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "2000000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: Some( + Object { + "nonce": Number(61), + }, + ), + }, + timestamp: Some( + 1637060760000, + ), + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 16675, + hash: "3NKbtfTG6RwxgE4baCCYQNcHsnhQ1pzLvKHGwEdT28UoAeUx1ZZ3", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "CkpZHzUPh2j4fpawaza6kVRtj4dcUNqBZUS4yGgB9qAoHjf7NJcEn", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "fee_payment", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-250000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "payment_source_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-100000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: Some( + [ + OperationIdentifier { + index: 1, + network_index: None, + }, + ], + ), + type: "payment_receiver_inc", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmQsEHcsPUs5xdtHKjEmWqqhUPRSF2GNmdguqnNvpEZpKftPC69e", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "100000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: Some( + Object { + "nonce": Number(0), + }, + ), + }, + timestamp: Some( + 1637061300000, + ), + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 16677, + hash: "3NLf87FpL1tzVEF2TqAe6Wrt5brR1rrQKKKNdCW3XbEJE5Joz2ZR", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "CkpZMrLr36G2Bnq5hLo4tcwuo3L4hda5ScyQRHfa5o4fKCCaHNWcn", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "fee_payment", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmQsEHcsPUs5xdtHKjEmWqqhUPRSF2GNmdguqnNvpEZpKftPC69e", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-250000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "payment_source_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qmQsEHcsPUs5xdtHKjEmWqqhUPRSF2GNmdguqnNvpEZpKftPC69e", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-50000000000000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: Some( + [ + OperationIdentifier { + index: 1, + network_index: None, + }, + ], + ), + type: "payment_receiver_inc", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "50000000000000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: Some( + Object { + "nonce": Number(62), + }, + ), + }, + timestamp: Some( + 1637061660000, + ), + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 16679, + hash: "3NKyk5Xw1aMhkXa81tkn8EJS28SbMkNt7g81XiddERE9WXoQUV7V", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "CkpaAwUS7j64iTVz6oxU6VfGVWjbSPrizo5DuS1DAWZNfSN5fQxsi", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "fee_payment", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-250000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "delegate_change", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: None, + coin_change: None, + metadata: Some( + Object { + "delegate_change_target": String("B62qpfgnUm7zVqi8MJHNB2m37rtgMNDbFNhC2DpMmmVpQt8x6gKv9Ww"), + }, + ), + }, + ], + related_transactions: None, + metadata: Some( + Object { + "nonce": Number(1), + }, + ), + }, + timestamp: Some( + 1637062380000, + ), + }, + BlockTransaction { + block_identifier: BlockIdentifier { + index: 140303, + hash: "3NLbvXACjTAMXZkXV4pJomU9SU1xev9EWfh9PKjzCQdJcpZsMFH3", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "CkpYtpCsRgvtFs2P8zFtwxSUftgKYMqR6QCJH2Fxx4YZ6kHTZiYaf", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "fee_payment", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qifTiRqudGJUgHuCr8EC9a48bBNSBEisGPQMRwLcUkSXVaaNwRLx", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-200100000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "delegate_change", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qifTiRqudGJUgHuCr8EC9a48bBNSBEisGPQMRwLcUkSXVaaNwRLx", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: None, + coin_change: None, + metadata: Some( + Object { + "delegate_change_target": String("B62qkd6yYALkQMq2SFd5B57bJbGBMA2QuGtLPMzRhhnvexRtVRycZWP"), + }, + ), + }, + ], + related_transactions: None, + metadata: Some( + Object { + "nonce": Number(2), + }, + ), + }, + timestamp: Some( + 1670548860000, + ), + }, + ], + total_count: 5, + next_offset: None, + }, +) diff --git a/tests/snapshots/search_transactions__search_transactions_zk_include_timestamp.snap b/tests/snapshots/search_transactions__search_transactions_zk_include_timestamp.snap new file mode 100644 index 0000000..291057f --- /dev/null +++ b/tests/snapshots/search_transactions__search_transactions_zk_include_timestamp.snap @@ -0,0 +1,135 @@ +--- +source: tests/search_transactions.rs +expression: response +--- +Ok( + SearchTransactionsResponse { + transactions: [ + BlockTransaction { + block_identifier: BlockIdentifier { + index: 337818, + hash: "3NKdrqcGAwSgfK6T8az4cauXExHs7D9eKC6Ywotm8qEeudPLxepG", + }, + transaction: Transaction { + transaction_identifier: TransactionIdentifier { + hash: "5JvFoEyvuPu9zmi4bDGbhqsakre2SPQU1KKbeh2Lk5uC9eYrc2h2", + }, + operations: [ + Operation { + operation_identifier: OperationIdentifier { + index: 0, + network_index: None, + }, + related_operations: None, + type: "zkapp_fee_payer_dec", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qjGsPY47SMkTykivPBAU3riS9gvMMrGr7ve6ynoHJNBzAhQmtoBn", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "-10000000", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 1, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qqieAv9AQCsLHfinPESXB9exSJBpTVLpgkjqWT9cSGBc67pBkNxs", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + Operation { + operation_identifier: OperationIdentifier { + index: 2, + network_index: None, + }, + related_operations: None, + type: "zkapp_balance_update", + status: Some( + "Success", + ), + account: Some( + AccountIdentifier { + address: "B62qjGsPY47SMkTykivPBAU3riS9gvMMrGr7ve6ynoHJNBzAhQmtoBn", + sub_account: None, + metadata: Some( + Object { + "token_id": String("wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf"), + }, + ), + }, + ), + amount: Some( + Amount { + value: "0", + currency: Currency { + symbol: "MINA", + decimals: 9, + metadata: None, + }, + metadata: None, + }, + ), + coin_change: None, + metadata: None, + }, + ], + related_transactions: None, + metadata: None, + }, + timestamp: Some( + 1723792140000, + ), + }, + ], + total_count: 1, + next_offset: None, + }, +) From ea7d522b58c1d6a8fb0ebfcf0a4a17a8edefe9e2 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Wed, 8 Jan 2025 13:14:52 +0100 Subject: [PATCH 06/10] update to coinbase-mesh 0.1.1 --- Cargo.lock | 5 +++-- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d8b3e0d..7be5e03 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -463,8 +463,9 @@ checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "coinbase-mesh" -version = "0.1.0" -source = "git+https://github.com/MinaFoundation/coinbase-mesh.git?branch=optional-timestamp-field#d1e7b432e9682d93ba36c79efccbb09bdbf54cbf" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31fc19b9b4b3a1e0f07804e982b9bfe4fcba4bdda5908d5de28bd01b26be20f" dependencies = [ "reqwest", "serde", diff --git a/Cargo.toml b/Cargo.toml index bbb0b51..31c9599 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ anyhow = "1.0.86" axum = { version = "0.7.5", features = ["macros"] } bs58 = "0.5.1" clap = { version = "4.5.11", features = ["derive", "env"] } -coinbase-mesh = { git = "https://github.com/MinaFoundation/coinbase-mesh.git", branch = "optional-timestamp-field" } +coinbase-mesh = "0.1.1" convert_case = "0.6.0" cynic = { version = "3.7.3", features = ["http-reqwest-blocking"] } dashmap = "6.1.0" From dd14127b68e7076b5fbda7437b8279bc9b9df127 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Wed, 8 Jan 2025 16:25:44 +0100 Subject: [PATCH 07/10] reuse map_to_block_transactions for ic and uc --- src/api/search_transactions.rs | 51 ++++++++++++++---------------- src/types.rs | 58 ++++++++++++++++++++++------------ 2 files changed, 60 insertions(+), 49 deletions(-) diff --git a/src/api/search_transactions.rs b/src/api/search_transactions.rs index 67c6a33..1b7a6cb 100644 --- a/src/api/search_transactions.rs +++ b/src/api/search_transactions.rs @@ -6,8 +6,8 @@ use coinbase_mesh::models::{ use crate::{ generate_internal_command_transaction_identifier, generate_operations_internal_command, generate_operations_user_command, generate_operations_zkapp_command, generate_transaction_metadata, ChainStatus, - InternalCommand, InternalCommandType, MinaMesh, MinaMeshError, TransactionStatus, UserCommand, UserCommandType, - ZkAppCommand, + HasTimestamp, InternalCommand, InternalCommandType, MinaMesh, MinaMeshError, TransactionStatus, UserCommand, + UserCommandType, ZkAppCommand, }; impl MinaMesh { @@ -30,19 +30,7 @@ impl MinaMesh { // User Commands let user_commands = self.fetch_user_commands(&query_params, offset, limit).await?; let user_commands_total_count = user_commands.first().and_then(|uc| uc.total_count).unwrap_or(0); - let user_transactions_bt: Vec = user_commands - .into_iter() - .map(|uc| { - let timestamp = uc.timestamp.clone(); - let mut transaction: BlockTransaction = uc.into(); - if include_timestamp { - transaction.timestamp = timestamp.map(|ts| ts.parse::().unwrap_or_default()); - } else { - transaction.timestamp = None; - } - transaction - }) - .collect(); + let user_transactions_bt: Vec = map_to_block_transactions(user_commands, include_timestamp); transactions.extend(user_transactions_bt); total_count += user_commands_total_count; tracing::debug!("User commands total: {}, retrieved: {}", user_commands_total_count, transactions.len()); @@ -55,19 +43,7 @@ impl MinaMesh { tracing::debug!("Offset: {}, Limit: {}", offset, limit); let internal_commands = self.fetch_internal_commands(&query_params, offset, limit).await?; let internal_commands_total_count = internal_commands.first().and_then(|ic| ic.total_count).unwrap_or(0); - let internal_commands_bt: Vec = internal_commands - .into_iter() - .map(|ic| { - let timestamp = ic.timestamp.clone(); - let mut transaction: BlockTransaction = ic.into(); - if include_timestamp { - transaction.timestamp = timestamp.map(|ts| ts.parse::().unwrap_or_default()); - } else { - transaction.timestamp = None; - } - transaction - }) - .collect(); + let internal_commands_bt: Vec = map_to_block_transactions(internal_commands, include_timestamp); internal_commands_bt_len = internal_commands_bt.len(); transactions.extend(internal_commands_bt); total_count += internal_commands_total_count; @@ -285,6 +261,25 @@ pub fn zkapp_commands_to_block_transactions( result } +fn map_to_block_transactions(commands: Vec, include_timestamp: bool) -> Vec +where + T: Into + HasTimestamp, +{ + commands + .into_iter() + .map(|cmd| { + let timestamp = cmd.timestamp().map(|ts| ts.parse::().unwrap_or_default()); + let mut transaction: BlockTransaction = cmd.into(); + if include_timestamp { + transaction.timestamp = timestamp; + } else { + transaction.timestamp = None; + } + transaction + }) + .collect() +} + impl From for BlockTransaction { fn from(internal_command: InternalCommand) -> Self { // Derive transaction_identifier by combining command_type, sequence numbers, diff --git a/src/types.rs b/src/types.rs index 0ce7012..9c8f606 100644 --- a/src/types.rs +++ b/src/types.rs @@ -140,6 +140,43 @@ pub struct UserCommand { pub timestamp: Option, } +// Used in search transactions +#[derive(Debug, FromRow)] +pub struct InternalCommand { + pub id: Option, + pub command_type: InternalCommandType, + pub receiver_id: Option, + pub fee: Option, + pub hash: String, + pub receiver: String, + pub coinbase_receiver: Option, + pub sequence_no: i32, + pub secondary_sequence_no: i32, + pub block_id: i32, + pub status: TransactionStatus, + pub state_hash: Option, + pub height: Option, + pub total_count: Option, + pub creation_fee: Option, + pub timestamp: Option, +} + +pub trait HasTimestamp { + fn timestamp(&self) -> Option; +} + +impl HasTimestamp for UserCommand { + fn timestamp(&self) -> Option { + self.timestamp.clone() + } +} + +impl HasTimestamp for InternalCommand { + fn timestamp(&self) -> Option { + self.timestamp.clone() + } +} + // Used in block #[derive(Debug, PartialEq, Eq, FromRow, Serialize)] pub struct UserCommandMetadata { @@ -265,27 +302,6 @@ impl UserCommandOperationsData for UserCommandMetadata { } } -// Used in search transactions -#[derive(Debug, FromRow)] -pub struct InternalCommand { - pub id: Option, - pub command_type: InternalCommandType, - pub receiver_id: Option, - pub fee: Option, - pub hash: String, - pub receiver: String, - pub coinbase_receiver: Option, - pub sequence_no: i32, - pub secondary_sequence_no: i32, - pub block_id: i32, - pub status: TransactionStatus, - pub state_hash: Option, - pub height: Option, - pub total_count: Option, - pub creation_fee: Option, - pub timestamp: Option, -} - // Used in block #[derive(Debug, PartialEq, Eq, FromRow, Serialize)] pub struct InternalCommandMetadata { From 663077fa38df4894148983cab624df3c707041fb Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Wed, 8 Jan 2025 16:40:38 +0100 Subject: [PATCH 08/10] update sqlx --- ...eff7be2108305fe3f0b3bd50fcb258b9b6cd.json} | 14 +++++++++---- ...8c44b505756f63231b994b31c8c031d42127.json} | 14 +++++++++---- ...fbb72784b503ca4494e55fa797f377f3670a.json} | 12 ++++++++--- ...de460fec098d8bae3febcbeeca30d06c22b3.json} | 12 ++++++++--- ...a69b0db112ab1979b1cbd85fa5fecfef6d82.json} | 18 +++++++++++------ ...0380c10a7888182363340090a2153cfaf1a7.json} | 20 ++++++++++++------- ...f027441b745ecd6859c78fb226593d8ed88c.json} | 18 +++++++++++------ 7 files changed, 75 insertions(+), 33 deletions(-) rename .sqlx/{query-4ee3616c7a5da2c695c5c539f87b82e9dcf80bdd2bebaff31a525738d47af796.json => query-25ad7fc2ddc1cd7395d20ad6bdb0eff7be2108305fe3f0b3bd50fcb258b9b6cd.json} (57%) rename .sqlx/{query-648e0c6eeb43267b210f634150122baa2d31114f4877e73f536de19bef0b5d1a.json => query-5695a638fa66b02ec960bf45e28c8c44b505756f63231b994b31c8c031d42127.json} (54%) rename .sqlx/{query-e28e37ffde6c99bdabf6bab737ee822f8529a476fe0470affb05221acd175a7e.json => query-58476887071cd3eb5dd5a0ad328ffbb72784b503ca4494e55fa797f377f3670a.json} (64%) rename .sqlx/{query-b3a742caeef402c8276177f63ade12bfd1e71000785ee5ce6adc831efbd625dc.json => query-7794550c764fae88ce5aec20b017de460fec098d8bae3febcbeeca30d06c22b3.json} (63%) rename .sqlx/{query-ad24179585077f0acc42fb8275d9f41e71a92f62d7ef9683a0f3142056c7a7f1.json => query-7f28bbe1b019307827f09047c78fa69b0db112ab1979b1cbd85fa5fecfef6d82.json} (61%) rename .sqlx/{query-b060c16dd0800f47632051a04106fa9675d842510ca206e8e32066423eacb79e.json => query-aab8301ed951ec5ebb6e2b6756df0380c10a7888182363340090a2153cfaf1a7.json} (61%) rename .sqlx/{query-5c8655d59873f5cd56675a8bc064d84584f910c85ecf3bc260ee8afeb566dcad.json => query-d86fcbf6ba111af8d334e34ad6c1f027441b745ecd6859c78fb226593d8ed88c.json} (62%) diff --git a/.sqlx/query-4ee3616c7a5da2c695c5c539f87b82e9dcf80bdd2bebaff31a525738d47af796.json b/.sqlx/query-25ad7fc2ddc1cd7395d20ad6bdb0eff7be2108305fe3f0b3bd50fcb258b9b6cd.json similarity index 57% rename from .sqlx/query-4ee3616c7a5da2c695c5c539f87b82e9dcf80bdd2bebaff31a525738d47af796.json rename to .sqlx/query-25ad7fc2ddc1cd7395d20ad6bdb0eff7be2108305fe3f0b3bd50fcb258b9b6cd.json index f47ef33..4938789 100644 --- a/.sqlx/query-4ee3616c7a5da2c695c5c539f87b82e9dcf80bdd2bebaff31a525738d47af796.json +++ b/.sqlx/query-25ad7fc2ddc1cd7395d20ad6bdb0eff7be2108305fe3f0b3bd50fcb258b9b6cd.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(HEIGHT)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n zkapp_commands_info AS (\n SELECT\n zca.id,\n zca.memo,\n zca.hash,\n zca.fee_payer,\n pk_update_body.value AS pk_update_body,\n zca.fee,\n zca.valid_until,\n zca.nonce,\n zca.sequence_no,\n zca.status AS \"status: TransactionStatus\",\n zaub.balance_change,\n zca.block_id,\n b.state_hash,\n b.height,\n token_update_body.value AS token,\n ARRAY(\n SELECT\n unnest(zauf.failures)\n FROM\n zkapp_account_update_failures AS zauf\n WHERE\n zauf.id=ANY (zca.failure_reasons_ids)\n ) AS failure_reasons\n FROM\n zkapp_commands_aggregated AS zca\n INNER JOIN blocks AS b ON zca.block_id=b.id\n LEFT JOIN zkapp_account_update AS zau ON zau.id=ANY (zca.zkapp_account_updates_ids)\n INNER JOIN zkapp_account_update_body AS zaub ON zau.body_id=zaub.id\n INNER JOIN account_identifiers AS ai_update_body ON zaub.account_identifier_id=ai_update_body.id\n INNER JOIN public_keys AS pk_update_body ON ai_update_body.public_key_id=pk_update_body.id\n INNER JOIN tokens AS token_update_body ON ai_update_body.token_id=token_update_body.id\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=zca.hash\n OR $2 IS NULL\n )\n AND (\n (\n (\n $4=token_update_body.value\n AND (\n $3=pk_update_body.value\n OR $3=zca.fee_payer\n )\n )\n AND $3 IS NOT NULL\n AND $4 IS NOT NULL\n )\n OR (\n (\n $3=zca.fee_payer\n OR $3=pk_update_body.value\n )\n AND $3 IS NOT NULL\n AND $4 IS NULL\n )\n OR (\n $3 IS NULL\n AND $4 IS NULL\n )\n )\n AND (\n $5=zca.status\n OR $5 IS NULL\n )\n AND (\n $6=zca.status\n OR $6 IS NULL\n )\n AND (\n (\n $7=zca.fee_payer\n OR $7=pk_update_body.value\n )\n OR $7 IS NULL\n )\n ),\n zkapp_commands_ids AS (\n SELECT DISTINCT\n id,\n block_id,\n sequence_no\n FROM\n zkapp_commands_info\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n zkapp_commands_ids\n )\nSELECT\n zc.*,\n id_count.total_count\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n zkapp_commands_ids\n ORDER BY\n block_id,\n id,\n sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS ids\n INNER JOIN zkapp_commands_info AS zc ON ids.id=zc.id\n AND ids.block_id=zc.block_id\n AND ids.sequence_no=zc.sequence_no\nORDER BY\n ids.block_id,\n ids.id,\n ids.sequence_no,\n zc.balance_change\n", + "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(HEIGHT)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n zkapp_commands_info AS (\n SELECT\n zca.id,\n zca.memo,\n zca.hash,\n zca.fee_payer,\n pk_update_body.value AS pk_update_body,\n zca.fee,\n zca.valid_until,\n zca.nonce,\n zca.sequence_no,\n zca.status AS \"status: TransactionStatus\",\n zaub.balance_change,\n zca.block_id,\n b.state_hash,\n b.height,\n b.timestamp,\n token_update_body.value AS token,\n ARRAY(\n SELECT\n unnest(zauf.failures)\n FROM\n zkapp_account_update_failures AS zauf\n WHERE\n zauf.id=ANY (zca.failure_reasons_ids)\n ) AS failure_reasons\n FROM\n zkapp_commands_aggregated AS zca\n INNER JOIN blocks AS b ON zca.block_id=b.id\n LEFT JOIN zkapp_account_update AS zau ON zau.id=ANY (zca.zkapp_account_updates_ids)\n INNER JOIN zkapp_account_update_body AS zaub ON zau.body_id=zaub.id\n INNER JOIN account_identifiers AS ai_update_body ON zaub.account_identifier_id=ai_update_body.id\n INNER JOIN public_keys AS pk_update_body ON ai_update_body.public_key_id=pk_update_body.id\n INNER JOIN tokens AS token_update_body ON ai_update_body.token_id=token_update_body.id\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=zca.hash\n OR $2 IS NULL\n )\n AND (\n (\n (\n $4=token_update_body.value\n AND (\n $3=pk_update_body.value\n OR $3=zca.fee_payer\n )\n )\n AND $3 IS NOT NULL\n AND $4 IS NOT NULL\n )\n OR (\n (\n $3=zca.fee_payer\n OR $3=pk_update_body.value\n )\n AND $3 IS NOT NULL\n AND $4 IS NULL\n )\n OR (\n $3 IS NULL\n AND $4 IS NULL\n )\n )\n AND (\n $5=zca.status\n OR $5 IS NULL\n )\n AND (\n $6=zca.status\n OR $6 IS NULL\n )\n AND (\n (\n $7=zca.fee_payer\n OR $7=pk_update_body.value\n )\n OR $7 IS NULL\n )\n ),\n zkapp_commands_ids AS (\n SELECT DISTINCT\n id,\n block_id,\n sequence_no\n FROM\n zkapp_commands_info\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n zkapp_commands_ids\n )\nSELECT\n zc.*,\n id_count.total_count\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n zkapp_commands_ids\n ORDER BY\n block_id,\n id,\n sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS ids\n INNER JOIN zkapp_commands_info AS zc ON ids.id=zc.id\n AND ids.block_id=zc.block_id\n AND ids.sequence_no=zc.sequence_no\nORDER BY\n ids.block_id,\n ids.id,\n ids.sequence_no,\n zc.balance_change\n", "describe": { "columns": [ { @@ -85,16 +85,21 @@ }, { "ordinal": 14, - "name": "token", + "name": "timestamp", "type_info": "Text" }, { "ordinal": 15, + "name": "token", + "type_info": "Text" + }, + { + "ordinal": 16, "name": "failure_reasons", "type_info": "TextArray" }, { - "ordinal": 16, + "ordinal": 17, "name": "total_count", "type_info": "Int8" } @@ -147,10 +152,11 @@ false, null, null, + null, false, null, null ] }, - "hash": "4ee3616c7a5da2c695c5c539f87b82e9dcf80bdd2bebaff31a525738d47af796" + "hash": "25ad7fc2ddc1cd7395d20ad6bdb0eff7be2108305fe3f0b3bd50fcb258b9b6cd" } diff --git a/.sqlx/query-648e0c6eeb43267b210f634150122baa2d31114f4877e73f536de19bef0b5d1a.json b/.sqlx/query-5695a638fa66b02ec960bf45e28c8c44b505756f63231b994b31c8c031d42127.json similarity index 54% rename from .sqlx/query-648e0c6eeb43267b210f634150122baa2d31114f4877e73f536de19bef0b5d1a.json rename to .sqlx/query-5695a638fa66b02ec960bf45e28c8c44b505756f63231b994b31c8c031d42127.json index c7c4133..7be6bb8 100644 --- a/.sqlx/query-648e0c6eeb43267b210f634150122baa2d31114f4877e73f536de19bef0b5d1a.json +++ b/.sqlx/query-5695a638fa66b02ec960bf45e28c8c44b505756f63231b994b31c8c031d42127.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(HEIGHT)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n zkapp_commands_info AS (\n SELECT\n zc.id,\n zc.memo,\n zc.hash,\n pk_fee_payer.value AS fee_payer,\n pk_update_body.value AS pk_update_body,\n zfpb.fee,\n zfpb.valid_until,\n zfpb.nonce,\n bzc.sequence_no,\n bzc.status AS \"status: TransactionStatus\",\n zaub.balance_change,\n bzc.block_id,\n b.state_hash,\n b.height,\n token_update_body.value AS token,\n ARRAY(\n SELECT\n unnest(zauf.failures)\n FROM\n zkapp_account_update_failures AS zauf\n WHERE\n zauf.id=ANY (bzc.failure_reasons_ids)\n ) AS failure_reasons\n FROM\n zkapp_commands AS zc\n INNER JOIN blocks_zkapp_commands AS bzc ON zc.id=bzc.zkapp_command_id\n INNER JOIN zkapp_fee_payer_body AS zfpb ON zc.zkapp_fee_payer_body_id=zfpb.id\n INNER JOIN public_keys AS pk_fee_payer ON zfpb.public_key_id=pk_fee_payer.id\n INNER JOIN blocks AS b ON bzc.block_id=b.id\n LEFT JOIN zkapp_account_update AS zau ON zau.id=ANY (zc.zkapp_account_updates_ids)\n INNER JOIN zkapp_account_update_body AS zaub ON zau.body_id=zaub.id\n INNER JOIN account_identifiers AS ai_update_body ON zaub.account_identifier_id=ai_update_body.id\n INNER JOIN public_keys AS pk_update_body ON ai_update_body.public_key_id=pk_update_body.id\n INNER JOIN tokens AS token_update_body ON ai_update_body.token_id=token_update_body.id\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=zc.hash\n OR $2 IS NULL\n )\n AND (\n (\n (\n (\n $4=token_update_body.value\n AND (\n $3=pk_update_body.value\n OR $3=pk_fee_payer.value\n )\n )\n )\n AND $3 IS NOT NULL\n AND $4 IS NOT NULL\n )\n OR (\n (\n $3=pk_fee_payer.value\n OR $3=pk_update_body.value\n )\n AND $3 IS NOT NULL\n AND $4 IS NULL\n )\n OR (\n $3 IS NULL\n AND $4 IS NULL\n )\n )\n AND (\n $5=bzc.status\n OR $5 IS NULL\n )\n AND (\n $6=bzc.status\n OR $6 IS NULL\n )\n AND (\n (\n $7=pk_fee_payer.value\n OR $7=pk_update_body.value\n )\n OR $7 IS NULL\n )\n ),\n zkapp_commands_ids AS (\n SELECT DISTINCT\n id,\n block_id,\n sequence_no\n FROM\n zkapp_commands_info\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n zkapp_commands_ids\n )\nSELECT\n zc.*,\n id_count.total_count\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n zkapp_commands_ids\n ORDER BY\n block_id,\n id,\n sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS ids\n INNER JOIN zkapp_commands_info AS zc ON ids.id=zc.id\n AND ids.block_id=zc.block_id\n AND ids.sequence_no=zc.sequence_no\nORDER BY\n ids.block_id,\n ids.id,\n ids.sequence_no,\n zc.balance_change\n", + "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(HEIGHT)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n zkapp_commands_info AS (\n SELECT\n zc.id,\n zc.memo,\n zc.hash,\n pk_fee_payer.value AS fee_payer,\n pk_update_body.value AS pk_update_body,\n zfpb.fee,\n zfpb.valid_until,\n zfpb.nonce,\n bzc.sequence_no,\n bzc.status AS \"status: TransactionStatus\",\n zaub.balance_change,\n bzc.block_id,\n b.state_hash,\n b.height,\n b.timestamp,\n token_update_body.value AS token,\n ARRAY(\n SELECT\n unnest(zauf.failures)\n FROM\n zkapp_account_update_failures AS zauf\n WHERE\n zauf.id=ANY (bzc.failure_reasons_ids)\n ) AS failure_reasons\n FROM\n zkapp_commands AS zc\n INNER JOIN blocks_zkapp_commands AS bzc ON zc.id=bzc.zkapp_command_id\n INNER JOIN zkapp_fee_payer_body AS zfpb ON zc.zkapp_fee_payer_body_id=zfpb.id\n INNER JOIN public_keys AS pk_fee_payer ON zfpb.public_key_id=pk_fee_payer.id\n INNER JOIN blocks AS b ON bzc.block_id=b.id\n LEFT JOIN zkapp_account_update AS zau ON zau.id=ANY (zc.zkapp_account_updates_ids)\n INNER JOIN zkapp_account_update_body AS zaub ON zau.body_id=zaub.id\n INNER JOIN account_identifiers AS ai_update_body ON zaub.account_identifier_id=ai_update_body.id\n INNER JOIN public_keys AS pk_update_body ON ai_update_body.public_key_id=pk_update_body.id\n INNER JOIN tokens AS token_update_body ON ai_update_body.token_id=token_update_body.id\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=zc.hash\n OR $2 IS NULL\n )\n AND (\n (\n (\n (\n $4=token_update_body.value\n AND (\n $3=pk_update_body.value\n OR $3=pk_fee_payer.value\n )\n )\n )\n AND $3 IS NOT NULL\n AND $4 IS NOT NULL\n )\n OR (\n (\n $3=pk_fee_payer.value\n OR $3=pk_update_body.value\n )\n AND $3 IS NOT NULL\n AND $4 IS NULL\n )\n OR (\n $3 IS NULL\n AND $4 IS NULL\n )\n )\n AND (\n $5=bzc.status\n OR $5 IS NULL\n )\n AND (\n $6=bzc.status\n OR $6 IS NULL\n )\n AND (\n (\n $7=pk_fee_payer.value\n OR $7=pk_update_body.value\n )\n OR $7 IS NULL\n )\n ),\n zkapp_commands_ids AS (\n SELECT DISTINCT\n id,\n block_id,\n sequence_no\n FROM\n zkapp_commands_info\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n zkapp_commands_ids\n )\nSELECT\n zc.*,\n id_count.total_count\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n zkapp_commands_ids\n ORDER BY\n block_id,\n id,\n sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS ids\n INNER JOIN zkapp_commands_info AS zc ON ids.id=zc.id\n AND ids.block_id=zc.block_id\n AND ids.sequence_no=zc.sequence_no\nORDER BY\n ids.block_id,\n ids.id,\n ids.sequence_no,\n zc.balance_change\n", "describe": { "columns": [ { @@ -85,16 +85,21 @@ }, { "ordinal": 14, - "name": "token", + "name": "timestamp", "type_info": "Text" }, { "ordinal": 15, + "name": "token", + "type_info": "Text" + }, + { + "ordinal": 16, "name": "failure_reasons", "type_info": "TextArray" }, { - "ordinal": 16, + "ordinal": 17, "name": "total_count", "type_info": "Int8" } @@ -147,10 +152,11 @@ false, null, null, + null, false, null, null ] }, - "hash": "648e0c6eeb43267b210f634150122baa2d31114f4877e73f536de19bef0b5d1a" + "hash": "5695a638fa66b02ec960bf45e28c8c44b505756f63231b994b31c8c031d42127" } diff --git a/.sqlx/query-e28e37ffde6c99bdabf6bab737ee822f8529a476fe0470affb05221acd175a7e.json b/.sqlx/query-58476887071cd3eb5dd5a0ad328ffbb72784b503ca4494e55fa797f377f3670a.json similarity index 64% rename from .sqlx/query-e28e37ffde6c99bdabf6bab737ee822f8529a476fe0470affb05221acd175a7e.json rename to .sqlx/query-58476887071cd3eb5dd5a0ad328ffbb72784b503ca4494e55fa797f377f3670a.json index 2bd3dcb..d2c5871 100644 --- a/.sqlx/query-e28e37ffde6c99bdabf6bab737ee822f8529a476fe0470affb05221acd175a7e.json +++ b/.sqlx/query-58476887071cd3eb5dd5a0ad328ffbb72784b503ca4494e55fa797f377f3670a.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(HEIGHT)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n coinbase_receiver_info AS (\n SELECT\n bic.block_id,\n bic.internal_command_id,\n bic.sequence_no,\n bic.secondary_sequence_no,\n coinbase_receiver_pk.value AS coinbase_receiver\n FROM\n blocks_internal_commands AS bic\n INNER JOIN internal_commands AS ic ON bic.internal_command_id=ic.id\n INNER JOIN blocks_internal_commands AS bic_coinbase_receiver ON bic.block_id=bic_coinbase_receiver.block_id\n AND (\n bic.internal_command_id<>bic_coinbase_receiver.internal_command_id\n OR bic.sequence_no<>bic_coinbase_receiver.sequence_no\n OR bic.secondary_sequence_no<>bic_coinbase_receiver.secondary_sequence_no\n )\n INNER JOIN internal_commands AS ic_coinbase_receiver ON ic.command_type='fee_transfer_via_coinbase'\n AND ic_coinbase_receiver.command_type='coinbase'\n AND bic_coinbase_receiver.internal_command_id=ic_coinbase_receiver.id\n INNER JOIN public_keys AS coinbase_receiver_pk ON ic_coinbase_receiver.receiver_id=coinbase_receiver_pk.id\n ),\n internal_commands_info AS (\n SELECT DISTINCT\n ON (\n ica.block_id,\n ica.id,\n ica.sequence_no,\n ica.secondary_sequence_no\n ) ica.id,\n ica.command_type AS \"command_type: InternalCommandType\",\n ica.receiver_id,\n ica.fee,\n ica.hash,\n ica.receiver AS receiver,\n cri.coinbase_receiver AS \"coinbase_receiver?\",\n ica.sequence_no,\n ica.secondary_sequence_no,\n ica.block_id,\n ica.status AS \"status: TransactionStatus\",\n b.state_hash,\n b.height\n FROM\n internal_commands_aggregated AS ica\n INNER JOIN blocks AS b ON ica.block_id=b.id\n LEFT JOIN coinbase_receiver_info AS cri ON ica.block_id=cri.block_id\n AND ica.id=cri.internal_command_id\n AND ica.sequence_no=cri.sequence_no\n AND ica.secondary_sequence_no=cri.secondary_sequence_no\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=ica.hash\n OR $2 IS NULL\n )\n AND (\n (\n (\n $3=ica.receiver\n OR $3=cri.coinbase_receiver\n )\n OR $3 IS NULL\n )\n )\n AND (\n $4=''\n OR $4 IS NULL\n )\n AND (\n $5=ica.status\n OR $5 IS NULL\n )\n AND (\n $6=ica.status\n OR $6 IS NULL\n )\n AND (\n (\n $7=ica.receiver\n OR $7=cri.coinbase_receiver\n )\n OR $7 IS NULL\n )\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n internal_commands_info\n )\nSELECT\n i.*,\n id_count.total_count,\n ac.creation_fee AS \"creation_fee?\"\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n internal_commands_info\n ORDER BY\n block_id,\n id,\n sequence_no,\n secondary_sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS i\n LEFT JOIN account_identifiers AS ai ON i.receiver_id=ai.public_key_id\n LEFT JOIN accounts_created AS ac ON ai.id=ac.account_identifier_id\n AND i.block_id=ac.block_id\n AND i.sequence_no=(\n SELECT\n least(\n (\n SELECT\n min(bic2.sequence_no)\n FROM\n blocks_internal_commands AS bic2\n INNER JOIN internal_commands AS ic2 ON bic2.internal_command_id=ic2.id\n WHERE\n i.receiver_id=ic2.receiver_id\n AND bic2.block_id=i.block_id\n AND bic2.status='applied'\n ),\n (\n SELECT\n min(buc2.sequence_no)\n FROM\n blocks_user_commands AS buc2\n INNER JOIN user_commands AS uc2 ON buc2.user_command_id=uc2.id\n WHERE\n i.receiver_id=uc2.receiver_id\n AND buc2.block_id=i.block_id\n AND buc2.status='applied'\n )\n )\n )\nORDER BY\n i.block_id,\n i.id,\n i.sequence_no,\n i.secondary_sequence_no\n", + "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(HEIGHT)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n coinbase_receiver_info AS (\n SELECT\n bic.block_id,\n bic.internal_command_id,\n bic.sequence_no,\n bic.secondary_sequence_no,\n coinbase_receiver_pk.value AS coinbase_receiver\n FROM\n blocks_internal_commands AS bic\n INNER JOIN internal_commands AS ic ON bic.internal_command_id=ic.id\n INNER JOIN blocks_internal_commands AS bic_coinbase_receiver ON bic.block_id=bic_coinbase_receiver.block_id\n AND (\n bic.internal_command_id<>bic_coinbase_receiver.internal_command_id\n OR bic.sequence_no<>bic_coinbase_receiver.sequence_no\n OR bic.secondary_sequence_no<>bic_coinbase_receiver.secondary_sequence_no\n )\n INNER JOIN internal_commands AS ic_coinbase_receiver ON ic.command_type='fee_transfer_via_coinbase'\n AND ic_coinbase_receiver.command_type='coinbase'\n AND bic_coinbase_receiver.internal_command_id=ic_coinbase_receiver.id\n INNER JOIN public_keys AS coinbase_receiver_pk ON ic_coinbase_receiver.receiver_id=coinbase_receiver_pk.id\n ),\n internal_commands_info AS (\n SELECT DISTINCT\n ON (\n ica.block_id,\n ica.id,\n ica.sequence_no,\n ica.secondary_sequence_no\n ) ica.id,\n ica.command_type AS \"command_type: InternalCommandType\",\n ica.receiver_id,\n ica.fee,\n ica.hash,\n ica.receiver AS receiver,\n cri.coinbase_receiver AS \"coinbase_receiver?\",\n ica.sequence_no,\n ica.secondary_sequence_no,\n ica.block_id,\n ica.status AS \"status: TransactionStatus\",\n b.state_hash,\n b.height,\n b.timestamp\n FROM\n internal_commands_aggregated AS ica\n INNER JOIN blocks AS b ON ica.block_id=b.id\n LEFT JOIN coinbase_receiver_info AS cri ON ica.block_id=cri.block_id\n AND ica.id=cri.internal_command_id\n AND ica.sequence_no=cri.sequence_no\n AND ica.secondary_sequence_no=cri.secondary_sequence_no\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=ica.hash\n OR $2 IS NULL\n )\n AND (\n (\n (\n $3=ica.receiver\n OR $3=cri.coinbase_receiver\n )\n OR $3 IS NULL\n )\n )\n AND (\n $4=''\n OR $4 IS NULL\n )\n AND (\n $5=ica.status\n OR $5 IS NULL\n )\n AND (\n $6=ica.status\n OR $6 IS NULL\n )\n AND (\n (\n $7=ica.receiver\n OR $7=cri.coinbase_receiver\n )\n OR $7 IS NULL\n )\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n internal_commands_info\n )\nSELECT\n i.*,\n id_count.total_count,\n ac.creation_fee AS \"creation_fee?\"\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n internal_commands_info\n ORDER BY\n block_id,\n id,\n sequence_no,\n secondary_sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS i\n LEFT JOIN account_identifiers AS ai ON i.receiver_id=ai.public_key_id\n LEFT JOIN accounts_created AS ac ON ai.id=ac.account_identifier_id\n AND i.block_id=ac.block_id\n AND i.sequence_no=(\n SELECT\n least(\n (\n SELECT\n min(bic2.sequence_no)\n FROM\n blocks_internal_commands AS bic2\n INNER JOIN internal_commands AS ic2 ON bic2.internal_command_id=ic2.id\n WHERE\n i.receiver_id=ic2.receiver_id\n AND bic2.block_id=i.block_id\n AND bic2.status='applied'\n ),\n (\n SELECT\n min(buc2.sequence_no)\n FROM\n blocks_user_commands AS buc2\n INNER JOIN user_commands AS uc2 ON buc2.user_command_id=uc2.id\n WHERE\n i.receiver_id=uc2.receiver_id\n AND buc2.block_id=i.block_id\n AND buc2.status='applied'\n )\n )\n )\nORDER BY\n i.block_id,\n i.id,\n i.sequence_no,\n i.secondary_sequence_no\n", "describe": { "columns": [ { @@ -91,11 +91,16 @@ }, { "ordinal": 13, + "name": "timestamp", + "type_info": "Text" + }, + { + "ordinal": 14, "name": "total_count", "type_info": "Int8" }, { - "ordinal": 14, + "ordinal": 15, "name": "creation_fee?", "type_info": "Text" } @@ -148,8 +153,9 @@ null, null, null, + null, false ] }, - "hash": "e28e37ffde6c99bdabf6bab737ee822f8529a476fe0470affb05221acd175a7e" + "hash": "58476887071cd3eb5dd5a0ad328ffbb72784b503ca4494e55fa797f377f3670a" } diff --git a/.sqlx/query-b3a742caeef402c8276177f63ade12bfd1e71000785ee5ce6adc831efbd625dc.json b/.sqlx/query-7794550c764fae88ce5aec20b017de460fec098d8bae3febcbeeca30d06c22b3.json similarity index 63% rename from .sqlx/query-b3a742caeef402c8276177f63ade12bfd1e71000785ee5ce6adc831efbd625dc.json rename to .sqlx/query-7794550c764fae88ce5aec20b017de460fec098d8bae3febcbeeca30d06c22b3.json index 66ffa5e..cb7fd29 100644 --- a/.sqlx/query-b3a742caeef402c8276177f63ade12bfd1e71000785ee5ce6adc831efbd625dc.json +++ b/.sqlx/query-7794550c764fae88ce5aec20b017de460fec098d8bae3febcbeeca30d06c22b3.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(HEIGHT)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n coinbase_receiver_info AS (\n SELECT\n bic.block_id,\n bic.internal_command_id,\n bic.sequence_no,\n bic.secondary_sequence_no,\n coinbase_receiver_pk.value AS coinbase_receiver\n FROM\n blocks_internal_commands AS bic\n INNER JOIN internal_commands AS ic ON bic.internal_command_id=ic.id\n INNER JOIN blocks_internal_commands AS bic_coinbase_receiver ON bic.block_id=bic_coinbase_receiver.block_id\n AND (\n bic.internal_command_id<>bic_coinbase_receiver.internal_command_id\n OR bic.sequence_no<>bic_coinbase_receiver.sequence_no\n OR bic.secondary_sequence_no<>bic_coinbase_receiver.secondary_sequence_no\n )\n INNER JOIN internal_commands AS ic_coinbase_receiver ON ic.command_type='fee_transfer_via_coinbase'\n AND ic_coinbase_receiver.command_type='coinbase'\n AND bic_coinbase_receiver.internal_command_id=ic_coinbase_receiver.id\n INNER JOIN public_keys AS coinbase_receiver_pk ON ic_coinbase_receiver.receiver_id=coinbase_receiver_pk.id\n ),\n internal_commands_info AS (\n SELECT DISTINCT\n ON (\n bic.block_id,\n bic.internal_command_id,\n bic.sequence_no,\n bic.secondary_sequence_no\n ) i.id,\n i.command_type AS \"command_type: InternalCommandType\",\n i.receiver_id,\n i.fee,\n i.hash,\n pk.value AS receiver,\n cri.coinbase_receiver AS \"coinbase_receiver?\",\n bic.sequence_no,\n bic.secondary_sequence_no,\n bic.block_id,\n bic.status AS \"status: TransactionStatus\",\n b.state_hash,\n b.height\n FROM\n internal_commands AS i\n INNER JOIN blocks_internal_commands AS bic ON i.id=bic.internal_command_id\n INNER JOIN public_keys AS pk ON i.receiver_id=pk.id\n INNER JOIN blocks AS b ON bic.block_id=b.id\n LEFT JOIN coinbase_receiver_info AS cri ON bic.block_id=cri.block_id\n AND bic.internal_command_id=cri.internal_command_id\n AND bic.sequence_no=cri.sequence_no\n AND bic.secondary_sequence_no=cri.secondary_sequence_no\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=i.hash\n OR $2 IS NULL\n )\n AND (\n (\n (\n $3=pk.value\n OR $3=cri.coinbase_receiver\n )\n OR $3 IS NULL\n )\n )\n AND (\n $4=''\n OR $4 IS NULL\n )\n AND (\n $5=bic.status\n OR $5 IS NULL\n )\n AND (\n $6=bic.status\n OR $6 IS NULL\n )\n AND (\n (\n $7=pk.value\n OR $7=cri.coinbase_receiver\n )\n OR $7 IS NULL\n )\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n internal_commands_info\n )\nSELECT\n i.*,\n id_count.total_count,\n ac.creation_fee AS \"creation_fee?\"\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n internal_commands_info\n ORDER BY\n block_id,\n id,\n sequence_no,\n secondary_sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS i\n LEFT JOIN account_identifiers AS ai ON i.receiver_id=ai.public_key_id\n LEFT JOIN accounts_created AS ac ON ai.id=ac.account_identifier_id\n AND i.block_id=ac.block_id\n AND i.sequence_no=(\n SELECT\n least(\n (\n SELECT\n min(bic2.sequence_no)\n FROM\n blocks_internal_commands AS bic2\n INNER JOIN internal_commands AS ic2 ON bic2.internal_command_id=ic2.id\n WHERE\n i.receiver_id=ic2.receiver_id\n AND bic2.block_id=i.block_id\n AND bic2.status='applied'\n ),\n (\n SELECT\n min(buc2.sequence_no)\n FROM\n blocks_user_commands AS buc2\n INNER JOIN user_commands AS uc2 ON buc2.user_command_id=uc2.id\n WHERE\n i.receiver_id=uc2.receiver_id\n AND buc2.block_id=i.block_id\n AND buc2.status='applied'\n )\n )\n )\nORDER BY\n i.block_id,\n i.id,\n i.sequence_no,\n i.secondary_sequence_no\n", + "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(HEIGHT)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n coinbase_receiver_info AS (\n SELECT\n bic.block_id,\n bic.internal_command_id,\n bic.sequence_no,\n bic.secondary_sequence_no,\n coinbase_receiver_pk.value AS coinbase_receiver\n FROM\n blocks_internal_commands AS bic\n INNER JOIN internal_commands AS ic ON bic.internal_command_id=ic.id\n INNER JOIN blocks_internal_commands AS bic_coinbase_receiver ON bic.block_id=bic_coinbase_receiver.block_id\n AND (\n bic.internal_command_id<>bic_coinbase_receiver.internal_command_id\n OR bic.sequence_no<>bic_coinbase_receiver.sequence_no\n OR bic.secondary_sequence_no<>bic_coinbase_receiver.secondary_sequence_no\n )\n INNER JOIN internal_commands AS ic_coinbase_receiver ON ic.command_type='fee_transfer_via_coinbase'\n AND ic_coinbase_receiver.command_type='coinbase'\n AND bic_coinbase_receiver.internal_command_id=ic_coinbase_receiver.id\n INNER JOIN public_keys AS coinbase_receiver_pk ON ic_coinbase_receiver.receiver_id=coinbase_receiver_pk.id\n ),\n internal_commands_info AS (\n SELECT DISTINCT\n ON (\n bic.block_id,\n bic.internal_command_id,\n bic.sequence_no,\n bic.secondary_sequence_no\n ) i.id,\n i.command_type AS \"command_type: InternalCommandType\",\n i.receiver_id,\n i.fee,\n i.hash,\n pk.value AS receiver,\n cri.coinbase_receiver AS \"coinbase_receiver?\",\n bic.sequence_no,\n bic.secondary_sequence_no,\n bic.block_id,\n bic.status AS \"status: TransactionStatus\",\n b.state_hash,\n b.height,\n b.timestamp\n FROM\n internal_commands AS i\n INNER JOIN blocks_internal_commands AS bic ON i.id=bic.internal_command_id\n INNER JOIN public_keys AS pk ON i.receiver_id=pk.id\n INNER JOIN blocks AS b ON bic.block_id=b.id\n LEFT JOIN coinbase_receiver_info AS cri ON bic.block_id=cri.block_id\n AND bic.internal_command_id=cri.internal_command_id\n AND bic.sequence_no=cri.sequence_no\n AND bic.secondary_sequence_no=cri.secondary_sequence_no\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=i.hash\n OR $2 IS NULL\n )\n AND (\n (\n (\n $3=pk.value\n OR $3=cri.coinbase_receiver\n )\n OR $3 IS NULL\n )\n )\n AND (\n $4=''\n OR $4 IS NULL\n )\n AND (\n $5=bic.status\n OR $5 IS NULL\n )\n AND (\n $6=bic.status\n OR $6 IS NULL\n )\n AND (\n (\n $7=pk.value\n OR $7=cri.coinbase_receiver\n )\n OR $7 IS NULL\n )\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n internal_commands_info\n )\nSELECT\n i.*,\n id_count.total_count,\n ac.creation_fee AS \"creation_fee?\"\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n internal_commands_info\n ORDER BY\n block_id,\n id,\n sequence_no,\n secondary_sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS i\n LEFT JOIN account_identifiers AS ai ON i.receiver_id=ai.public_key_id\n LEFT JOIN accounts_created AS ac ON ai.id=ac.account_identifier_id\n AND i.block_id=ac.block_id\n AND i.sequence_no=(\n SELECT\n least(\n (\n SELECT\n min(bic2.sequence_no)\n FROM\n blocks_internal_commands AS bic2\n INNER JOIN internal_commands AS ic2 ON bic2.internal_command_id=ic2.id\n WHERE\n i.receiver_id=ic2.receiver_id\n AND bic2.block_id=i.block_id\n AND bic2.status='applied'\n ),\n (\n SELECT\n min(buc2.sequence_no)\n FROM\n blocks_user_commands AS buc2\n INNER JOIN user_commands AS uc2 ON buc2.user_command_id=uc2.id\n WHERE\n i.receiver_id=uc2.receiver_id\n AND buc2.block_id=i.block_id\n AND buc2.status='applied'\n )\n )\n )\nORDER BY\n i.block_id,\n i.id,\n i.sequence_no,\n i.secondary_sequence_no\n", "describe": { "columns": [ { @@ -91,11 +91,16 @@ }, { "ordinal": 13, + "name": "timestamp", + "type_info": "Text" + }, + { + "ordinal": 14, "name": "total_count", "type_info": "Int8" }, { - "ordinal": 14, + "ordinal": 15, "name": "creation_fee?", "type_info": "Text" } @@ -148,8 +153,9 @@ null, null, null, + null, false ] }, - "hash": "b3a742caeef402c8276177f63ade12bfd1e71000785ee5ce6adc831efbd625dc" + "hash": "7794550c764fae88ce5aec20b017de460fec098d8bae3febcbeeca30d06c22b3" } diff --git a/.sqlx/query-ad24179585077f0acc42fb8275d9f41e71a92f62d7ef9683a0f3142056c7a7f1.json b/.sqlx/query-7f28bbe1b019307827f09047c78fa69b0db112ab1979b1cbd85fa5fecfef6d82.json similarity index 61% rename from .sqlx/query-ad24179585077f0acc42fb8275d9f41e71a92f62d7ef9683a0f3142056c7a7f1.json rename to .sqlx/query-7f28bbe1b019307827f09047c78fa69b0db112ab1979b1cbd85fa5fecfef6d82.json index 79e250c..b3f49ce 100644 --- a/.sqlx/query-ad24179585077f0acc42fb8275d9f41e71a92f62d7ef9683a0f3142056c7a7f1.json +++ b/.sqlx/query-7f28bbe1b019307827f09047c78fa69b0db112ab1979b1cbd85fa5fecfef6d82.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(HEIGHT)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n user_command_info AS (\n SELECT DISTINCT\n ON (uca.block_id, uca.id, uca.sequence_no) uca.id,\n uca.command_type AS \"command_type: UserCommandType\",\n uca.fee_payer_id,\n uca.source_id,\n uca.receiver_id,\n uca.nonce,\n uca.amount,\n uca.fee,\n uca.valid_until,\n uca.memo,\n uca.hash,\n uca.block_id,\n uca.sequence_no,\n uca.status AS \"status: TransactionStatus\",\n uca.failure_reason,\n b.state_hash,\n b.chain_status AS \"chain_status: ChainStatus\",\n b.height\n FROM\n user_commands_aggregated AS uca\n INNER JOIN public_keys AS pk ON uca.fee_payer_id=pk.id\n OR (\n uca.status='applied'\n AND (\n uca.source_id=pk.id\n OR uca.receiver_id=pk.id\n )\n )\n INNER JOIN blocks AS b ON uca.block_id=b.id\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=uca.hash\n OR $2 IS NULL\n )\n AND (\n $3=pk.value\n OR $3 IS NULL\n )\n AND (\n $4=''\n OR $4 IS NULL\n )\n AND (\n $5=uca.status\n OR $5 IS NULL\n )\n AND (\n $6=uca.status\n OR $6 IS NULL\n )\n AND (\n $7=pk.value\n OR $7 IS NULL\n )\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n user_command_info\n )\nSELECT\n u.*,\n id_count.total_count,\n pk_payer.value AS fee_payer,\n pk_source.value AS source,\n pk_receiver.value AS receiver,\n ac.creation_fee AS \"creation_fee?\"\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n user_command_info\n ORDER BY\n block_id,\n id,\n sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS u\n INNER JOIN public_keys AS pk_payer ON u.fee_payer_id=pk_payer.id\n INNER JOIN public_keys AS pk_source ON u.source_id=pk_source.id\n INNER JOIN public_keys AS pk_receiver ON u.receiver_id=pk_receiver.id\n /* Account creation fees are attributed to the first successful command in the\n block that mentions the account with the following LEFT JOINs */\n LEFT JOIN account_identifiers AS ai_receiver ON u.receiver_id=ai_receiver.public_key_id\n LEFT JOIN accounts_created AS ac ON u.block_id=ac.block_id\n AND ai_receiver.id=ac.account_identifier_id\n AND u.\"status: TransactionStatus\"='applied'\n AND u.sequence_no=(\n SELECT\n least(\n (\n SELECT\n min(bic2.sequence_no)\n FROM\n blocks_internal_commands AS bic2\n INNER JOIN internal_commands AS ic2 ON bic2.internal_command_id=ic2.id\n WHERE\n u.receiver_id=ic2.receiver_id\n AND bic2.block_id=u.block_id\n AND bic2.status='applied'\n ),\n (\n SELECT\n min(buc2.sequence_no)\n FROM\n blocks_user_commands AS buc2\n INNER JOIN user_commands AS uc2 ON buc2.user_command_id=uc2.id\n WHERE\n u.receiver_id=uc2.receiver_id\n AND buc2.block_id=u.block_id\n AND buc2.status='applied'\n )\n )\n )\nORDER BY\n u.block_id,\n u.id,\n u.sequence_no\n", + "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(HEIGHT)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n user_command_info AS (\n SELECT DISTINCT\n ON (uca.block_id, uca.id, uca.sequence_no) uca.id,\n uca.command_type AS \"command_type: UserCommandType\",\n uca.fee_payer_id,\n uca.source_id,\n uca.receiver_id,\n uca.nonce,\n uca.amount,\n uca.fee,\n uca.valid_until,\n uca.memo,\n uca.hash,\n uca.block_id,\n uca.sequence_no,\n uca.status AS \"status: TransactionStatus\",\n uca.failure_reason,\n b.state_hash,\n b.chain_status AS \"chain_status: ChainStatus\",\n b.height,\n b.timestamp\n FROM\n user_commands_aggregated AS uca\n INNER JOIN public_keys AS pk ON uca.fee_payer_id=pk.id\n OR (\n uca.status='applied'\n AND (\n uca.source_id=pk.id\n OR uca.receiver_id=pk.id\n )\n )\n INNER JOIN blocks AS b ON uca.block_id=b.id\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=uca.hash\n OR $2 IS NULL\n )\n AND (\n $3=pk.value\n OR $3 IS NULL\n )\n AND (\n $4=''\n OR $4 IS NULL\n )\n AND (\n $5=uca.status\n OR $5 IS NULL\n )\n AND (\n $6=uca.status\n OR $6 IS NULL\n )\n AND (\n $7=pk.value\n OR $7 IS NULL\n )\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n user_command_info\n )\nSELECT\n u.*,\n id_count.total_count,\n pk_payer.value AS fee_payer,\n pk_source.value AS source,\n pk_receiver.value AS receiver,\n ac.creation_fee AS \"creation_fee?\"\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n user_command_info\n ORDER BY\n block_id,\n id,\n sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS u\n INNER JOIN public_keys AS pk_payer ON u.fee_payer_id=pk_payer.id\n INNER JOIN public_keys AS pk_source ON u.source_id=pk_source.id\n INNER JOIN public_keys AS pk_receiver ON u.receiver_id=pk_receiver.id\n /* Account creation fees are attributed to the first successful command in the\n block that mentions the account with the following LEFT JOINs */\n LEFT JOIN account_identifiers AS ai_receiver ON u.receiver_id=ai_receiver.public_key_id\n LEFT JOIN accounts_created AS ac ON u.block_id=ac.block_id\n AND ai_receiver.id=ac.account_identifier_id\n AND u.\"status: TransactionStatus\"='applied'\n AND u.sequence_no=(\n SELECT\n least(\n (\n SELECT\n min(bic2.sequence_no)\n FROM\n blocks_internal_commands AS bic2\n INNER JOIN internal_commands AS ic2 ON bic2.internal_command_id=ic2.id\n WHERE\n u.receiver_id=ic2.receiver_id\n AND bic2.block_id=u.block_id\n AND bic2.status='applied'\n ),\n (\n SELECT\n min(buc2.sequence_no)\n FROM\n blocks_user_commands AS buc2\n INNER JOIN user_commands AS uc2 ON buc2.user_command_id=uc2.id\n WHERE\n u.receiver_id=uc2.receiver_id\n AND buc2.block_id=u.block_id\n AND buc2.status='applied'\n )\n )\n )\nORDER BY\n u.block_id,\n u.id,\n u.sequence_no\n", "describe": { "columns": [ { @@ -126,26 +126,31 @@ }, { "ordinal": 18, + "name": "timestamp", + "type_info": "Text" + }, + { + "ordinal": 19, "name": "total_count", "type_info": "Int8" }, { - "ordinal": 19, + "ordinal": 20, "name": "fee_payer", "type_info": "Text" }, { - "ordinal": 20, + "ordinal": 21, "name": "source", "type_info": "Text" }, { - "ordinal": 21, + "ordinal": 22, "name": "receiver", "type_info": "Text" }, { - "ordinal": 22, + "ordinal": 23, "name": "creation_fee?", "type_info": "Text" } @@ -203,11 +208,12 @@ null, null, null, + null, false, false, false, false ] }, - "hash": "ad24179585077f0acc42fb8275d9f41e71a92f62d7ef9683a0f3142056c7a7f1" + "hash": "7f28bbe1b019307827f09047c78fa69b0db112ab1979b1cbd85fa5fecfef6d82" } diff --git a/.sqlx/query-b060c16dd0800f47632051a04106fa9675d842510ca206e8e32066423eacb79e.json b/.sqlx/query-aab8301ed951ec5ebb6e2b6756df0380c10a7888182363340090a2153cfaf1a7.json similarity index 61% rename from .sqlx/query-b060c16dd0800f47632051a04106fa9675d842510ca206e8e32066423eacb79e.json rename to .sqlx/query-aab8301ed951ec5ebb6e2b6756df0380c10a7888182363340090a2153cfaf1a7.json index b6c203d..8137206 100644 --- a/.sqlx/query-b060c16dd0800f47632051a04106fa9675d842510ca206e8e32066423eacb79e.json +++ b/.sqlx/query-aab8301ed951ec5ebb6e2b6756df0380c10a7888182363340090a2153cfaf1a7.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "SELECT\n zc.id,\n zc.memo,\n zc.hash,\n pk_fee_payer.value AS fee_payer,\n zfpb.fee,\n zfpb.valid_until,\n zfpb.nonce,\n bzc.sequence_no,\n bzc.status AS \"status: TransactionStatus\",\n b.state_hash,\n b.height,\n bzc.block_id,\n cast(0 AS BIGINT) AS total_count,\n ARRAY(\n SELECT\n unnest(zauf.failures)\n FROM\n zkapp_account_update_failures AS zauf\n WHERE\n zauf.id=ANY (bzc.failure_reasons_ids)\n ) AS failure_reasons,\n zaub.balance_change AS \"balance_change?\",\n pk_update_body.value AS \"pk_update_body?\",\n token_update_body.value AS \"token?\"\nFROM\n blocks_zkapp_commands AS bzc\n INNER JOIN zkapp_commands AS zc ON bzc.zkapp_command_id=zc.id\n INNER JOIN zkapp_fee_payer_body AS zfpb ON zc.zkapp_fee_payer_body_id=zfpb.id\n INNER JOIN public_keys AS pk_fee_payer ON zfpb.public_key_id=pk_fee_payer.id\n INNER JOIN blocks AS b ON bzc.block_id=b.id\n LEFT JOIN zkapp_account_update AS zau ON zau.id=ANY (zc.zkapp_account_updates_ids)\n LEFT JOIN zkapp_account_update_body AS zaub ON zau.body_id=zaub.id\n LEFT JOIN account_identifiers AS ai_update_body ON zaub.account_identifier_id=ai_update_body.id\n LEFT JOIN public_keys AS pk_update_body ON ai_update_body.public_key_id=pk_update_body.id\n LEFT JOIN tokens AS token_update_body ON ai_update_body.token_id=token_update_body.id\nWHERE\n bzc.block_id=$1\n AND (\n token_update_body.value=$2\n OR token_update_body.id IS NULL\n )\nORDER BY\n zc.id,\n bzc.sequence_no\n", + "query": "SELECT\n zc.id,\n zc.memo,\n zc.hash,\n pk_fee_payer.value AS fee_payer,\n zfpb.fee,\n zfpb.valid_until,\n zfpb.nonce,\n bzc.sequence_no,\n bzc.status AS \"status: TransactionStatus\",\n b.state_hash,\n b.height,\n b.timestamp,\n bzc.block_id,\n cast(0 AS BIGINT) AS total_count,\n ARRAY(\n SELECT\n unnest(zauf.failures)\n FROM\n zkapp_account_update_failures AS zauf\n WHERE\n zauf.id=ANY (bzc.failure_reasons_ids)\n ) AS failure_reasons,\n zaub.balance_change AS \"balance_change?\",\n pk_update_body.value AS \"pk_update_body?\",\n token_update_body.value AS \"token?\"\nFROM\n blocks_zkapp_commands AS bzc\n INNER JOIN zkapp_commands AS zc ON bzc.zkapp_command_id=zc.id\n INNER JOIN zkapp_fee_payer_body AS zfpb ON zc.zkapp_fee_payer_body_id=zfpb.id\n INNER JOIN public_keys AS pk_fee_payer ON zfpb.public_key_id=pk_fee_payer.id\n INNER JOIN blocks AS b ON bzc.block_id=b.id\n LEFT JOIN zkapp_account_update AS zau ON zau.id=ANY (zc.zkapp_account_updates_ids)\n LEFT JOIN zkapp_account_update_body AS zaub ON zau.body_id=zaub.id\n LEFT JOIN account_identifiers AS ai_update_body ON zaub.account_identifier_id=ai_update_body.id\n LEFT JOIN public_keys AS pk_update_body ON ai_update_body.public_key_id=pk_update_body.id\n LEFT JOIN tokens AS token_update_body ON ai_update_body.token_id=token_update_body.id\nWHERE\n bzc.block_id=$1\n AND (\n token_update_body.value=$2\n OR token_update_body.id IS NULL\n )\nORDER BY\n zc.id,\n bzc.sequence_no\n", "describe": { "columns": [ { @@ -70,31 +70,36 @@ }, { "ordinal": 11, + "name": "timestamp", + "type_info": "Text" + }, + { + "ordinal": 12, "name": "block_id", "type_info": "Int4" }, { - "ordinal": 12, + "ordinal": 13, "name": "total_count", "type_info": "Int8" }, { - "ordinal": 13, + "ordinal": 14, "name": "failure_reasons", "type_info": "TextArray" }, { - "ordinal": 14, + "ordinal": 15, "name": "balance_change?", "type_info": "Text" }, { - "ordinal": 15, + "ordinal": 16, "name": "pk_update_body?", "type_info": "Text" }, { - "ordinal": 16, + "ordinal": 17, "name": "token?", "type_info": "Text" } @@ -118,6 +123,7 @@ false, false, false, + false, null, null, false, @@ -125,5 +131,5 @@ false ] }, - "hash": "b060c16dd0800f47632051a04106fa9675d842510ca206e8e32066423eacb79e" + "hash": "aab8301ed951ec5ebb6e2b6756df0380c10a7888182363340090a2153cfaf1a7" } diff --git a/.sqlx/query-5c8655d59873f5cd56675a8bc064d84584f910c85ecf3bc260ee8afeb566dcad.json b/.sqlx/query-d86fcbf6ba111af8d334e34ad6c1f027441b745ecd6859c78fb226593d8ed88c.json similarity index 62% rename from .sqlx/query-5c8655d59873f5cd56675a8bc064d84584f910c85ecf3bc260ee8afeb566dcad.json rename to .sqlx/query-d86fcbf6ba111af8d334e34ad6c1f027441b745ecd6859c78fb226593d8ed88c.json index fb6fa51..55d1457 100644 --- a/.sqlx/query-5c8655d59873f5cd56675a8bc064d84584f910c85ecf3bc260ee8afeb566dcad.json +++ b/.sqlx/query-d86fcbf6ba111af8d334e34ad6c1f027441b745ecd6859c78fb226593d8ed88c.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(HEIGHT)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n user_command_info AS (\n SELECT DISTINCT\n ON (\n buc.block_id,\n buc.user_command_id,\n buc.sequence_no\n ) u.id,\n u.command_type AS \"command_type: UserCommandType\",\n u.fee_payer_id,\n u.source_id,\n u.receiver_id,\n u.nonce,\n u.amount,\n u.fee,\n u.valid_until,\n u.memo,\n u.hash,\n buc.block_id,\n buc.sequence_no,\n buc.status AS \"status: TransactionStatus\",\n buc.failure_reason,\n b.state_hash,\n b.chain_status AS \"chain_status: ChainStatus\",\n b.height\n FROM\n user_commands AS u\n INNER JOIN blocks_user_commands AS buc ON u.id=buc.user_command_id\n INNER JOIN public_keys AS pk ON u.fee_payer_id=pk.id\n OR (\n buc.status='applied'\n AND (\n u.source_id=pk.id\n OR u.receiver_id=pk.id\n )\n )\n INNER JOIN blocks AS b ON buc.block_id=b.id\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=u.hash\n OR $2 IS NULL\n )\n AND (\n $3=pk.value\n OR $3 IS NULL\n )\n AND (\n $4=''\n OR $4 IS NULL\n )\n AND (\n $5=buc.status\n OR $5 IS NULL\n )\n AND (\n $6=buc.status\n OR $6 IS NULL\n )\n AND (\n $7=pk.value\n OR $7 IS NULL\n )\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n user_command_info\n )\nSELECT\n u.*,\n id_count.total_count,\n pk_payer.value AS fee_payer,\n pk_source.value AS source,\n pk_receiver.value AS receiver,\n ac.creation_fee AS \"creation_fee?\"\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n user_command_info\n ORDER BY\n block_id,\n id,\n sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS u\n INNER JOIN public_keys AS pk_payer ON u.fee_payer_id=pk_payer.id\n INNER JOIN public_keys AS pk_source ON u.source_id=pk_source.id\n INNER JOIN public_keys AS pk_receiver ON u.receiver_id=pk_receiver.id\n /* Account creation fees are attributed to the first successful command in the\n block that mentions the account with the following LEFT JOINs */\n LEFT JOIN account_identifiers AS ai_receiver ON u.receiver_id=ai_receiver.public_key_id\n LEFT JOIN accounts_created AS ac ON u.block_id=ac.block_id\n AND ai_receiver.id=ac.account_identifier_id\n AND u.\"status: TransactionStatus\"='applied'\n AND u.sequence_no=(\n SELECT\n least(\n (\n SELECT\n min(bic2.sequence_no)\n FROM\n blocks_internal_commands AS bic2\n INNER JOIN internal_commands AS ic2 ON bic2.internal_command_id=ic2.id\n WHERE\n u.receiver_id=ic2.receiver_id\n AND bic2.block_id=u.block_id\n AND bic2.status='applied'\n ),\n (\n SELECT\n min(buc2.sequence_no)\n FROM\n blocks_user_commands AS buc2\n INNER JOIN user_commands AS uc2 ON buc2.user_command_id=uc2.id\n WHERE\n u.receiver_id=uc2.receiver_id\n AND buc2.block_id=u.block_id\n AND buc2.status='applied'\n )\n )\n )\nORDER BY\n u.block_id,\n u.id,\n u.sequence_no\n", + "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(HEIGHT)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n user_command_info AS (\n SELECT DISTINCT\n ON (\n buc.block_id,\n buc.user_command_id,\n buc.sequence_no\n ) u.id,\n u.command_type AS \"command_type: UserCommandType\",\n u.fee_payer_id,\n u.source_id,\n u.receiver_id,\n u.nonce,\n u.amount,\n u.fee,\n u.valid_until,\n u.memo,\n u.hash,\n buc.block_id,\n buc.sequence_no,\n buc.status AS \"status: TransactionStatus\",\n buc.failure_reason,\n b.state_hash,\n b.chain_status AS \"chain_status: ChainStatus\",\n b.height,\n b.timestamp\n FROM\n user_commands AS u\n INNER JOIN blocks_user_commands AS buc ON u.id=buc.user_command_id\n INNER JOIN public_keys AS pk ON u.fee_payer_id=pk.id\n OR (\n buc.status='applied'\n AND (\n u.source_id=pk.id\n OR u.receiver_id=pk.id\n )\n )\n INNER JOIN blocks AS b ON buc.block_id=b.id\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=u.hash\n OR $2 IS NULL\n )\n AND (\n $3=pk.value\n OR $3 IS NULL\n )\n AND (\n $4=''\n OR $4 IS NULL\n )\n AND (\n $5=buc.status\n OR $5 IS NULL\n )\n AND (\n $6=buc.status\n OR $6 IS NULL\n )\n AND (\n $7=pk.value\n OR $7 IS NULL\n )\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n user_command_info\n )\nSELECT\n u.*,\n id_count.total_count,\n pk_payer.value AS fee_payer,\n pk_source.value AS source,\n pk_receiver.value AS receiver,\n ac.creation_fee AS \"creation_fee?\"\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n user_command_info\n ORDER BY\n block_id,\n id,\n sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS u\n INNER JOIN public_keys AS pk_payer ON u.fee_payer_id=pk_payer.id\n INNER JOIN public_keys AS pk_source ON u.source_id=pk_source.id\n INNER JOIN public_keys AS pk_receiver ON u.receiver_id=pk_receiver.id\n /* Account creation fees are attributed to the first successful command in the\n block that mentions the account with the following LEFT JOINs */\n LEFT JOIN account_identifiers AS ai_receiver ON u.receiver_id=ai_receiver.public_key_id\n LEFT JOIN accounts_created AS ac ON u.block_id=ac.block_id\n AND ai_receiver.id=ac.account_identifier_id\n AND u.\"status: TransactionStatus\"='applied'\n AND u.sequence_no=(\n SELECT\n least(\n (\n SELECT\n min(bic2.sequence_no)\n FROM\n blocks_internal_commands AS bic2\n INNER JOIN internal_commands AS ic2 ON bic2.internal_command_id=ic2.id\n WHERE\n u.receiver_id=ic2.receiver_id\n AND bic2.block_id=u.block_id\n AND bic2.status='applied'\n ),\n (\n SELECT\n min(buc2.sequence_no)\n FROM\n blocks_user_commands AS buc2\n INNER JOIN user_commands AS uc2 ON buc2.user_command_id=uc2.id\n WHERE\n u.receiver_id=uc2.receiver_id\n AND buc2.block_id=u.block_id\n AND buc2.status='applied'\n )\n )\n )\nORDER BY\n u.block_id,\n u.id,\n u.sequence_no\n", "describe": { "columns": [ { @@ -126,26 +126,31 @@ }, { "ordinal": 18, + "name": "timestamp", + "type_info": "Text" + }, + { + "ordinal": 19, "name": "total_count", "type_info": "Int8" }, { - "ordinal": 19, + "ordinal": 20, "name": "fee_payer", "type_info": "Text" }, { - "ordinal": 20, + "ordinal": 21, "name": "source", "type_info": "Text" }, { - "ordinal": 21, + "ordinal": 22, "name": "receiver", "type_info": "Text" }, { - "ordinal": 22, + "ordinal": 23, "name": "creation_fee?", "type_info": "Text" } @@ -203,11 +208,12 @@ null, null, null, + null, false, false, false, false ] }, - "hash": "5c8655d59873f5cd56675a8bc064d84584f910c85ecf3bc260ee8afeb566dcad" + "hash": "d86fcbf6ba111af8d334e34ad6c1f027441b745ecd6859c78fb226593d8ed88c" } From 60df902ce87e409d17dfed160b95c08f39e3130b Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Thu, 9 Jan 2025 10:45:08 +0100 Subject: [PATCH 09/10] dprint --- .github/workflows/checks.yaml | 5 ++++- sql/migrations/apply_search_tx_optimizations.sql | 11 ++++------- sql/queries/indexer_internal_commands.sql | 2 +- sql/queries/indexer_internal_commands_optimized.sql | 2 +- sql/queries/indexer_user_commands.sql | 2 +- sql/queries/indexer_user_commands_optimized.sql | 2 +- sql/queries/indexer_zkapp_commands.sql | 2 +- sql/queries/indexer_zkapp_commands_optimized.sql | 2 +- sql/queries/max_canonical_height.sql | 2 +- sql/queries/maybe_block.sql | 4 ++-- sql/queries/oldest_block.sql | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 7a7311e..467cade 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -79,9 +79,12 @@ jobs: with: path: ~/.npm key: ${{ runner.os }}-dprint - - run: npm i -g sql-formatter + - run: npm i -g sql-formatter@15.4.9 - uses: actions/checkout@v4 - uses: dprint/check@v2.2 + with: + config-path: dprint.jsonc + dprint-version: 0.47.2 cspell: runs-on: ubuntu-latest diff --git a/sql/migrations/apply_search_tx_optimizations.sql b/sql/migrations/apply_search_tx_optimizations.sql index 5d476b7..28da397 100644 --- a/sql/migrations/apply_search_tx_optimizations.sql +++ b/sql/migrations/apply_search_tx_optimizations.sql @@ -65,8 +65,7 @@ FROM -- NEXT -- -- Create the trigger function to insert a new row into user_commands_aggregated -CREATE -OR REPLACE function add_to_user_commands_aggregated () returns trigger AS $$ +CREATE OR REPLACE FUNCTION add_to_user_commands_aggregated () returns trigger AS $$ BEGIN -- Insert a new row into user_commands_aggregated only if the corresponding entry doesn't already exist INSERT INTO user_commands_aggregated ( @@ -116,7 +115,7 @@ $$ language plpgsql; -- NEXT -- -- Create the trigger that fires after each insert into blocks_user_commands CREATE -OR REPLACE trigger trigger_add_to_user_commands_aggregated +OR replace trigger trigger_add_to_user_commands_aggregated AFTER insert ON blocks_user_commands FOR each ROW EXECUTE function add_to_user_commands_aggregated (); @@ -172,8 +171,7 @@ FROM -- NEXT -- -- Create the trigger function to insert a new row into internal_commands_aggregated -CREATE -OR REPLACE function add_to_internal_commands_aggregated () returns trigger AS $$ +CREATE OR REPLACE FUNCTION add_to_internal_commands_aggregated () returns trigger AS $$ BEGIN -- Insert a new row into internal_commands_aggregated only if the corresponding entry doesn't already exist INSERT INTO internal_commands_aggregated ( @@ -273,8 +271,7 @@ FROM -- NEXT -- -- Create the trigger function to insert a new row into zkapp_commands_aggregated -CREATE -OR REPLACE function add_to_zkapp_commands_aggregated () returns trigger AS $$ +CREATE OR REPLACE FUNCTION add_to_zkapp_commands_aggregated () returns trigger AS $$ BEGIN -- Insert a new row into zkapp_commands_aggregated only if the corresponding entry doesn't already exist INSERT INTO zkapp_commands_aggregated ( diff --git a/sql/queries/indexer_internal_commands.sql b/sql/queries/indexer_internal_commands.sql index 75c8197..0e8e135 100644 --- a/sql/queries/indexer_internal_commands.sql +++ b/sql/queries/indexer_internal_commands.sql @@ -15,7 +15,7 @@ WITH b.chain_status='pending' AND b.height>( SELECT - max(HEIGHT) + max(height) FROM blocks WHERE diff --git a/sql/queries/indexer_internal_commands_optimized.sql b/sql/queries/indexer_internal_commands_optimized.sql index a1b4a40..3415d3a 100644 --- a/sql/queries/indexer_internal_commands_optimized.sql +++ b/sql/queries/indexer_internal_commands_optimized.sql @@ -15,7 +15,7 @@ WITH b.chain_status='pending' AND b.height>( SELECT - max(HEIGHT) + max(height) FROM blocks WHERE diff --git a/sql/queries/indexer_user_commands.sql b/sql/queries/indexer_user_commands.sql index e3db629..e158abd 100644 --- a/sql/queries/indexer_user_commands.sql +++ b/sql/queries/indexer_user_commands.sql @@ -15,7 +15,7 @@ WITH b.chain_status='pending' AND b.height>( SELECT - max(HEIGHT) + max(height) FROM blocks WHERE diff --git a/sql/queries/indexer_user_commands_optimized.sql b/sql/queries/indexer_user_commands_optimized.sql index e41860e..5d421c3 100644 --- a/sql/queries/indexer_user_commands_optimized.sql +++ b/sql/queries/indexer_user_commands_optimized.sql @@ -15,7 +15,7 @@ WITH b.chain_status='pending' AND b.height>( SELECT - max(HEIGHT) + max(height) FROM blocks WHERE diff --git a/sql/queries/indexer_zkapp_commands.sql b/sql/queries/indexer_zkapp_commands.sql index f4c47b1..4a0fe13 100644 --- a/sql/queries/indexer_zkapp_commands.sql +++ b/sql/queries/indexer_zkapp_commands.sql @@ -15,7 +15,7 @@ WITH b.chain_status='pending' AND b.height>( SELECT - max(HEIGHT) + max(height) FROM blocks WHERE diff --git a/sql/queries/indexer_zkapp_commands_optimized.sql b/sql/queries/indexer_zkapp_commands_optimized.sql index 7ace9d0..84d4549 100644 --- a/sql/queries/indexer_zkapp_commands_optimized.sql +++ b/sql/queries/indexer_zkapp_commands_optimized.sql @@ -15,7 +15,7 @@ WITH b.chain_status='pending' AND b.height>( SELECT - max(HEIGHT) + max(height) FROM blocks WHERE diff --git a/sql/queries/max_canonical_height.sql b/sql/queries/max_canonical_height.sql index 73d352f..c39ee5f 100644 --- a/sql/queries/max_canonical_height.sql +++ b/sql/queries/max_canonical_height.sql @@ -1,5 +1,5 @@ SELECT - max(HEIGHT) AS max_canonical_height + max(height) AS max_canonical_height FROM blocks WHERE diff --git a/sql/queries/maybe_block.sql b/sql/queries/maybe_block.sql index 88e6895..8046b90 100644 --- a/sql/queries/maybe_block.sql +++ b/sql/queries/maybe_block.sql @@ -1,9 +1,9 @@ SELECT - HEIGHT, + height, state_hash, global_slot_since_genesis FROM blocks WHERE - HEIGHT=$1 + height=$1 AND chain_status='canonical' diff --git a/sql/queries/oldest_block.sql b/sql/queries/oldest_block.sql index 8e168fe..d8a349d 100644 --- a/sql/queries/oldest_block.sql +++ b/sql/queries/oldest_block.sql @@ -1,5 +1,5 @@ SELECT - HEIGHT, + height, state_hash FROM blocks From 39b4605bf3556b00ea6bc8d2c6e039265494a894 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Thu, 9 Jan 2025 11:58:58 +0100 Subject: [PATCH 10/10] query cache --- ...936939ec7921e6b5e94106fbcbb53d876cf9ffad52447e78554a.json} | 4 ++-- ...4d63d70685016aaac75c413f3febabc55756947569a0deca682d.json} | 4 ++-- ...c5ca77081d2c96333084a0cbce0b1ae09ede9ae81a9dc7b36934.json} | 4 ++-- ...e2ba70c6e65ac76113325d9ebcbbeea4cff381d523e59842992d.json} | 4 ++-- ...2ae0c587ae7b43bee6d974b8d3127c32a0597bdb88c87f8fe729.json} | 4 ++-- ...e7d7e4bd61dd764d965b1235006198d6ffc44e1434feac59ba30.json} | 4 ++-- ...f582598e68d8ff7db357a2eccb16c97139707aac82b933d26e25.json} | 4 ++-- ...05372760248ec81e8602d2a8a43c0cc68808bcfda26ac6c31307.json} | 4 ++-- ...d0198927691360f34bb1648353e6a99cba3eec3afa5eafe597e5.json} | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) rename .sqlx/{query-76f72d89a71d495d377c194cef07b96369948cf852eec22158ed4913e6bdf0bd.json => query-3601e8af9794936939ec7921e6b5e94106fbcbb53d876cf9ffad52447e78554a.json} (71%) rename .sqlx/{query-fda48eb6a90782b38509d0e30117413d4d2f8c882833a43f890277632c68c099.json => query-760fca5322ac4d63d70685016aaac75c413f3febabc55756947569a0deca682d.json} (68%) rename .sqlx/{query-d86fcbf6ba111af8d334e34ad6c1f027441b745ecd6859c78fb226593d8ed88c.json => query-761e52b4502ec5ca77081d2c96333084a0cbce0b1ae09ede9ae81a9dc7b36934.json} (98%) rename .sqlx/{query-faa85708c63428d8b8261bf16541c4f6585fab71dcdcb1e5c498bfa048a77bdd.json => query-97c4d63829c1e2ba70c6e65ac76113325d9ebcbbeea4cff381d523e59842992d.json} (74%) rename .sqlx/{query-5695a638fa66b02ec960bf45e28c8c44b505756f63231b994b31c8c031d42127.json => query-9f74f18bd2592ae0c587ae7b43bee6d974b8d3127c32a0597bdb88c87f8fe729.json} (97%) rename .sqlx/{query-7794550c764fae88ce5aec20b017de460fec098d8bae3febcbeeca30d06c22b3.json => query-a5568cb15d9de7d7e4bd61dd764d965b1235006198d6ffc44e1434feac59ba30.json} (98%) rename .sqlx/{query-25ad7fc2ddc1cd7395d20ad6bdb0eff7be2108305fe3f0b3bd50fcb258b9b6cd.json => query-ad7f934e69e9f582598e68d8ff7db357a2eccb16c97139707aac82b933d26e25.json} (97%) rename .sqlx/{query-58476887071cd3eb5dd5a0ad328ffbb72784b503ca4494e55fa797f377f3670a.json => query-b74e42007a9a05372760248ec81e8602d2a8a43c0cc68808bcfda26ac6c31307.json} (98%) rename .sqlx/{query-7f28bbe1b019307827f09047c78fa69b0db112ab1979b1cbd85fa5fecfef6d82.json => query-f0b050dcd151d0198927691360f34bb1648353e6a99cba3eec3afa5eafe597e5.json} (98%) diff --git a/.sqlx/query-76f72d89a71d495d377c194cef07b96369948cf852eec22158ed4913e6bdf0bd.json b/.sqlx/query-3601e8af9794936939ec7921e6b5e94106fbcbb53d876cf9ffad52447e78554a.json similarity index 71% rename from .sqlx/query-76f72d89a71d495d377c194cef07b96369948cf852eec22158ed4913e6bdf0bd.json rename to .sqlx/query-3601e8af9794936939ec7921e6b5e94106fbcbb53d876cf9ffad52447e78554a.json index 187c169..7197199 100644 --- a/.sqlx/query-76f72d89a71d495d377c194cef07b96369948cf852eec22158ed4913e6bdf0bd.json +++ b/.sqlx/query-3601e8af9794936939ec7921e6b5e94106fbcbb53d876cf9ffad52447e78554a.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "SELECT\n HEIGHT,\n state_hash,\n global_slot_since_genesis\nFROM\n blocks\nWHERE\n HEIGHT=$1\n AND chain_status='canonical'\n", + "query": "SELECT\n height,\n state_hash,\n global_slot_since_genesis\nFROM\n blocks\nWHERE\n height=$1\n AND chain_status='canonical'\n", "describe": { "columns": [ { @@ -30,5 +30,5 @@ false ] }, - "hash": "76f72d89a71d495d377c194cef07b96369948cf852eec22158ed4913e6bdf0bd" + "hash": "3601e8af9794936939ec7921e6b5e94106fbcbb53d876cf9ffad52447e78554a" } diff --git a/.sqlx/query-fda48eb6a90782b38509d0e30117413d4d2f8c882833a43f890277632c68c099.json b/.sqlx/query-760fca5322ac4d63d70685016aaac75c413f3febabc55756947569a0deca682d.json similarity index 68% rename from .sqlx/query-fda48eb6a90782b38509d0e30117413d4d2f8c882833a43f890277632c68c099.json rename to .sqlx/query-760fca5322ac4d63d70685016aaac75c413f3febabc55756947569a0deca682d.json index 771d537..42156ef 100644 --- a/.sqlx/query-fda48eb6a90782b38509d0e30117413d4d2f8c882833a43f890277632c68c099.json +++ b/.sqlx/query-760fca5322ac4d63d70685016aaac75c413f3febabc55756947569a0deca682d.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "SELECT\n max(HEIGHT) AS max_canonical_height\nFROM\n blocks\nWHERE\n chain_status='canonical'\n", + "query": "SELECT\n max(height) AS max_canonical_height\nFROM\n blocks\nWHERE\n chain_status='canonical'\n", "describe": { "columns": [ { @@ -16,5 +16,5 @@ null ] }, - "hash": "fda48eb6a90782b38509d0e30117413d4d2f8c882833a43f890277632c68c099" + "hash": "760fca5322ac4d63d70685016aaac75c413f3febabc55756947569a0deca682d" } diff --git a/.sqlx/query-d86fcbf6ba111af8d334e34ad6c1f027441b745ecd6859c78fb226593d8ed88c.json b/.sqlx/query-761e52b4502ec5ca77081d2c96333084a0cbce0b1ae09ede9ae81a9dc7b36934.json similarity index 98% rename from .sqlx/query-d86fcbf6ba111af8d334e34ad6c1f027441b745ecd6859c78fb226593d8ed88c.json rename to .sqlx/query-761e52b4502ec5ca77081d2c96333084a0cbce0b1ae09ede9ae81a9dc7b36934.json index 55d1457..c708daf 100644 --- a/.sqlx/query-d86fcbf6ba111af8d334e34ad6c1f027441b745ecd6859c78fb226593d8ed88c.json +++ b/.sqlx/query-761e52b4502ec5ca77081d2c96333084a0cbce0b1ae09ede9ae81a9dc7b36934.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(HEIGHT)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n user_command_info AS (\n SELECT DISTINCT\n ON (\n buc.block_id,\n buc.user_command_id,\n buc.sequence_no\n ) u.id,\n u.command_type AS \"command_type: UserCommandType\",\n u.fee_payer_id,\n u.source_id,\n u.receiver_id,\n u.nonce,\n u.amount,\n u.fee,\n u.valid_until,\n u.memo,\n u.hash,\n buc.block_id,\n buc.sequence_no,\n buc.status AS \"status: TransactionStatus\",\n buc.failure_reason,\n b.state_hash,\n b.chain_status AS \"chain_status: ChainStatus\",\n b.height,\n b.timestamp\n FROM\n user_commands AS u\n INNER JOIN blocks_user_commands AS buc ON u.id=buc.user_command_id\n INNER JOIN public_keys AS pk ON u.fee_payer_id=pk.id\n OR (\n buc.status='applied'\n AND (\n u.source_id=pk.id\n OR u.receiver_id=pk.id\n )\n )\n INNER JOIN blocks AS b ON buc.block_id=b.id\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=u.hash\n OR $2 IS NULL\n )\n AND (\n $3=pk.value\n OR $3 IS NULL\n )\n AND (\n $4=''\n OR $4 IS NULL\n )\n AND (\n $5=buc.status\n OR $5 IS NULL\n )\n AND (\n $6=buc.status\n OR $6 IS NULL\n )\n AND (\n $7=pk.value\n OR $7 IS NULL\n )\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n user_command_info\n )\nSELECT\n u.*,\n id_count.total_count,\n pk_payer.value AS fee_payer,\n pk_source.value AS source,\n pk_receiver.value AS receiver,\n ac.creation_fee AS \"creation_fee?\"\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n user_command_info\n ORDER BY\n block_id,\n id,\n sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS u\n INNER JOIN public_keys AS pk_payer ON u.fee_payer_id=pk_payer.id\n INNER JOIN public_keys AS pk_source ON u.source_id=pk_source.id\n INNER JOIN public_keys AS pk_receiver ON u.receiver_id=pk_receiver.id\n /* Account creation fees are attributed to the first successful command in the\n block that mentions the account with the following LEFT JOINs */\n LEFT JOIN account_identifiers AS ai_receiver ON u.receiver_id=ai_receiver.public_key_id\n LEFT JOIN accounts_created AS ac ON u.block_id=ac.block_id\n AND ai_receiver.id=ac.account_identifier_id\n AND u.\"status: TransactionStatus\"='applied'\n AND u.sequence_no=(\n SELECT\n least(\n (\n SELECT\n min(bic2.sequence_no)\n FROM\n blocks_internal_commands AS bic2\n INNER JOIN internal_commands AS ic2 ON bic2.internal_command_id=ic2.id\n WHERE\n u.receiver_id=ic2.receiver_id\n AND bic2.block_id=u.block_id\n AND bic2.status='applied'\n ),\n (\n SELECT\n min(buc2.sequence_no)\n FROM\n blocks_user_commands AS buc2\n INNER JOIN user_commands AS uc2 ON buc2.user_command_id=uc2.id\n WHERE\n u.receiver_id=uc2.receiver_id\n AND buc2.block_id=u.block_id\n AND buc2.status='applied'\n )\n )\n )\nORDER BY\n u.block_id,\n u.id,\n u.sequence_no\n", + "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(height)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n user_command_info AS (\n SELECT DISTINCT\n ON (\n buc.block_id,\n buc.user_command_id,\n buc.sequence_no\n ) u.id,\n u.command_type AS \"command_type: UserCommandType\",\n u.fee_payer_id,\n u.source_id,\n u.receiver_id,\n u.nonce,\n u.amount,\n u.fee,\n u.valid_until,\n u.memo,\n u.hash,\n buc.block_id,\n buc.sequence_no,\n buc.status AS \"status: TransactionStatus\",\n buc.failure_reason,\n b.state_hash,\n b.chain_status AS \"chain_status: ChainStatus\",\n b.height,\n b.timestamp\n FROM\n user_commands AS u\n INNER JOIN blocks_user_commands AS buc ON u.id=buc.user_command_id\n INNER JOIN public_keys AS pk ON u.fee_payer_id=pk.id\n OR (\n buc.status='applied'\n AND (\n u.source_id=pk.id\n OR u.receiver_id=pk.id\n )\n )\n INNER JOIN blocks AS b ON buc.block_id=b.id\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=u.hash\n OR $2 IS NULL\n )\n AND (\n $3=pk.value\n OR $3 IS NULL\n )\n AND (\n $4=''\n OR $4 IS NULL\n )\n AND (\n $5=buc.status\n OR $5 IS NULL\n )\n AND (\n $6=buc.status\n OR $6 IS NULL\n )\n AND (\n $7=pk.value\n OR $7 IS NULL\n )\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n user_command_info\n )\nSELECT\n u.*,\n id_count.total_count,\n pk_payer.value AS fee_payer,\n pk_source.value AS source,\n pk_receiver.value AS receiver,\n ac.creation_fee AS \"creation_fee?\"\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n user_command_info\n ORDER BY\n block_id,\n id,\n sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS u\n INNER JOIN public_keys AS pk_payer ON u.fee_payer_id=pk_payer.id\n INNER JOIN public_keys AS pk_source ON u.source_id=pk_source.id\n INNER JOIN public_keys AS pk_receiver ON u.receiver_id=pk_receiver.id\n /* Account creation fees are attributed to the first successful command in the\n block that mentions the account with the following LEFT JOINs */\n LEFT JOIN account_identifiers AS ai_receiver ON u.receiver_id=ai_receiver.public_key_id\n LEFT JOIN accounts_created AS ac ON u.block_id=ac.block_id\n AND ai_receiver.id=ac.account_identifier_id\n AND u.\"status: TransactionStatus\"='applied'\n AND u.sequence_no=(\n SELECT\n least(\n (\n SELECT\n min(bic2.sequence_no)\n FROM\n blocks_internal_commands AS bic2\n INNER JOIN internal_commands AS ic2 ON bic2.internal_command_id=ic2.id\n WHERE\n u.receiver_id=ic2.receiver_id\n AND bic2.block_id=u.block_id\n AND bic2.status='applied'\n ),\n (\n SELECT\n min(buc2.sequence_no)\n FROM\n blocks_user_commands AS buc2\n INNER JOIN user_commands AS uc2 ON buc2.user_command_id=uc2.id\n WHERE\n u.receiver_id=uc2.receiver_id\n AND buc2.block_id=u.block_id\n AND buc2.status='applied'\n )\n )\n )\nORDER BY\n u.block_id,\n u.id,\n u.sequence_no\n", "describe": { "columns": [ { @@ -215,5 +215,5 @@ false ] }, - "hash": "d86fcbf6ba111af8d334e34ad6c1f027441b745ecd6859c78fb226593d8ed88c" + "hash": "761e52b4502ec5ca77081d2c96333084a0cbce0b1ae09ede9ae81a9dc7b36934" } diff --git a/.sqlx/query-faa85708c63428d8b8261bf16541c4f6585fab71dcdcb1e5c498bfa048a77bdd.json b/.sqlx/query-97c4d63829c1e2ba70c6e65ac76113325d9ebcbbeea4cff381d523e59842992d.json similarity index 74% rename from .sqlx/query-faa85708c63428d8b8261bf16541c4f6585fab71dcdcb1e5c498bfa048a77bdd.json rename to .sqlx/query-97c4d63829c1e2ba70c6e65ac76113325d9ebcbbeea4cff381d523e59842992d.json index 61cd870..1d27140 100644 --- a/.sqlx/query-faa85708c63428d8b8261bf16541c4f6585fab71dcdcb1e5c498bfa048a77bdd.json +++ b/.sqlx/query-97c4d63829c1e2ba70c6e65ac76113325d9ebcbbeea4cff381d523e59842992d.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "SELECT\n HEIGHT,\n state_hash\nFROM\n blocks\nORDER BY\n TIMESTAMP ASC,\n state_hash ASC\nLIMIT\n 1\n", + "query": "SELECT\n height,\n state_hash\nFROM\n blocks\nORDER BY\n TIMESTAMP ASC,\n state_hash ASC\nLIMIT\n 1\n", "describe": { "columns": [ { @@ -22,5 +22,5 @@ false ] }, - "hash": "faa85708c63428d8b8261bf16541c4f6585fab71dcdcb1e5c498bfa048a77bdd" + "hash": "97c4d63829c1e2ba70c6e65ac76113325d9ebcbbeea4cff381d523e59842992d" } diff --git a/.sqlx/query-5695a638fa66b02ec960bf45e28c8c44b505756f63231b994b31c8c031d42127.json b/.sqlx/query-9f74f18bd2592ae0c587ae7b43bee6d974b8d3127c32a0597bdb88c87f8fe729.json similarity index 97% rename from .sqlx/query-5695a638fa66b02ec960bf45e28c8c44b505756f63231b994b31c8c031d42127.json rename to .sqlx/query-9f74f18bd2592ae0c587ae7b43bee6d974b8d3127c32a0597bdb88c87f8fe729.json index 7be6bb8..777b5b3 100644 --- a/.sqlx/query-5695a638fa66b02ec960bf45e28c8c44b505756f63231b994b31c8c031d42127.json +++ b/.sqlx/query-9f74f18bd2592ae0c587ae7b43bee6d974b8d3127c32a0597bdb88c87f8fe729.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(HEIGHT)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n zkapp_commands_info AS (\n SELECT\n zc.id,\n zc.memo,\n zc.hash,\n pk_fee_payer.value AS fee_payer,\n pk_update_body.value AS pk_update_body,\n zfpb.fee,\n zfpb.valid_until,\n zfpb.nonce,\n bzc.sequence_no,\n bzc.status AS \"status: TransactionStatus\",\n zaub.balance_change,\n bzc.block_id,\n b.state_hash,\n b.height,\n b.timestamp,\n token_update_body.value AS token,\n ARRAY(\n SELECT\n unnest(zauf.failures)\n FROM\n zkapp_account_update_failures AS zauf\n WHERE\n zauf.id=ANY (bzc.failure_reasons_ids)\n ) AS failure_reasons\n FROM\n zkapp_commands AS zc\n INNER JOIN blocks_zkapp_commands AS bzc ON zc.id=bzc.zkapp_command_id\n INNER JOIN zkapp_fee_payer_body AS zfpb ON zc.zkapp_fee_payer_body_id=zfpb.id\n INNER JOIN public_keys AS pk_fee_payer ON zfpb.public_key_id=pk_fee_payer.id\n INNER JOIN blocks AS b ON bzc.block_id=b.id\n LEFT JOIN zkapp_account_update AS zau ON zau.id=ANY (zc.zkapp_account_updates_ids)\n INNER JOIN zkapp_account_update_body AS zaub ON zau.body_id=zaub.id\n INNER JOIN account_identifiers AS ai_update_body ON zaub.account_identifier_id=ai_update_body.id\n INNER JOIN public_keys AS pk_update_body ON ai_update_body.public_key_id=pk_update_body.id\n INNER JOIN tokens AS token_update_body ON ai_update_body.token_id=token_update_body.id\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=zc.hash\n OR $2 IS NULL\n )\n AND (\n (\n (\n (\n $4=token_update_body.value\n AND (\n $3=pk_update_body.value\n OR $3=pk_fee_payer.value\n )\n )\n )\n AND $3 IS NOT NULL\n AND $4 IS NOT NULL\n )\n OR (\n (\n $3=pk_fee_payer.value\n OR $3=pk_update_body.value\n )\n AND $3 IS NOT NULL\n AND $4 IS NULL\n )\n OR (\n $3 IS NULL\n AND $4 IS NULL\n )\n )\n AND (\n $5=bzc.status\n OR $5 IS NULL\n )\n AND (\n $6=bzc.status\n OR $6 IS NULL\n )\n AND (\n (\n $7=pk_fee_payer.value\n OR $7=pk_update_body.value\n )\n OR $7 IS NULL\n )\n ),\n zkapp_commands_ids AS (\n SELECT DISTINCT\n id,\n block_id,\n sequence_no\n FROM\n zkapp_commands_info\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n zkapp_commands_ids\n )\nSELECT\n zc.*,\n id_count.total_count\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n zkapp_commands_ids\n ORDER BY\n block_id,\n id,\n sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS ids\n INNER JOIN zkapp_commands_info AS zc ON ids.id=zc.id\n AND ids.block_id=zc.block_id\n AND ids.sequence_no=zc.sequence_no\nORDER BY\n ids.block_id,\n ids.id,\n ids.sequence_no,\n zc.balance_change\n", + "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(height)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n zkapp_commands_info AS (\n SELECT\n zc.id,\n zc.memo,\n zc.hash,\n pk_fee_payer.value AS fee_payer,\n pk_update_body.value AS pk_update_body,\n zfpb.fee,\n zfpb.valid_until,\n zfpb.nonce,\n bzc.sequence_no,\n bzc.status AS \"status: TransactionStatus\",\n zaub.balance_change,\n bzc.block_id,\n b.state_hash,\n b.height,\n b.timestamp,\n token_update_body.value AS token,\n ARRAY(\n SELECT\n unnest(zauf.failures)\n FROM\n zkapp_account_update_failures AS zauf\n WHERE\n zauf.id=ANY (bzc.failure_reasons_ids)\n ) AS failure_reasons\n FROM\n zkapp_commands AS zc\n INNER JOIN blocks_zkapp_commands AS bzc ON zc.id=bzc.zkapp_command_id\n INNER JOIN zkapp_fee_payer_body AS zfpb ON zc.zkapp_fee_payer_body_id=zfpb.id\n INNER JOIN public_keys AS pk_fee_payer ON zfpb.public_key_id=pk_fee_payer.id\n INNER JOIN blocks AS b ON bzc.block_id=b.id\n LEFT JOIN zkapp_account_update AS zau ON zau.id=ANY (zc.zkapp_account_updates_ids)\n INNER JOIN zkapp_account_update_body AS zaub ON zau.body_id=zaub.id\n INNER JOIN account_identifiers AS ai_update_body ON zaub.account_identifier_id=ai_update_body.id\n INNER JOIN public_keys AS pk_update_body ON ai_update_body.public_key_id=pk_update_body.id\n INNER JOIN tokens AS token_update_body ON ai_update_body.token_id=token_update_body.id\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=zc.hash\n OR $2 IS NULL\n )\n AND (\n (\n (\n (\n $4=token_update_body.value\n AND (\n $3=pk_update_body.value\n OR $3=pk_fee_payer.value\n )\n )\n )\n AND $3 IS NOT NULL\n AND $4 IS NOT NULL\n )\n OR (\n (\n $3=pk_fee_payer.value\n OR $3=pk_update_body.value\n )\n AND $3 IS NOT NULL\n AND $4 IS NULL\n )\n OR (\n $3 IS NULL\n AND $4 IS NULL\n )\n )\n AND (\n $5=bzc.status\n OR $5 IS NULL\n )\n AND (\n $6=bzc.status\n OR $6 IS NULL\n )\n AND (\n (\n $7=pk_fee_payer.value\n OR $7=pk_update_body.value\n )\n OR $7 IS NULL\n )\n ),\n zkapp_commands_ids AS (\n SELECT DISTINCT\n id,\n block_id,\n sequence_no\n FROM\n zkapp_commands_info\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n zkapp_commands_ids\n )\nSELECT\n zc.*,\n id_count.total_count\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n zkapp_commands_ids\n ORDER BY\n block_id,\n id,\n sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS ids\n INNER JOIN zkapp_commands_info AS zc ON ids.id=zc.id\n AND ids.block_id=zc.block_id\n AND ids.sequence_no=zc.sequence_no\nORDER BY\n ids.block_id,\n ids.id,\n ids.sequence_no,\n zc.balance_change\n", "describe": { "columns": [ { @@ -158,5 +158,5 @@ null ] }, - "hash": "5695a638fa66b02ec960bf45e28c8c44b505756f63231b994b31c8c031d42127" + "hash": "9f74f18bd2592ae0c587ae7b43bee6d974b8d3127c32a0597bdb88c87f8fe729" } diff --git a/.sqlx/query-7794550c764fae88ce5aec20b017de460fec098d8bae3febcbeeca30d06c22b3.json b/.sqlx/query-a5568cb15d9de7d7e4bd61dd764d965b1235006198d6ffc44e1434feac59ba30.json similarity index 98% rename from .sqlx/query-7794550c764fae88ce5aec20b017de460fec098d8bae3febcbeeca30d06c22b3.json rename to .sqlx/query-a5568cb15d9de7d7e4bd61dd764d965b1235006198d6ffc44e1434feac59ba30.json index cb7fd29..3345117 100644 --- a/.sqlx/query-7794550c764fae88ce5aec20b017de460fec098d8bae3febcbeeca30d06c22b3.json +++ b/.sqlx/query-a5568cb15d9de7d7e4bd61dd764d965b1235006198d6ffc44e1434feac59ba30.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(HEIGHT)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n coinbase_receiver_info AS (\n SELECT\n bic.block_id,\n bic.internal_command_id,\n bic.sequence_no,\n bic.secondary_sequence_no,\n coinbase_receiver_pk.value AS coinbase_receiver\n FROM\n blocks_internal_commands AS bic\n INNER JOIN internal_commands AS ic ON bic.internal_command_id=ic.id\n INNER JOIN blocks_internal_commands AS bic_coinbase_receiver ON bic.block_id=bic_coinbase_receiver.block_id\n AND (\n bic.internal_command_id<>bic_coinbase_receiver.internal_command_id\n OR bic.sequence_no<>bic_coinbase_receiver.sequence_no\n OR bic.secondary_sequence_no<>bic_coinbase_receiver.secondary_sequence_no\n )\n INNER JOIN internal_commands AS ic_coinbase_receiver ON ic.command_type='fee_transfer_via_coinbase'\n AND ic_coinbase_receiver.command_type='coinbase'\n AND bic_coinbase_receiver.internal_command_id=ic_coinbase_receiver.id\n INNER JOIN public_keys AS coinbase_receiver_pk ON ic_coinbase_receiver.receiver_id=coinbase_receiver_pk.id\n ),\n internal_commands_info AS (\n SELECT DISTINCT\n ON (\n bic.block_id,\n bic.internal_command_id,\n bic.sequence_no,\n bic.secondary_sequence_no\n ) i.id,\n i.command_type AS \"command_type: InternalCommandType\",\n i.receiver_id,\n i.fee,\n i.hash,\n pk.value AS receiver,\n cri.coinbase_receiver AS \"coinbase_receiver?\",\n bic.sequence_no,\n bic.secondary_sequence_no,\n bic.block_id,\n bic.status AS \"status: TransactionStatus\",\n b.state_hash,\n b.height,\n b.timestamp\n FROM\n internal_commands AS i\n INNER JOIN blocks_internal_commands AS bic ON i.id=bic.internal_command_id\n INNER JOIN public_keys AS pk ON i.receiver_id=pk.id\n INNER JOIN blocks AS b ON bic.block_id=b.id\n LEFT JOIN coinbase_receiver_info AS cri ON bic.block_id=cri.block_id\n AND bic.internal_command_id=cri.internal_command_id\n AND bic.sequence_no=cri.sequence_no\n AND bic.secondary_sequence_no=cri.secondary_sequence_no\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=i.hash\n OR $2 IS NULL\n )\n AND (\n (\n (\n $3=pk.value\n OR $3=cri.coinbase_receiver\n )\n OR $3 IS NULL\n )\n )\n AND (\n $4=''\n OR $4 IS NULL\n )\n AND (\n $5=bic.status\n OR $5 IS NULL\n )\n AND (\n $6=bic.status\n OR $6 IS NULL\n )\n AND (\n (\n $7=pk.value\n OR $7=cri.coinbase_receiver\n )\n OR $7 IS NULL\n )\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n internal_commands_info\n )\nSELECT\n i.*,\n id_count.total_count,\n ac.creation_fee AS \"creation_fee?\"\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n internal_commands_info\n ORDER BY\n block_id,\n id,\n sequence_no,\n secondary_sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS i\n LEFT JOIN account_identifiers AS ai ON i.receiver_id=ai.public_key_id\n LEFT JOIN accounts_created AS ac ON ai.id=ac.account_identifier_id\n AND i.block_id=ac.block_id\n AND i.sequence_no=(\n SELECT\n least(\n (\n SELECT\n min(bic2.sequence_no)\n FROM\n blocks_internal_commands AS bic2\n INNER JOIN internal_commands AS ic2 ON bic2.internal_command_id=ic2.id\n WHERE\n i.receiver_id=ic2.receiver_id\n AND bic2.block_id=i.block_id\n AND bic2.status='applied'\n ),\n (\n SELECT\n min(buc2.sequence_no)\n FROM\n blocks_user_commands AS buc2\n INNER JOIN user_commands AS uc2 ON buc2.user_command_id=uc2.id\n WHERE\n i.receiver_id=uc2.receiver_id\n AND buc2.block_id=i.block_id\n AND buc2.status='applied'\n )\n )\n )\nORDER BY\n i.block_id,\n i.id,\n i.sequence_no,\n i.secondary_sequence_no\n", + "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(height)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n coinbase_receiver_info AS (\n SELECT\n bic.block_id,\n bic.internal_command_id,\n bic.sequence_no,\n bic.secondary_sequence_no,\n coinbase_receiver_pk.value AS coinbase_receiver\n FROM\n blocks_internal_commands AS bic\n INNER JOIN internal_commands AS ic ON bic.internal_command_id=ic.id\n INNER JOIN blocks_internal_commands AS bic_coinbase_receiver ON bic.block_id=bic_coinbase_receiver.block_id\n AND (\n bic.internal_command_id<>bic_coinbase_receiver.internal_command_id\n OR bic.sequence_no<>bic_coinbase_receiver.sequence_no\n OR bic.secondary_sequence_no<>bic_coinbase_receiver.secondary_sequence_no\n )\n INNER JOIN internal_commands AS ic_coinbase_receiver ON ic.command_type='fee_transfer_via_coinbase'\n AND ic_coinbase_receiver.command_type='coinbase'\n AND bic_coinbase_receiver.internal_command_id=ic_coinbase_receiver.id\n INNER JOIN public_keys AS coinbase_receiver_pk ON ic_coinbase_receiver.receiver_id=coinbase_receiver_pk.id\n ),\n internal_commands_info AS (\n SELECT DISTINCT\n ON (\n bic.block_id,\n bic.internal_command_id,\n bic.sequence_no,\n bic.secondary_sequence_no\n ) i.id,\n i.command_type AS \"command_type: InternalCommandType\",\n i.receiver_id,\n i.fee,\n i.hash,\n pk.value AS receiver,\n cri.coinbase_receiver AS \"coinbase_receiver?\",\n bic.sequence_no,\n bic.secondary_sequence_no,\n bic.block_id,\n bic.status AS \"status: TransactionStatus\",\n b.state_hash,\n b.height,\n b.timestamp\n FROM\n internal_commands AS i\n INNER JOIN blocks_internal_commands AS bic ON i.id=bic.internal_command_id\n INNER JOIN public_keys AS pk ON i.receiver_id=pk.id\n INNER JOIN blocks AS b ON bic.block_id=b.id\n LEFT JOIN coinbase_receiver_info AS cri ON bic.block_id=cri.block_id\n AND bic.internal_command_id=cri.internal_command_id\n AND bic.sequence_no=cri.sequence_no\n AND bic.secondary_sequence_no=cri.secondary_sequence_no\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=i.hash\n OR $2 IS NULL\n )\n AND (\n (\n (\n $3=pk.value\n OR $3=cri.coinbase_receiver\n )\n OR $3 IS NULL\n )\n )\n AND (\n $4=''\n OR $4 IS NULL\n )\n AND (\n $5=bic.status\n OR $5 IS NULL\n )\n AND (\n $6=bic.status\n OR $6 IS NULL\n )\n AND (\n (\n $7=pk.value\n OR $7=cri.coinbase_receiver\n )\n OR $7 IS NULL\n )\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n internal_commands_info\n )\nSELECT\n i.*,\n id_count.total_count,\n ac.creation_fee AS \"creation_fee?\"\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n internal_commands_info\n ORDER BY\n block_id,\n id,\n sequence_no,\n secondary_sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS i\n LEFT JOIN account_identifiers AS ai ON i.receiver_id=ai.public_key_id\n LEFT JOIN accounts_created AS ac ON ai.id=ac.account_identifier_id\n AND i.block_id=ac.block_id\n AND i.sequence_no=(\n SELECT\n least(\n (\n SELECT\n min(bic2.sequence_no)\n FROM\n blocks_internal_commands AS bic2\n INNER JOIN internal_commands AS ic2 ON bic2.internal_command_id=ic2.id\n WHERE\n i.receiver_id=ic2.receiver_id\n AND bic2.block_id=i.block_id\n AND bic2.status='applied'\n ),\n (\n SELECT\n min(buc2.sequence_no)\n FROM\n blocks_user_commands AS buc2\n INNER JOIN user_commands AS uc2 ON buc2.user_command_id=uc2.id\n WHERE\n i.receiver_id=uc2.receiver_id\n AND buc2.block_id=i.block_id\n AND buc2.status='applied'\n )\n )\n )\nORDER BY\n i.block_id,\n i.id,\n i.sequence_no,\n i.secondary_sequence_no\n", "describe": { "columns": [ { @@ -157,5 +157,5 @@ false ] }, - "hash": "7794550c764fae88ce5aec20b017de460fec098d8bae3febcbeeca30d06c22b3" + "hash": "a5568cb15d9de7d7e4bd61dd764d965b1235006198d6ffc44e1434feac59ba30" } diff --git a/.sqlx/query-25ad7fc2ddc1cd7395d20ad6bdb0eff7be2108305fe3f0b3bd50fcb258b9b6cd.json b/.sqlx/query-ad7f934e69e9f582598e68d8ff7db357a2eccb16c97139707aac82b933d26e25.json similarity index 97% rename from .sqlx/query-25ad7fc2ddc1cd7395d20ad6bdb0eff7be2108305fe3f0b3bd50fcb258b9b6cd.json rename to .sqlx/query-ad7f934e69e9f582598e68d8ff7db357a2eccb16c97139707aac82b933d26e25.json index 4938789..8506927 100644 --- a/.sqlx/query-25ad7fc2ddc1cd7395d20ad6bdb0eff7be2108305fe3f0b3bd50fcb258b9b6cd.json +++ b/.sqlx/query-ad7f934e69e9f582598e68d8ff7db357a2eccb16c97139707aac82b933d26e25.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(HEIGHT)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n zkapp_commands_info AS (\n SELECT\n zca.id,\n zca.memo,\n zca.hash,\n zca.fee_payer,\n pk_update_body.value AS pk_update_body,\n zca.fee,\n zca.valid_until,\n zca.nonce,\n zca.sequence_no,\n zca.status AS \"status: TransactionStatus\",\n zaub.balance_change,\n zca.block_id,\n b.state_hash,\n b.height,\n b.timestamp,\n token_update_body.value AS token,\n ARRAY(\n SELECT\n unnest(zauf.failures)\n FROM\n zkapp_account_update_failures AS zauf\n WHERE\n zauf.id=ANY (zca.failure_reasons_ids)\n ) AS failure_reasons\n FROM\n zkapp_commands_aggregated AS zca\n INNER JOIN blocks AS b ON zca.block_id=b.id\n LEFT JOIN zkapp_account_update AS zau ON zau.id=ANY (zca.zkapp_account_updates_ids)\n INNER JOIN zkapp_account_update_body AS zaub ON zau.body_id=zaub.id\n INNER JOIN account_identifiers AS ai_update_body ON zaub.account_identifier_id=ai_update_body.id\n INNER JOIN public_keys AS pk_update_body ON ai_update_body.public_key_id=pk_update_body.id\n INNER JOIN tokens AS token_update_body ON ai_update_body.token_id=token_update_body.id\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=zca.hash\n OR $2 IS NULL\n )\n AND (\n (\n (\n $4=token_update_body.value\n AND (\n $3=pk_update_body.value\n OR $3=zca.fee_payer\n )\n )\n AND $3 IS NOT NULL\n AND $4 IS NOT NULL\n )\n OR (\n (\n $3=zca.fee_payer\n OR $3=pk_update_body.value\n )\n AND $3 IS NOT NULL\n AND $4 IS NULL\n )\n OR (\n $3 IS NULL\n AND $4 IS NULL\n )\n )\n AND (\n $5=zca.status\n OR $5 IS NULL\n )\n AND (\n $6=zca.status\n OR $6 IS NULL\n )\n AND (\n (\n $7=zca.fee_payer\n OR $7=pk_update_body.value\n )\n OR $7 IS NULL\n )\n ),\n zkapp_commands_ids AS (\n SELECT DISTINCT\n id,\n block_id,\n sequence_no\n FROM\n zkapp_commands_info\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n zkapp_commands_ids\n )\nSELECT\n zc.*,\n id_count.total_count\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n zkapp_commands_ids\n ORDER BY\n block_id,\n id,\n sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS ids\n INNER JOIN zkapp_commands_info AS zc ON ids.id=zc.id\n AND ids.block_id=zc.block_id\n AND ids.sequence_no=zc.sequence_no\nORDER BY\n ids.block_id,\n ids.id,\n ids.sequence_no,\n zc.balance_change\n", + "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(height)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n zkapp_commands_info AS (\n SELECT\n zca.id,\n zca.memo,\n zca.hash,\n zca.fee_payer,\n pk_update_body.value AS pk_update_body,\n zca.fee,\n zca.valid_until,\n zca.nonce,\n zca.sequence_no,\n zca.status AS \"status: TransactionStatus\",\n zaub.balance_change,\n zca.block_id,\n b.state_hash,\n b.height,\n b.timestamp,\n token_update_body.value AS token,\n ARRAY(\n SELECT\n unnest(zauf.failures)\n FROM\n zkapp_account_update_failures AS zauf\n WHERE\n zauf.id=ANY (zca.failure_reasons_ids)\n ) AS failure_reasons\n FROM\n zkapp_commands_aggregated AS zca\n INNER JOIN blocks AS b ON zca.block_id=b.id\n LEFT JOIN zkapp_account_update AS zau ON zau.id=ANY (zca.zkapp_account_updates_ids)\n INNER JOIN zkapp_account_update_body AS zaub ON zau.body_id=zaub.id\n INNER JOIN account_identifiers AS ai_update_body ON zaub.account_identifier_id=ai_update_body.id\n INNER JOIN public_keys AS pk_update_body ON ai_update_body.public_key_id=pk_update_body.id\n INNER JOIN tokens AS token_update_body ON ai_update_body.token_id=token_update_body.id\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=zca.hash\n OR $2 IS NULL\n )\n AND (\n (\n (\n $4=token_update_body.value\n AND (\n $3=pk_update_body.value\n OR $3=zca.fee_payer\n )\n )\n AND $3 IS NOT NULL\n AND $4 IS NOT NULL\n )\n OR (\n (\n $3=zca.fee_payer\n OR $3=pk_update_body.value\n )\n AND $3 IS NOT NULL\n AND $4 IS NULL\n )\n OR (\n $3 IS NULL\n AND $4 IS NULL\n )\n )\n AND (\n $5=zca.status\n OR $5 IS NULL\n )\n AND (\n $6=zca.status\n OR $6 IS NULL\n )\n AND (\n (\n $7=zca.fee_payer\n OR $7=pk_update_body.value\n )\n OR $7 IS NULL\n )\n ),\n zkapp_commands_ids AS (\n SELECT DISTINCT\n id,\n block_id,\n sequence_no\n FROM\n zkapp_commands_info\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n zkapp_commands_ids\n )\nSELECT\n zc.*,\n id_count.total_count\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n zkapp_commands_ids\n ORDER BY\n block_id,\n id,\n sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS ids\n INNER JOIN zkapp_commands_info AS zc ON ids.id=zc.id\n AND ids.block_id=zc.block_id\n AND ids.sequence_no=zc.sequence_no\nORDER BY\n ids.block_id,\n ids.id,\n ids.sequence_no,\n zc.balance_change\n", "describe": { "columns": [ { @@ -158,5 +158,5 @@ null ] }, - "hash": "25ad7fc2ddc1cd7395d20ad6bdb0eff7be2108305fe3f0b3bd50fcb258b9b6cd" + "hash": "ad7f934e69e9f582598e68d8ff7db357a2eccb16c97139707aac82b933d26e25" } diff --git a/.sqlx/query-58476887071cd3eb5dd5a0ad328ffbb72784b503ca4494e55fa797f377f3670a.json b/.sqlx/query-b74e42007a9a05372760248ec81e8602d2a8a43c0cc68808bcfda26ac6c31307.json similarity index 98% rename from .sqlx/query-58476887071cd3eb5dd5a0ad328ffbb72784b503ca4494e55fa797f377f3670a.json rename to .sqlx/query-b74e42007a9a05372760248ec81e8602d2a8a43c0cc68808bcfda26ac6c31307.json index d2c5871..2cb998a 100644 --- a/.sqlx/query-58476887071cd3eb5dd5a0ad328ffbb72784b503ca4494e55fa797f377f3670a.json +++ b/.sqlx/query-b74e42007a9a05372760248ec81e8602d2a8a43c0cc68808bcfda26ac6c31307.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(HEIGHT)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n coinbase_receiver_info AS (\n SELECT\n bic.block_id,\n bic.internal_command_id,\n bic.sequence_no,\n bic.secondary_sequence_no,\n coinbase_receiver_pk.value AS coinbase_receiver\n FROM\n blocks_internal_commands AS bic\n INNER JOIN internal_commands AS ic ON bic.internal_command_id=ic.id\n INNER JOIN blocks_internal_commands AS bic_coinbase_receiver ON bic.block_id=bic_coinbase_receiver.block_id\n AND (\n bic.internal_command_id<>bic_coinbase_receiver.internal_command_id\n OR bic.sequence_no<>bic_coinbase_receiver.sequence_no\n OR bic.secondary_sequence_no<>bic_coinbase_receiver.secondary_sequence_no\n )\n INNER JOIN internal_commands AS ic_coinbase_receiver ON ic.command_type='fee_transfer_via_coinbase'\n AND ic_coinbase_receiver.command_type='coinbase'\n AND bic_coinbase_receiver.internal_command_id=ic_coinbase_receiver.id\n INNER JOIN public_keys AS coinbase_receiver_pk ON ic_coinbase_receiver.receiver_id=coinbase_receiver_pk.id\n ),\n internal_commands_info AS (\n SELECT DISTINCT\n ON (\n ica.block_id,\n ica.id,\n ica.sequence_no,\n ica.secondary_sequence_no\n ) ica.id,\n ica.command_type AS \"command_type: InternalCommandType\",\n ica.receiver_id,\n ica.fee,\n ica.hash,\n ica.receiver AS receiver,\n cri.coinbase_receiver AS \"coinbase_receiver?\",\n ica.sequence_no,\n ica.secondary_sequence_no,\n ica.block_id,\n ica.status AS \"status: TransactionStatus\",\n b.state_hash,\n b.height,\n b.timestamp\n FROM\n internal_commands_aggregated AS ica\n INNER JOIN blocks AS b ON ica.block_id=b.id\n LEFT JOIN coinbase_receiver_info AS cri ON ica.block_id=cri.block_id\n AND ica.id=cri.internal_command_id\n AND ica.sequence_no=cri.sequence_no\n AND ica.secondary_sequence_no=cri.secondary_sequence_no\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=ica.hash\n OR $2 IS NULL\n )\n AND (\n (\n (\n $3=ica.receiver\n OR $3=cri.coinbase_receiver\n )\n OR $3 IS NULL\n )\n )\n AND (\n $4=''\n OR $4 IS NULL\n )\n AND (\n $5=ica.status\n OR $5 IS NULL\n )\n AND (\n $6=ica.status\n OR $6 IS NULL\n )\n AND (\n (\n $7=ica.receiver\n OR $7=cri.coinbase_receiver\n )\n OR $7 IS NULL\n )\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n internal_commands_info\n )\nSELECT\n i.*,\n id_count.total_count,\n ac.creation_fee AS \"creation_fee?\"\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n internal_commands_info\n ORDER BY\n block_id,\n id,\n sequence_no,\n secondary_sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS i\n LEFT JOIN account_identifiers AS ai ON i.receiver_id=ai.public_key_id\n LEFT JOIN accounts_created AS ac ON ai.id=ac.account_identifier_id\n AND i.block_id=ac.block_id\n AND i.sequence_no=(\n SELECT\n least(\n (\n SELECT\n min(bic2.sequence_no)\n FROM\n blocks_internal_commands AS bic2\n INNER JOIN internal_commands AS ic2 ON bic2.internal_command_id=ic2.id\n WHERE\n i.receiver_id=ic2.receiver_id\n AND bic2.block_id=i.block_id\n AND bic2.status='applied'\n ),\n (\n SELECT\n min(buc2.sequence_no)\n FROM\n blocks_user_commands AS buc2\n INNER JOIN user_commands AS uc2 ON buc2.user_command_id=uc2.id\n WHERE\n i.receiver_id=uc2.receiver_id\n AND buc2.block_id=i.block_id\n AND buc2.status='applied'\n )\n )\n )\nORDER BY\n i.block_id,\n i.id,\n i.sequence_no,\n i.secondary_sequence_no\n", + "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(height)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n coinbase_receiver_info AS (\n SELECT\n bic.block_id,\n bic.internal_command_id,\n bic.sequence_no,\n bic.secondary_sequence_no,\n coinbase_receiver_pk.value AS coinbase_receiver\n FROM\n blocks_internal_commands AS bic\n INNER JOIN internal_commands AS ic ON bic.internal_command_id=ic.id\n INNER JOIN blocks_internal_commands AS bic_coinbase_receiver ON bic.block_id=bic_coinbase_receiver.block_id\n AND (\n bic.internal_command_id<>bic_coinbase_receiver.internal_command_id\n OR bic.sequence_no<>bic_coinbase_receiver.sequence_no\n OR bic.secondary_sequence_no<>bic_coinbase_receiver.secondary_sequence_no\n )\n INNER JOIN internal_commands AS ic_coinbase_receiver ON ic.command_type='fee_transfer_via_coinbase'\n AND ic_coinbase_receiver.command_type='coinbase'\n AND bic_coinbase_receiver.internal_command_id=ic_coinbase_receiver.id\n INNER JOIN public_keys AS coinbase_receiver_pk ON ic_coinbase_receiver.receiver_id=coinbase_receiver_pk.id\n ),\n internal_commands_info AS (\n SELECT DISTINCT\n ON (\n ica.block_id,\n ica.id,\n ica.sequence_no,\n ica.secondary_sequence_no\n ) ica.id,\n ica.command_type AS \"command_type: InternalCommandType\",\n ica.receiver_id,\n ica.fee,\n ica.hash,\n ica.receiver AS receiver,\n cri.coinbase_receiver AS \"coinbase_receiver?\",\n ica.sequence_no,\n ica.secondary_sequence_no,\n ica.block_id,\n ica.status AS \"status: TransactionStatus\",\n b.state_hash,\n b.height,\n b.timestamp\n FROM\n internal_commands_aggregated AS ica\n INNER JOIN blocks AS b ON ica.block_id=b.id\n LEFT JOIN coinbase_receiver_info AS cri ON ica.block_id=cri.block_id\n AND ica.id=cri.internal_command_id\n AND ica.sequence_no=cri.sequence_no\n AND ica.secondary_sequence_no=cri.secondary_sequence_no\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=ica.hash\n OR $2 IS NULL\n )\n AND (\n (\n (\n $3=ica.receiver\n OR $3=cri.coinbase_receiver\n )\n OR $3 IS NULL\n )\n )\n AND (\n $4=''\n OR $4 IS NULL\n )\n AND (\n $5=ica.status\n OR $5 IS NULL\n )\n AND (\n $6=ica.status\n OR $6 IS NULL\n )\n AND (\n (\n $7=ica.receiver\n OR $7=cri.coinbase_receiver\n )\n OR $7 IS NULL\n )\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n internal_commands_info\n )\nSELECT\n i.*,\n id_count.total_count,\n ac.creation_fee AS \"creation_fee?\"\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n internal_commands_info\n ORDER BY\n block_id,\n id,\n sequence_no,\n secondary_sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS i\n LEFT JOIN account_identifiers AS ai ON i.receiver_id=ai.public_key_id\n LEFT JOIN accounts_created AS ac ON ai.id=ac.account_identifier_id\n AND i.block_id=ac.block_id\n AND i.sequence_no=(\n SELECT\n least(\n (\n SELECT\n min(bic2.sequence_no)\n FROM\n blocks_internal_commands AS bic2\n INNER JOIN internal_commands AS ic2 ON bic2.internal_command_id=ic2.id\n WHERE\n i.receiver_id=ic2.receiver_id\n AND bic2.block_id=i.block_id\n AND bic2.status='applied'\n ),\n (\n SELECT\n min(buc2.sequence_no)\n FROM\n blocks_user_commands AS buc2\n INNER JOIN user_commands AS uc2 ON buc2.user_command_id=uc2.id\n WHERE\n i.receiver_id=uc2.receiver_id\n AND buc2.block_id=i.block_id\n AND buc2.status='applied'\n )\n )\n )\nORDER BY\n i.block_id,\n i.id,\n i.sequence_no,\n i.secondary_sequence_no\n", "describe": { "columns": [ { @@ -157,5 +157,5 @@ false ] }, - "hash": "58476887071cd3eb5dd5a0ad328ffbb72784b503ca4494e55fa797f377f3670a" + "hash": "b74e42007a9a05372760248ec81e8602d2a8a43c0cc68808bcfda26ac6c31307" } diff --git a/.sqlx/query-7f28bbe1b019307827f09047c78fa69b0db112ab1979b1cbd85fa5fecfef6d82.json b/.sqlx/query-f0b050dcd151d0198927691360f34bb1648353e6a99cba3eec3afa5eafe597e5.json similarity index 98% rename from .sqlx/query-7f28bbe1b019307827f09047c78fa69b0db112ab1979b1cbd85fa5fecfef6d82.json rename to .sqlx/query-f0b050dcd151d0198927691360f34bb1648353e6a99cba3eec3afa5eafe597e5.json index b3f49ce..c7c421a 100644 --- a/.sqlx/query-7f28bbe1b019307827f09047c78fa69b0db112ab1979b1cbd85fa5fecfef6d82.json +++ b/.sqlx/query-f0b050dcd151d0198927691360f34bb1648353e6a99cba3eec3afa5eafe597e5.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(HEIGHT)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n user_command_info AS (\n SELECT DISTINCT\n ON (uca.block_id, uca.id, uca.sequence_no) uca.id,\n uca.command_type AS \"command_type: UserCommandType\",\n uca.fee_payer_id,\n uca.source_id,\n uca.receiver_id,\n uca.nonce,\n uca.amount,\n uca.fee,\n uca.valid_until,\n uca.memo,\n uca.hash,\n uca.block_id,\n uca.sequence_no,\n uca.status AS \"status: TransactionStatus\",\n uca.failure_reason,\n b.state_hash,\n b.chain_status AS \"chain_status: ChainStatus\",\n b.height,\n b.timestamp\n FROM\n user_commands_aggregated AS uca\n INNER JOIN public_keys AS pk ON uca.fee_payer_id=pk.id\n OR (\n uca.status='applied'\n AND (\n uca.source_id=pk.id\n OR uca.receiver_id=pk.id\n )\n )\n INNER JOIN blocks AS b ON uca.block_id=b.id\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=uca.hash\n OR $2 IS NULL\n )\n AND (\n $3=pk.value\n OR $3 IS NULL\n )\n AND (\n $4=''\n OR $4 IS NULL\n )\n AND (\n $5=uca.status\n OR $5 IS NULL\n )\n AND (\n $6=uca.status\n OR $6 IS NULL\n )\n AND (\n $7=pk.value\n OR $7 IS NULL\n )\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n user_command_info\n )\nSELECT\n u.*,\n id_count.total_count,\n pk_payer.value AS fee_payer,\n pk_source.value AS source,\n pk_receiver.value AS receiver,\n ac.creation_fee AS \"creation_fee?\"\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n user_command_info\n ORDER BY\n block_id,\n id,\n sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS u\n INNER JOIN public_keys AS pk_payer ON u.fee_payer_id=pk_payer.id\n INNER JOIN public_keys AS pk_source ON u.source_id=pk_source.id\n INNER JOIN public_keys AS pk_receiver ON u.receiver_id=pk_receiver.id\n /* Account creation fees are attributed to the first successful command in the\n block that mentions the account with the following LEFT JOINs */\n LEFT JOIN account_identifiers AS ai_receiver ON u.receiver_id=ai_receiver.public_key_id\n LEFT JOIN accounts_created AS ac ON u.block_id=ac.block_id\n AND ai_receiver.id=ac.account_identifier_id\n AND u.\"status: TransactionStatus\"='applied'\n AND u.sequence_no=(\n SELECT\n least(\n (\n SELECT\n min(bic2.sequence_no)\n FROM\n blocks_internal_commands AS bic2\n INNER JOIN internal_commands AS ic2 ON bic2.internal_command_id=ic2.id\n WHERE\n u.receiver_id=ic2.receiver_id\n AND bic2.block_id=u.block_id\n AND bic2.status='applied'\n ),\n (\n SELECT\n min(buc2.sequence_no)\n FROM\n blocks_user_commands AS buc2\n INNER JOIN user_commands AS uc2 ON buc2.user_command_id=uc2.id\n WHERE\n u.receiver_id=uc2.receiver_id\n AND buc2.block_id=u.block_id\n AND buc2.status='applied'\n )\n )\n )\nORDER BY\n u.block_id,\n u.id,\n u.sequence_no\n", + "query": "WITH\n blocks AS (\n SELECT\n *\n FROM\n blocks\n WHERE\n chain_status='canonical'\n UNION ALL\n SELECT\n *\n FROM\n blocks AS b\n WHERE\n b.chain_status='pending'\n AND b.height>(\n SELECT\n max(height)\n FROM\n blocks\n WHERE\n chain_status='canonical'\n )\n ),\n user_command_info AS (\n SELECT DISTINCT\n ON (uca.block_id, uca.id, uca.sequence_no) uca.id,\n uca.command_type AS \"command_type: UserCommandType\",\n uca.fee_payer_id,\n uca.source_id,\n uca.receiver_id,\n uca.nonce,\n uca.amount,\n uca.fee,\n uca.valid_until,\n uca.memo,\n uca.hash,\n uca.block_id,\n uca.sequence_no,\n uca.status AS \"status: TransactionStatus\",\n uca.failure_reason,\n b.state_hash,\n b.chain_status AS \"chain_status: ChainStatus\",\n b.height,\n b.timestamp\n FROM\n user_commands_aggregated AS uca\n INNER JOIN public_keys AS pk ON uca.fee_payer_id=pk.id\n OR (\n uca.status='applied'\n AND (\n uca.source_id=pk.id\n OR uca.receiver_id=pk.id\n )\n )\n INNER JOIN blocks AS b ON uca.block_id=b.id\n WHERE\n (\n $1>=b.height\n OR $1 IS NULL\n )\n AND (\n $2=uca.hash\n OR $2 IS NULL\n )\n AND (\n $3=pk.value\n OR $3 IS NULL\n )\n AND (\n $4=''\n OR $4 IS NULL\n )\n AND (\n $5=uca.status\n OR $5 IS NULL\n )\n AND (\n $6=uca.status\n OR $6 IS NULL\n )\n AND (\n $7=pk.value\n OR $7 IS NULL\n )\n ),\n id_count AS (\n SELECT\n count(*) AS total_count\n FROM\n user_command_info\n )\nSELECT\n u.*,\n id_count.total_count,\n pk_payer.value AS fee_payer,\n pk_source.value AS source,\n pk_receiver.value AS receiver,\n ac.creation_fee AS \"creation_fee?\"\nFROM\n id_count,\n (\n SELECT\n *\n FROM\n user_command_info\n ORDER BY\n block_id,\n id,\n sequence_no\n LIMIT\n $8\n OFFSET\n $9\n ) AS u\n INNER JOIN public_keys AS pk_payer ON u.fee_payer_id=pk_payer.id\n INNER JOIN public_keys AS pk_source ON u.source_id=pk_source.id\n INNER JOIN public_keys AS pk_receiver ON u.receiver_id=pk_receiver.id\n /* Account creation fees are attributed to the first successful command in the\n block that mentions the account with the following LEFT JOINs */\n LEFT JOIN account_identifiers AS ai_receiver ON u.receiver_id=ai_receiver.public_key_id\n LEFT JOIN accounts_created AS ac ON u.block_id=ac.block_id\n AND ai_receiver.id=ac.account_identifier_id\n AND u.\"status: TransactionStatus\"='applied'\n AND u.sequence_no=(\n SELECT\n least(\n (\n SELECT\n min(bic2.sequence_no)\n FROM\n blocks_internal_commands AS bic2\n INNER JOIN internal_commands AS ic2 ON bic2.internal_command_id=ic2.id\n WHERE\n u.receiver_id=ic2.receiver_id\n AND bic2.block_id=u.block_id\n AND bic2.status='applied'\n ),\n (\n SELECT\n min(buc2.sequence_no)\n FROM\n blocks_user_commands AS buc2\n INNER JOIN user_commands AS uc2 ON buc2.user_command_id=uc2.id\n WHERE\n u.receiver_id=uc2.receiver_id\n AND buc2.block_id=u.block_id\n AND buc2.status='applied'\n )\n )\n )\nORDER BY\n u.block_id,\n u.id,\n u.sequence_no\n", "describe": { "columns": [ { @@ -215,5 +215,5 @@ false ] }, - "hash": "7f28bbe1b019307827f09047c78fa69b0db112ab1979b1cbd85fa5fecfef6d82" + "hash": "f0b050dcd151d0198927691360f34bb1648353e6a99cba3eec3afa5eafe597e5" }