From cf5a215665cbf0aa7aabdf0540c7ce07e04da1f7 Mon Sep 17 00:00:00 2001 From: FlowMemory HQ Agent Date: Thu, 14 May 2026 13:42:30 -0500 Subject: [PATCH] Add production L1 protocol implementation snapshot --- crates/flowmemory-devnet/src/cli.rs | 90 +- crates/flowmemory-devnet/src/lib.rs | 23 +- crates/flowmemory-devnet/src/model.rs | 1706 +++++ .../flowmemory-devnet/tests/devnet_tests.rs | 281 + ...owchain-private-local-protocol-contract.md | 45 + .../BRIDGE_PROTOCOL_SPEC.md | 46 + .../production-l1-protocol/CHECKLIST.md | 44 + .../production-l1-protocol/EXPERIMENTS.md | 31 + .../production-l1-protocol/GENESIS_PROOF.md | 29 + .../production-l1-protocol/HANDOFF.md | 75 + .../LIVE_L1_PROTOCOL_CONFORMANCE.md | 77 + .../production-l1-protocol/NOTES.md | 18 + .../agent-runs/production-l1-protocol/PLAN.md | 37 + .../production-l1-protocol/PROFILE_MATRIX.md | 21 + .../PROTOCOL_INVENTORY.md | 24 + .../RECEIPT_EVENT_CATALOG.md | 37 + .../STATE_TRANSITION_SPEC.md | 33 + .../production-l1-protocol/TX_CATALOG.md | 28 + fixtures/production-l1/block.valid.json | 3506 ++++++++++ .../production-l1/bridge-evidence.valid.json | 62 + fixtures/production-l1/events.valid.json | 580 ++ .../production-l1/export-snapshot.valid.json | 909 +++ .../production-l1/finality-receipt.valid.json | 17 + fixtures/production-l1/genesis.input.json | 269 + fixtures/production-l1/genesis.json | 283 + fixtures/production-l1/negative-fixtures.json | 3166 +++++++++ .../production-l1/production-l1-tools.mjs | 2484 ++++++++ fixtures/production-l1/profiles.json | 196 + fixtures/production-l1/receipts.valid.json | 446 ++ .../state-root-manifest.valid.json | 508 ++ .../production-l1/transactions.valid.json | 1901 ++++++ infra/scripts/flowchain-bridge-mock-e2e.mjs | 77 + .../flowchain-live-l1-protocol-verify.mjs | 240 + infra/scripts/flowchain-no-secret-scan.mjs | 186 + package.json | 6 + schemas/flowmemory/README.md | 36 + ...uction-account-public-metadata.schema.json | 253 + .../production-block-body.schema.json | 154 + .../production-block-header.schema.json | 202 + .../production-bridge-evidence.schema.json | 332 + .../flowmemory/production-event.schema.json | 244 + .../production-export-snapshot.schema.json | 248 + .../production-finality-receipt.schema.json | 204 + .../flowmemory/production-genesis.schema.json | 409 ++ .../production-network-profile.schema.json | 286 + .../flowmemory/production-receipt.schema.json | 260 + ...production-state-root-manifest.schema.json | 246 + ...roduction-transaction-envelope.schema.json | 326 + ...production-transaction-payload.schema.json | 5671 +++++++++++++++++ ...production-validator-authority.schema.json | 175 + 50 files changed, 26520 insertions(+), 7 deletions(-) create mode 100644 docs/DECISIONS/2026-05-13-flowchain-private-local-protocol-contract.md create mode 100644 docs/agent-runs/production-l1-protocol/BRIDGE_PROTOCOL_SPEC.md create mode 100644 docs/agent-runs/production-l1-protocol/CHECKLIST.md create mode 100644 docs/agent-runs/production-l1-protocol/EXPERIMENTS.md create mode 100644 docs/agent-runs/production-l1-protocol/GENESIS_PROOF.md create mode 100644 docs/agent-runs/production-l1-protocol/HANDOFF.md create mode 100644 docs/agent-runs/production-l1-protocol/LIVE_L1_PROTOCOL_CONFORMANCE.md create mode 100644 docs/agent-runs/production-l1-protocol/NOTES.md create mode 100644 docs/agent-runs/production-l1-protocol/PLAN.md create mode 100644 docs/agent-runs/production-l1-protocol/PROFILE_MATRIX.md create mode 100644 docs/agent-runs/production-l1-protocol/PROTOCOL_INVENTORY.md create mode 100644 docs/agent-runs/production-l1-protocol/RECEIPT_EVENT_CATALOG.md create mode 100644 docs/agent-runs/production-l1-protocol/STATE_TRANSITION_SPEC.md create mode 100644 docs/agent-runs/production-l1-protocol/TX_CATALOG.md create mode 100644 fixtures/production-l1/block.valid.json create mode 100644 fixtures/production-l1/bridge-evidence.valid.json create mode 100644 fixtures/production-l1/events.valid.json create mode 100644 fixtures/production-l1/export-snapshot.valid.json create mode 100644 fixtures/production-l1/finality-receipt.valid.json create mode 100644 fixtures/production-l1/genesis.input.json create mode 100644 fixtures/production-l1/genesis.json create mode 100644 fixtures/production-l1/negative-fixtures.json create mode 100644 fixtures/production-l1/production-l1-tools.mjs create mode 100644 fixtures/production-l1/profiles.json create mode 100644 fixtures/production-l1/receipts.valid.json create mode 100644 fixtures/production-l1/state-root-manifest.valid.json create mode 100644 fixtures/production-l1/transactions.valid.json create mode 100644 infra/scripts/flowchain-bridge-mock-e2e.mjs create mode 100644 infra/scripts/flowchain-live-l1-protocol-verify.mjs create mode 100644 infra/scripts/flowchain-no-secret-scan.mjs create mode 100644 schemas/flowmemory/production-account-public-metadata.schema.json create mode 100644 schemas/flowmemory/production-block-body.schema.json create mode 100644 schemas/flowmemory/production-block-header.schema.json create mode 100644 schemas/flowmemory/production-bridge-evidence.schema.json create mode 100644 schemas/flowmemory/production-event.schema.json create mode 100644 schemas/flowmemory/production-export-snapshot.schema.json create mode 100644 schemas/flowmemory/production-finality-receipt.schema.json create mode 100644 schemas/flowmemory/production-genesis.schema.json create mode 100644 schemas/flowmemory/production-network-profile.schema.json create mode 100644 schemas/flowmemory/production-receipt.schema.json create mode 100644 schemas/flowmemory/production-state-root-manifest.schema.json create mode 100644 schemas/flowmemory/production-transaction-envelope.schema.json create mode 100644 schemas/flowmemory/production-transaction-payload.schema.json create mode 100644 schemas/flowmemory/production-validator-authority.schema.json diff --git a/crates/flowmemory-devnet/src/cli.rs b/crates/flowmemory-devnet/src/cli.rs index 9f92b9fe..f97c5f45 100644 --- a/crates/flowmemory-devnet/src/cli.rs +++ b/crates/flowmemory-devnet/src/cli.rs @@ -1004,6 +1004,30 @@ fn transactions_from_fixture(path: &Path) -> Result> { .with_context(|| format!("failed to parse txs in {}", path.display())); } + if value.get("transactions").is_some() { + let transactions = value + .get("transactions") + .and_then(Value::as_array) + .ok_or_else(|| anyhow!("transactions must be an array in {}", path.display()))?; + return Ok(transactions + .iter() + .cloned() + .map(|envelope| Transaction::ApplyProductionL1Transaction { envelope }) + .collect()); + } + + if value.get("bridgeEvidence").is_some() { + let evidence = value + .get("bridgeEvidence") + .and_then(Value::as_array) + .ok_or_else(|| anyhow!("bridgeEvidence must be an array in {}", path.display()))?; + return Ok(evidence + .iter() + .cloned() + .map(|evidence| Transaction::ApplyProtocolBridgeEvidence { evidence }) + .collect()); + } + if value.get("tx").is_some() { let tx = serde_json::from_value(value["tx"].clone()) .with_context(|| format!("failed to parse tx in {}", path.display()))?; @@ -1128,6 +1152,19 @@ fn export_handoff(state: &crate::model::ChainState, out_dir: &Path) -> Result<() "workReceipts": state.work_receipts, "verifierReports": state.verifier_reports, "baseAnchors": state.base_anchors, + "protocolAccounts": state.protocol_accounts, + "protocolBalances": state.protocol_balances, + "protocolValidatorAuthorities": state.protocol_validator_authorities, + "protocolBridgeEvidence": state.protocol_bridge_evidence, + "protocolBridgeCredits": state.protocol_bridge_credits, + "protocolBridgeReplayIndex": state.protocol_bridge_replay_index, + "protocolReceipts": state.protocol_receipts, + "protocolEvents": state.protocol_events, + "protocolEventReceiptIndex": state.protocol_event_receipt_index, + "protocolWithdrawals": state.protocol_withdrawals, + "protocolObjectStore": state.protocol_object_store, + "protocolFinalityVotes": state.protocol_finality_votes, + "protocolFinalityCertificates": state.protocol_finality_certificates, }); let indexer = serde_json::json!({ @@ -1151,6 +1188,12 @@ fn export_handoff(state: &crate::model::ChainState, out_dir: &Path) -> Result<() "finalityReceipts": state.finality_receipts, "artifactAvailabilityProofs": state.artifact_availability_proofs, "blocks": state.blocks, + "protocolBridgeEvidence": state.protocol_bridge_evidence, + "protocolBridgeCredits": state.protocol_bridge_credits, + "protocolReceipts": state.protocol_receipts, + "protocolEvents": state.protocol_events, + "protocolEventReceiptIndex": state.protocol_event_receipt_index, + "protocolFinalityCertificates": state.protocol_finality_certificates, "mapRoots": state_map_roots(state), "stateRoot": state_root(state), }); @@ -1176,6 +1219,12 @@ fn export_handoff(state: &crate::model::ChainState, out_dir: &Path) -> Result<() "finalityReceipts": state.finality_receipts, "artifactAvailabilityProofs": state.artifact_availability_proofs, "importedVerifierReports": state.imported_verifier_reports, + "protocolReceipts": state.protocol_receipts, + "protocolEvents": state.protocol_events, + "protocolBridgeEvidence": state.protocol_bridge_evidence, + "protocolBridgeReplayIndex": state.protocol_bridge_replay_index, + "protocolFinalityVotes": state.protocol_finality_votes, + "protocolFinalityCertificates": state.protocol_finality_certificates, "mapRoots": state_map_roots(state), "stateRoot": state_root(state), }); @@ -1212,7 +1261,20 @@ fn export_handoff(state: &crate::model::ChainState, out_dir: &Path) -> Result<() "verifierModules": state.verifier_modules, "workReceipts": state.work_receipts, "verifierReports": state.verifier_reports, - "baseAnchors": state.base_anchors + "baseAnchors": state.base_anchors, + "protocolAccounts": state.protocol_accounts, + "protocolBalances": state.protocol_balances, + "protocolValidatorAuthorities": state.protocol_validator_authorities, + "protocolBridgeEvidence": state.protocol_bridge_evidence, + "protocolBridgeCredits": state.protocol_bridge_credits, + "protocolBridgeReplayIndex": state.protocol_bridge_replay_index, + "protocolReceipts": state.protocol_receipts, + "protocolEvents": state.protocol_events, + "protocolEventReceiptIndex": state.protocol_event_receipt_index, + "protocolWithdrawals": state.protocol_withdrawals, + "protocolObjectStore": state.protocol_object_store, + "protocolFinalityVotes": state.protocol_finality_votes, + "protocolFinalityCertificates": state.protocol_finality_certificates } }); @@ -1449,6 +1511,19 @@ struct StateSummary { imported_observations: usize, imported_verifier_reports: usize, base_anchors: usize, + protocol_accounts: usize, + protocol_balances: usize, + protocol_validator_authorities: usize, + protocol_bridge_evidence: usize, + protocol_bridge_credits: usize, + protocol_bridge_replay_index: usize, + protocol_receipts: usize, + protocol_events: usize, + protocol_event_receipt_index: usize, + protocol_withdrawals: usize, + protocol_object_store: usize, + protocol_finality_votes: usize, + protocol_finality_certificates: usize, } impl StateSummary { @@ -1489,6 +1564,19 @@ impl StateSummary { imported_observations: state.imported_observations.len(), imported_verifier_reports: state.imported_verifier_reports.len(), base_anchors: state.base_anchors.len(), + protocol_accounts: state.protocol_accounts.len(), + protocol_balances: state.protocol_balances.len(), + protocol_validator_authorities: state.protocol_validator_authorities.len(), + protocol_bridge_evidence: state.protocol_bridge_evidence.len(), + protocol_bridge_credits: state.protocol_bridge_credits.len(), + protocol_bridge_replay_index: state.protocol_bridge_replay_index.len(), + protocol_receipts: state.protocol_receipts.len(), + protocol_events: state.protocol_events.len(), + protocol_event_receipt_index: state.protocol_event_receipt_index.len(), + protocol_withdrawals: state.protocol_withdrawals.len(), + protocol_object_store: state.protocol_object_store.len(), + protocol_finality_votes: state.protocol_finality_votes.len(), + protocol_finality_certificates: state.protocol_finality_certificates.len(), } } } diff --git a/crates/flowmemory-devnet/src/lib.rs b/crates/flowmemory-devnet/src/lib.rs index e2833206..9dc72cde 100644 --- a/crates/flowmemory-devnet/src/lib.rs +++ b/crates/flowmemory-devnet/src/lib.rs @@ -1,3 +1,5 @@ +#![recursion_limit = "256"] + pub mod cli; pub mod hash; pub mod model; @@ -11,10 +13,19 @@ pub use model::{ FinalityReceipt, ImportedFlowPulseObservation, ImportedVerifierReport, LOCAL_TEST_UNIT_ASSET_ID, LiquidityReceipt, LocalAuthorization, LocalTestToken, LocalTestTokenBalance, LocalTestTokenMintReceipt, LocalTestUnitBalance, LpPosition, MemoryCell, - ModelPassport, OperatorKeyReference, StateMapRoots, SwapReceipt, Transaction, TxEnvelope, - VerifierModule, apply_transaction, build_block, default_config, - default_operator_key_references, deterministic_liquidity_id, deterministic_lp_position_id, - deterministic_pool_id, deterministic_swap_id, deterministic_token_balance_id, - deterministic_token_id, deterministic_token_mint_id, genesis_state, product_demo_transactions, - queue_authorized_transaction, state_map_roots, state_root, + ModelPassport, OperatorKeyReference, PRODUCTION_L1_BASE_SOURCE_CHAIN_ID, + PRODUCTION_L1_BRIDGE_CREDIT_CAP_UNITS, PRODUCTION_L1_CHAIN_ID, PRODUCTION_L1_GENESIS_HASH, + PRODUCTION_L1_LOCKBOX_ADDRESS, PRODUCTION_L1_NATIVE_ASSET_ID, PRODUCTION_L1_NETWORK_PROFILE, + PRODUCTION_L1_PROTOCOL_VERSION, ProtocolAccount, ProtocolBalance, ProtocolBridgeCredit, + ProtocolBridgeEvidence, ProtocolBridgeReleaseEvidence, ProtocolBridgeReplayIndexEntry, + ProtocolEvent, ProtocolEventReceiptIndexEntry, ProtocolFinalityCertificate, + ProtocolFinalityVote, ProtocolObjectStoreEntry, ProtocolReceipt, + ProtocolValidatorAuthority, ProtocolWithdrawalIntent, StateMapRoots, SwapReceipt, Transaction, + TxEnvelope, VerifierModule, apply_transaction, build_block, default_config, + default_operator_key_references, default_protocol_accounts, default_protocol_balances, + default_protocol_validator_authorities, deterministic_liquidity_id, + deterministic_lp_position_id, deterministic_pool_id, deterministic_swap_id, + deterministic_token_balance_id, deterministic_token_id, deterministic_token_mint_id, + genesis_state, product_demo_transactions, protocol_balance_id, queue_authorized_transaction, + state_map_roots, state_root, }; diff --git a/crates/flowmemory-devnet/src/model.rs b/crates/flowmemory-devnet/src/model.rs index 86162690..38338b87 100644 --- a/crates/flowmemory-devnet/src/model.rs +++ b/crates/flowmemory-devnet/src/model.rs @@ -1,5 +1,6 @@ use crate::hash::{hash_json, keccak_hex}; use serde::{Deserialize, Serialize}; +use serde_json::Value; use std::collections::BTreeMap; use thiserror::Error; @@ -13,6 +14,17 @@ pub const ZERO_HASH: &str = "0x0000000000000000000000000000000000000000000000000 pub const FLOWPULSE_TOPIC0: &str = "0x5d07190b9ae441b4d7b16259a48424acd451492b12f5f99a29f5bfd992c13e43"; pub const LOCAL_TEST_UNIT_ASSET_ID: &str = "asset:flowchain-local-test-unit"; +pub const PRODUCTION_L1_PROTOCOL_VERSION: &str = "flowchain.private_local_l1.protocol.v0"; +pub const PRODUCTION_L1_CHAIN_ID: &str = "7428453"; +pub const PRODUCTION_L1_NETWORK_PROFILE: &str = "flowchain-base8453-pilot"; +pub const PRODUCTION_L1_GENESIS_HASH: &str = + "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f"; +pub const PRODUCTION_L1_NATIVE_ASSET_ID: &str = + "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024"; +pub const PRODUCTION_L1_BASE_SOURCE_CHAIN_ID: u64 = 8453; +pub const PRODUCTION_L1_BASE_SOURCE_NETWORK: &str = "base-mainnet-source-for-local-private-pilot"; +pub const PRODUCTION_L1_LOCKBOX_ADDRESS: &str = "0xb9524481c154c195b4236846fe9d8fcffd6ce407"; +pub const PRODUCTION_L1_BRIDGE_CREDIT_CAP_UNITS: u64 = 5_000_000; #[derive(Debug, Error, PartialEq, Eq)] pub enum DevnetError { @@ -138,6 +150,60 @@ pub enum DevnetError { AnchorAlreadyExists(String), #[error("invalid event signature: {0}")] InvalidEventSignature(String), + #[error("FC_PROTO_SCHEMA_VALIDATION: {0}")] + ProtocolSchemaValidation(String), + #[error("FC_PROTO_WRONG_CHAIN_ID: {0}")] + ProtocolWrongChainId(String), + #[error("FC_PROTO_WRONG_NETWORK_PROFILE: {0}")] + ProtocolWrongNetworkProfile(String), + #[error("FC_PROTO_WRONG_GENESIS_HASH: {0}")] + ProtocolWrongGenesisHash(String), + #[error("FC_PROTO_STALE_NONCE: account {account_id} expected {expected} got {actual}")] + ProtocolStaleNonce { + account_id: String, + expected: u64, + actual: u64, + }, + #[error("FC_PROTO_DUPLICATE_TX: {0}")] + ProtocolDuplicateTx(String), + #[error("FC_PROTO_MALFORMED_PAYLOAD_HASH: {0}")] + ProtocolMalformedPayloadHash(String), + #[error("FC_PROTO_MALFORMED_TX_ID: {0}")] + ProtocolMalformedTxId(String), + #[error("FC_PROTO_ACCOUNT_MISSING: {0}")] + ProtocolAccountMissing(String), + #[error("FC_PROTO_ACCOUNT_INACTIVE: {0}")] + ProtocolAccountInactive(String), + #[error("FC_PROTO_BALANCE_MISSING: {0}")] + ProtocolBalanceMissing(String), + #[error("FC_PROTO_BALANCE_INSUFFICIENT: {0}")] + ProtocolBalanceInsufficient(String), + #[error("FC_PROTO_BALANCE_OVERFLOW: {0}")] + ProtocolBalanceOverflow(String), + #[error("FC_PROTO_INVALID_EVENT: {0}")] + ProtocolInvalidEvent(String), + #[error("FC_PROTO_INVALID_BRIDGE_SOURCE_CHAIN: {0}")] + ProtocolInvalidBridgeSourceChain(String), + #[error("FC_PROTO_WRONG_LOCKBOX: {0}")] + ProtocolWrongLockbox(String), + #[error("FC_PROTO_BRIDGE_AMOUNT_OVER_CAP: {0}")] + ProtocolBridgeAmountOverCap(String), + #[error("FC_PROTO_BRIDGE_CONFIRMATION_UNSATISFIED: {0}")] + ProtocolBridgeConfirmationUnsatisfied(String), + #[error("FC_PROTO_MUTATED_BRIDGE_EVIDENCE: {0}")] + ProtocolMutatedBridgeEvidence(String), + #[error("FC_PROTO_DUPLICATE_BRIDGE_EVENT: {0}")] + ProtocolDuplicateBridgeEvent(String), + #[error("FC_PROTO_BRIDGE_EVIDENCE_MISSING: {0}")] + ProtocolBridgeEvidenceMissing(String), + #[error("FC_PROTO_BRIDGE_EVIDENCE_MISMATCH: {0}")] + ProtocolBridgeEvidenceMismatch(String), + #[error("FC_PROTO_UNSUPPORTED_PAYLOAD: {0}")] + ProtocolUnsupportedPayload(String), + #[error("FC_PROTO_OBJECT_ALREADY_EXISTS: {0}")] + ProtocolObjectAlreadyExists(String), + #[error("FC_PROTO_FINALITY_VOTE_MISSING: {0}")] + ProtocolFinalityVoteMissing(String), } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] @@ -194,10 +260,257 @@ pub struct ChainState { pub imported_observations: BTreeMap, pub imported_verifier_reports: BTreeMap, pub base_anchors: BTreeMap, + #[serde(default = "default_protocol_accounts")] + pub protocol_accounts: BTreeMap, + #[serde(default = "default_protocol_balances")] + pub protocol_balances: BTreeMap, + #[serde(default = "default_protocol_validator_authorities")] + pub protocol_validator_authorities: BTreeMap, + #[serde(default)] + pub protocol_bridge_evidence: BTreeMap, + #[serde(default)] + pub protocol_bridge_credits: BTreeMap, + #[serde(default)] + pub protocol_bridge_replay_index: BTreeMap, + #[serde(default)] + pub protocol_receipts: BTreeMap, + #[serde(default)] + pub protocol_events: BTreeMap, + #[serde(default)] + pub protocol_event_receipt_index: BTreeMap, + #[serde(default)] + pub protocol_withdrawals: BTreeMap, + #[serde(default)] + pub protocol_object_store: BTreeMap, + #[serde(default)] + pub protocol_finality_votes: BTreeMap, + #[serde(default)] + pub protocol_finality_certificates: BTreeMap, pub blocks: Vec, pub pending_txs: Vec, } +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProtocolAccount { + pub account_id: String, + pub label: String, + pub public_key: String, + pub address: String, + pub role_flags: BTreeMap, + pub next_nonce: u64, + pub status: String, + pub production_ready: bool, +} + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProtocolBalance { + pub balance_id: String, + pub account_id: String, + pub asset_id: String, + pub amount_units: u64, + pub balance_type: String, + pub updated_at_block: u64, + pub no_value: bool, +} + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProtocolValidatorAuthority { + pub authority_id: String, + pub account_id: String, + pub public_key: String, + pub address: String, + pub authority_type: String, + pub voting_power: u64, + pub finality_weight: u64, + pub metadata_hash: String, + pub status: String, + pub production_ready: bool, +} + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProtocolBridgeReleaseEvidence { + pub withdrawal_intent_id: String, + pub release_tx_hash: String, + pub release_block_number: String, + pub release_log_index: u64, + pub released_to_address: String, + pub release_authority_account_id: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProtocolBridgeEvidence { + pub schema: String, + pub evidence_id: String, + pub evidence_type: String, + pub source_chain_id: u64, + pub source_network: String, + pub lockbox_address: String, + pub source_tx_hash: String, + pub source_block_number: String, + pub source_log_index: u64, + pub token_address: String, + pub asset_id: String, + pub depositor_address: String, + pub local_recipient_account_id: String, + pub amount: String, + pub observation_id: String, + pub credit_id: String, + pub duplicate_key: String, + pub evidence_hash: String, + pub observed_by_relayer_account_id: String, + pub finality_status: String, + pub release: Option, + pub local_only: bool, + pub production_ready: bool, +} + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProtocolBridgeCredit { + pub credit_id: String, + pub evidence_id: String, + pub observation_id: String, + pub duplicate_key: String, + pub source_chain_id: u64, + pub lockbox_address: String, + pub asset_id: String, + pub amount_units: u64, + pub recipient_account_id: String, + pub receipt_id: String, + pub event_id: String, + pub applied_at_block: u64, + pub status: String, + pub no_value: bool, +} + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProtocolBridgeReplayIndexEntry { + pub duplicate_key: String, + pub evidence_id: String, + pub credit_id: String, + pub source_chain_id: u64, + pub lockbox_address: String, + pub source_tx_hash: String, + pub source_log_index: u64, + pub accepted_at_block: u64, +} + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProtocolReceipt { + pub receipt_id: String, + pub tx_id: String, + pub payload_type: String, + pub status: String, + pub execution_cost_units: u64, + pub state_delta_ref: String, + pub emitted_events: Vec, + pub bridge_evidence_refs: Vec, + pub error_code: Option, + pub failure_reason: Option, + pub deterministic_id_input: String, + pub applied_at_block: u64, + pub state_root_after: String, +} + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProtocolEvent { + pub event_id: String, + pub event_type: String, + pub payload_type: String, + pub tx_id: String, + pub receipt_id: String, + pub block_height: u64, + pub event_index: u64, + pub emitter_account_id: String, + pub subject_id: String, + pub attributes: BTreeMap, +} + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProtocolEventReceiptIndexEntry { + pub event_id: String, + pub receipt_id: String, + pub tx_id: String, + pub event_type: String, + pub block_height: u64, +} + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProtocolWithdrawalIntent { + pub withdrawal_intent_id: String, + pub source_account_id: String, + pub destination_chain_id: u64, + pub destination_address: String, + pub asset_id: String, + pub amount_units: u64, + pub release_policy_hash: String, + pub release_evidence_id: Option, + pub receipt_id: String, + pub event_id: String, + pub status: String, + pub created_at_block: u64, + pub no_value: bool, +} + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProtocolObjectStoreEntry { + pub lifecycle_update_id: String, + pub payload_type: String, + pub object_type: String, + pub operation: String, + pub object_id: String, + pub object_hash: String, + pub status: String, + pub rootfield_id: Option, + pub source_receipt_id: Option, + pub parent_object_id: Option, + pub receipt_id: String, + pub event_id: String, + pub updated_at_block: u64, +} + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProtocolFinalityVote { + pub vote_id: String, + pub validator_account_id: String, + pub height: u64, + pub block_hash: String, + pub state_root: String, + pub vote_round: u64, + pub receipt_id: String, + pub event_id: String, + pub recorded_at_block: u64, +} + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] +pub struct ProtocolFinalityCertificate { + pub certificate_id: String, + pub height: u64, + pub block_hash: String, + pub state_root: String, + pub signer_set_root: String, + pub vote_ids: Vec, + pub quorum_numerator: u64, + pub quorum_denominator: u64, + pub receipt_id: String, + pub event_id: String, + pub status: String, + pub accepted_at_block: u64, +} + #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] #[serde(rename_all = "camelCase")] pub struct DevnetConfig { @@ -745,6 +1058,12 @@ pub enum Transaction { appchain_chain_id: String, finality_status: String, }, + ApplyProtocolBridgeEvidence { + evidence: Value, + }, + ApplyProductionL1Transaction { + envelope: Value, + }, ImportFlowPulseObservation(ImportedFlowPulseObservation), ImportVerifierReport(ImportedVerifierReport), } @@ -821,6 +1140,19 @@ struct StateCommitmentView<'a> { imported_observations: &'a BTreeMap, imported_verifier_reports: &'a BTreeMap, base_anchors: &'a BTreeMap, + protocol_accounts: &'a BTreeMap, + protocol_balances: &'a BTreeMap, + protocol_validator_authorities: &'a BTreeMap, + protocol_bridge_evidence: &'a BTreeMap, + protocol_bridge_credits: &'a BTreeMap, + protocol_bridge_replay_index: &'a BTreeMap, + protocol_receipts: &'a BTreeMap, + protocol_events: &'a BTreeMap, + protocol_event_receipt_index: &'a BTreeMap, + protocol_withdrawals: &'a BTreeMap, + protocol_object_store: &'a BTreeMap, + protocol_finality_votes: &'a BTreeMap, + protocol_finality_certificates: &'a BTreeMap, } #[derive(Debug, Serialize)] @@ -858,6 +1190,32 @@ pub struct StateMapRoots { pub imported_observation_root: String, pub imported_verifier_report_root: String, pub base_anchor_root: String, + #[serde(default)] + pub protocol_account_root: String, + #[serde(default)] + pub protocol_balance_root: String, + #[serde(default)] + pub protocol_validator_authority_root: String, + #[serde(default)] + pub protocol_bridge_evidence_root: String, + #[serde(default)] + pub protocol_bridge_credit_root: String, + #[serde(default)] + pub protocol_bridge_replay_index_root: String, + #[serde(default)] + pub protocol_receipt_root: String, + #[serde(default)] + pub protocol_event_root: String, + #[serde(default)] + pub protocol_event_receipt_index_root: String, + #[serde(default)] + pub protocol_withdrawal_root: String, + #[serde(default)] + pub protocol_object_store_root: String, + #[serde(default)] + pub protocol_finality_vote_root: String, + #[serde(default)] + pub protocol_finality_certificate_root: String, } pub fn default_config() -> DevnetConfig { @@ -899,6 +1257,133 @@ pub fn default_operator_key_references() -> BTreeMap BTreeMap { + let accounts = [ + ( + "alice-user", + "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + [("user", true), ("validator", false), ("bridgeOperator", false), ("deployer", true), ("relayer", false), ("emergencyOperator", false)], + ), + ( + "bob-user", + "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "0x02bd133d4df63458ed49a0d7acde36d546b80c735f04d9a37eb428f1d92505b6be", + "0xc8d2f10666e1216121f6449f0fc5726f63590aa7", + [("user", true), ("validator", false), ("bridgeOperator", false), ("deployer", false), ("relayer", false), ("emergencyOperator", false)], + ), + ( + "validator-one", + "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + [("user", false), ("validator", true), ("bridgeOperator", false), ("deployer", false), ("relayer", false), ("emergencyOperator", false)], + ), + ( + "bridge-relayer", + "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "0x02f90ad32b15b53c0e4abd4f2f0de6db96dbe0adee1dab1736b0cf596070f7ef05", + "0x633621fec8e01f8346130d81c26be8e33d1dcea9", + [("user", false), ("validator", false), ("bridgeOperator", true), ("deployer", false), ("relayer", true), ("emergencyOperator", false)], + ), + ( + "bridge-release-authority", + "0x9f7090c47663019f3d7647a2d4b5895a529e9dbac911bb2fde2c359828cbb3b8", + "0x02be094d43f51fb0e267c4ed5767bf26ef1370dc3c7756d1399d8e152c3a59b602", + "0xdb523727f85b4f6d0ff5f62fc4d6c25a337af90d", + [("user", false), ("validator", false), ("bridgeOperator", true), ("deployer", false), ("relayer", false), ("emergencyOperator", false)], + ), + ( + "emergency-operator", + "0x458a01532bc3ec202c267dbd715ef239d54e3844cb37c57f504ab7e7f077ac8a", + "0x0202837e867307660b83033448b53dae9fbf18646041ac72fc3797272b59d65d79", + "0x9386458c8c48d14bfebedc4fd00a528c15727b9e", + [("user", false), ("validator", false), ("bridgeOperator", false), ("deployer", false), ("relayer", false), ("emergencyOperator", true)], + ), + ]; + + accounts + .into_iter() + .map(|(label, account_id, public_key, address, flags)| { + ( + account_id.to_string(), + ProtocolAccount { + account_id: account_id.to_string(), + label: label.to_string(), + public_key: public_key.to_string(), + address: address.to_string(), + role_flags: flags + .into_iter() + .map(|(role, enabled)| (role.to_string(), enabled)) + .collect(), + next_nonce: 1, + status: "active".to_string(), + production_ready: false, + }, + ) + }) + .collect() +} + +pub fn default_protocol_balances() -> BTreeMap { + [ + ( + "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + 1_000_000_u64, + ), + ( + "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + 100_000_u64, + ), + ( + "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + 50_000_u64, + ), + ( + "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + 25_000_u64, + ), + ] + .into_iter() + .map(|(account_id, amount_units)| { + let balance_id = protocol_balance_id(account_id, PRODUCTION_L1_NATIVE_ASSET_ID); + ( + balance_id.clone(), + ProtocolBalance { + balance_id, + account_id: account_id.to_string(), + asset_id: PRODUCTION_L1_NATIVE_ASSET_ID.to_string(), + amount_units, + balance_type: "native_local_unit".to_string(), + updated_at_block: 0, + no_value: true, + }, + ) + }) + .collect() +} + +pub fn default_protocol_validator_authorities() -> BTreeMap { + let authority = ProtocolValidatorAuthority { + authority_id: "0x4e7ad43d8db36ddde419d64fac4768a38167efd7b9e7abc503036f2ba22c92ba" + .to_string(), + account_id: "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d" + .to_string(), + public_key: "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22" + .to_string(), + address: "0xd0c3c122262ba1116de221d5fbf4505357b97e8a".to_string(), + authority_type: "validator".to_string(), + voting_power: 1, + finality_weight: 1, + metadata_hash: "0x708f6074acaf685798e4085ceb5d4c3053dfa72bc1ccf0078feb3dbcd39c5e15" + .to_string(), + status: "active".to_string(), + production_ready: false, + }; + BTreeMap::from([(authority.authority_id.clone(), authority)]) +} + pub fn genesis_state() -> ChainState { let config = default_config(); ChainState { @@ -934,6 +1419,19 @@ pub fn genesis_state() -> ChainState { imported_observations: BTreeMap::new(), imported_verifier_reports: BTreeMap::new(), base_anchors: BTreeMap::new(), + protocol_accounts: default_protocol_accounts(), + protocol_balances: default_protocol_balances(), + protocol_validator_authorities: default_protocol_validator_authorities(), + protocol_bridge_evidence: BTreeMap::new(), + protocol_bridge_credits: BTreeMap::new(), + protocol_bridge_replay_index: BTreeMap::new(), + protocol_receipts: BTreeMap::new(), + protocol_events: BTreeMap::new(), + protocol_event_receipt_index: BTreeMap::new(), + protocol_withdrawals: BTreeMap::new(), + protocol_object_store: BTreeMap::new(), + protocol_finality_votes: BTreeMap::new(), + protocol_finality_certificates: BTreeMap::new(), blocks: Vec::new(), pending_txs: Vec::new(), } @@ -994,6 +1492,16 @@ pub fn deterministic_token_balance_id(token_id: &str, account_id: &str) -> Strin ) } +pub fn protocol_balance_id(account_id: &str, asset_id: &str) -> String { + hash_json( + "flowchain.production_l1.balance_id.v0", + &serde_json::json!({ + "accountId": account_id, + "assetId": asset_id + }), + ) +} + pub fn deterministic_token_mint_id( token_id: &str, to_account_id: &str, @@ -1098,6 +1606,19 @@ pub fn state_root(state: &ChainState) -> String { imported_observations: &state.imported_observations, imported_verifier_reports: &state.imported_verifier_reports, base_anchors: &state.base_anchors, + protocol_accounts: &state.protocol_accounts, + protocol_balances: &state.protocol_balances, + protocol_validator_authorities: &state.protocol_validator_authorities, + protocol_bridge_evidence: &state.protocol_bridge_evidence, + protocol_bridge_credits: &state.protocol_bridge_credits, + protocol_bridge_replay_index: &state.protocol_bridge_replay_index, + protocol_receipts: &state.protocol_receipts, + protocol_events: &state.protocol_events, + protocol_event_receipt_index: &state.protocol_event_receipt_index, + protocol_withdrawals: &state.protocol_withdrawals, + protocol_object_store: &state.protocol_object_store, + protocol_finality_votes: &state.protocol_finality_votes, + protocol_finality_certificates: &state.protocol_finality_certificates, }; hash_json("flowmemory.local_devnet.state_root.v0", &view) } @@ -1202,6 +1723,58 @@ pub fn state_map_roots(state: &ChainState) -> StateMapRoots { "flowmemory.local_devnet.base_anchors.v0", &state.base_anchors, ), + protocol_account_root: map_root( + "flowmemory.local_devnet.protocol_accounts.v0", + &state.protocol_accounts, + ), + protocol_balance_root: map_root( + "flowmemory.local_devnet.protocol_balances.v0", + &state.protocol_balances, + ), + protocol_validator_authority_root: map_root( + "flowmemory.local_devnet.protocol_validator_authorities.v0", + &state.protocol_validator_authorities, + ), + protocol_bridge_evidence_root: map_root( + "flowmemory.local_devnet.protocol_bridge_evidence.v0", + &state.protocol_bridge_evidence, + ), + protocol_bridge_credit_root: map_root( + "flowmemory.local_devnet.protocol_bridge_credits.v0", + &state.protocol_bridge_credits, + ), + protocol_bridge_replay_index_root: map_root( + "flowmemory.local_devnet.protocol_bridge_replay_index.v0", + &state.protocol_bridge_replay_index, + ), + protocol_receipt_root: map_root( + "flowmemory.local_devnet.protocol_receipts.v0", + &state.protocol_receipts, + ), + protocol_event_root: map_root( + "flowmemory.local_devnet.protocol_events.v0", + &state.protocol_events, + ), + protocol_event_receipt_index_root: map_root( + "flowmemory.local_devnet.protocol_event_receipt_index.v0", + &state.protocol_event_receipt_index, + ), + protocol_withdrawal_root: map_root( + "flowmemory.local_devnet.protocol_withdrawals.v0", + &state.protocol_withdrawals, + ), + protocol_object_store_root: map_root( + "flowmemory.local_devnet.protocol_object_store.v0", + &state.protocol_object_store, + ), + protocol_finality_vote_root: map_root( + "flowmemory.local_devnet.protocol_finality_votes.v0", + &state.protocol_finality_votes, + ), + protocol_finality_certificate_root: map_root( + "flowmemory.local_devnet.protocol_finality_certificates.v0", + &state.protocol_finality_certificates, + ), } } @@ -2281,6 +2854,31 @@ pub fn apply_transaction(state: &mut ChainState, tx: &Transaction) -> Result<(), } state.base_anchors.insert(anchor.anchor_id.clone(), anchor); } + Transaction::ApplyProtocolBridgeEvidence { evidence } => { + let evidence = parse_protocol_bridge_evidence(evidence)?; + if state + .protocol_bridge_evidence + .contains_key(&evidence.evidence_id) + || state + .protocol_bridge_evidence + .values() + .any(|stored| stored.duplicate_key == evidence.duplicate_key) + || state + .protocol_bridge_replay_index + .contains_key(&evidence.duplicate_key) + { + return Err(DevnetError::ProtocolDuplicateBridgeEvent( + evidence.duplicate_key, + )); + } + validate_protocol_bridge_evidence(state, &evidence)?; + state + .protocol_bridge_evidence + .insert(evidence.evidence_id.clone(), evidence); + } + Transaction::ApplyProductionL1Transaction { envelope } => { + apply_production_l1_transaction(state, envelope)?; + } Transaction::ImportFlowPulseObservation(observation) => { if observation.event_signature.to_lowercase() != FLOWPULSE_TOPIC0 { return Err(DevnetError::InvalidEventSignature( @@ -2316,6 +2914,1114 @@ pub fn apply_transaction(state: &mut ChainState, tx: &Transaction) -> Result<(), Ok(()) } +fn apply_production_l1_transaction( + state: &mut ChainState, + envelope: &Value, +) -> Result<(), DevnetError> { + expect_string( + envelope, + "schema", + "flowchain.production_l1.transaction_envelope.v0", + )?; + expect_string( + envelope, + "protocolVersion", + PRODUCTION_L1_PROTOCOL_VERSION, + )?; + expect_string(envelope, "chainId", PRODUCTION_L1_CHAIN_ID)?; + expect_string(envelope, "networkProfile", PRODUCTION_L1_NETWORK_PROFILE)?; + expect_string(envelope, "genesisHash", PRODUCTION_L1_GENESIS_HASH)?; + + let tx_id = required_string(envelope, "txId")?; + if state + .protocol_receipts + .values() + .any(|receipt| receipt.tx_id == tx_id) + { + return Err(DevnetError::ProtocolDuplicateTx(tx_id)); + } + + let nonce = required_u64_string(envelope, "nonce")?; + let payload_type = required_string(envelope, "payloadType")?; + let payload_hash = required_string(envelope, "payloadHash")?; + let payload = envelope + .get("payload") + .ok_or_else(|| DevnetError::ProtocolSchemaValidation("missing payload".to_string()))?; + expect_string(payload, "schema", "flowchain.production_l1.transaction_payload.v0")?; + expect_string(payload, "payloadType", &payload_type)?; + let actor_account_id = required_string(payload, "actorAccountId")?; + let account_nonce = required_u64_string(payload, "accountNonce")?; + if account_nonce != nonce { + return Err(DevnetError::ProtocolStaleNonce { + account_id: actor_account_id, + expected: nonce, + actual: account_nonce, + }); + } + + let signer = envelope + .get("signer") + .ok_or_else(|| DevnetError::ProtocolSchemaValidation("missing signer".to_string()))?; + let signer_account_id = required_string(signer, "accountId")?; + let signer_public_key = required_string(signer, "publicKey")?; + let signer_address = required_string(signer, "address")?; + if signer_account_id != actor_account_id { + return Err(DevnetError::ProtocolMalformedTxId(tx_id)); + } + + let account = state + .protocol_accounts + .get(&signer_account_id) + .ok_or_else(|| DevnetError::ProtocolAccountMissing(signer_account_id.clone()))?; + if account.status != "active" { + return Err(DevnetError::ProtocolAccountInactive(signer_account_id.clone())); + } + if account.public_key != signer_public_key || account.address != signer_address { + return Err(DevnetError::ProtocolMalformedTxId(tx_id)); + } + if account.next_nonce != nonce { + return Err(DevnetError::ProtocolStaleNonce { + account_id: signer_account_id, + expected: account.next_nonce, + actual: nonce, + }); + } + + let recomputed_payload_hash = hash_json("flowchain.production_l1.payload_hash.v0", payload); + if recomputed_payload_hash != payload_hash { + return Err(DevnetError::ProtocolMalformedPayloadHash(payload_type)); + } + let recomputed_tx_id = hash_json( + "flowchain.production_l1.tx_id.v0", + &serde_json::json!({ + "chainId": PRODUCTION_L1_CHAIN_ID, + "networkProfile": PRODUCTION_L1_NETWORK_PROFILE, + "genesisHash": PRODUCTION_L1_GENESIS_HASH, + "nonce": nonce.to_string(), + "signerAccountId": signer_account_id, + "payloadType": payload_type, + "payloadHash": payload_hash + }), + ); + if recomputed_tx_id != tx_id { + return Err(DevnetError::ProtocolMalformedTxId(tx_id)); + } + + let event_types = emitted_event_types(payload)?; + if event_types.is_empty() { + return Err(DevnetError::ProtocolInvalidEvent(payload_type)); + } + if let Some(expected_event) = expected_event_type(&payload_type) + && !event_types.iter().any(|event_type| event_type == expected_event) + { + return Err(DevnetError::ProtocolInvalidEvent(format!( + "{payload_type} expected {expected_event}" + ))); + } + + let receipt_id = production_receipt_id(&tx_id, &payload_type, "succeeded"); + let event_ids: Vec = event_types + .iter() + .enumerate() + .map(|(index, event_type)| production_event_id(&tx_id, &receipt_id, event_type, index)) + .collect(); + let details = payload + .get("details") + .ok_or_else(|| DevnetError::ProtocolSchemaValidation("missing payload.details".to_string()))?; + let bridge_evidence_refs = apply_production_l1_payload( + state, + &tx_id, + &receipt_id, + event_ids + .first() + .ok_or_else(|| DevnetError::ProtocolInvalidEvent(payload_type.clone()))?, + &payload_type, + &signer_account_id, + details, + )?; + + if let Some(account) = state.protocol_accounts.get_mut(&signer_account_id) { + account.next_nonce += 1; + } + + let state_root_after = state_root(state); + let subject_id = subject_id_for_payload(payload, details)?; + for (index, event_type) in event_types.iter().enumerate() { + let event_id = event_ids[index].clone(); + let mut attributes = BTreeMap::new(); + attributes.insert("payloadType".to_string(), payload_type.clone()); + attributes.insert("payloadId".to_string(), required_string(payload, "payloadId")?); + attributes.insert("txId".to_string(), tx_id.clone()); + let event = ProtocolEvent { + event_id: event_id.clone(), + event_type: event_type.clone(), + payload_type: payload_type.clone(), + tx_id: tx_id.clone(), + receipt_id: receipt_id.clone(), + block_height: state.next_block_number, + event_index: state.protocol_events.len() as u64, + emitter_account_id: signer_account_id.clone(), + subject_id: subject_id.clone(), + attributes, + }; + state.protocol_event_receipt_index.insert( + event_id.clone(), + ProtocolEventReceiptIndexEntry { + event_id: event_id.clone(), + receipt_id: receipt_id.clone(), + tx_id: tx_id.clone(), + event_type: event_type.clone(), + block_height: state.next_block_number, + }, + ); + state.protocol_events.insert(event_id, event); + } + + let deterministic_id_input = hash_json( + "flowchain.production_l1.receipt_id_input.v0", + &serde_json::json!({ + "txId": tx_id, + "payloadType": payload_type, + "status": "succeeded" + }), + ); + state.protocol_receipts.insert( + receipt_id.clone(), + ProtocolReceipt { + receipt_id, + tx_id, + payload_type, + status: "succeeded".to_string(), + execution_cost_units: 1_000 + state.protocol_receipts.len() as u64 * 10, + state_delta_ref: hash_json( + "flowchain.production_l1.state_delta_ref.v0", + &serde_json::json!({ + "txId": envelope.get("txId").and_then(Value::as_str).unwrap_or_default(), + "payloadType": envelope.get("payloadType").and_then(Value::as_str).unwrap_or_default() + }), + ), + emitted_events: event_ids, + bridge_evidence_refs, + error_code: None, + failure_reason: None, + deterministic_id_input, + applied_at_block: state.next_block_number, + state_root_after, + }, + ); + + Ok(()) +} + +fn apply_production_l1_payload( + state: &mut ChainState, + _tx_id: &str, + receipt_id: &str, + event_id: &str, + payload_type: &str, + signer_account_id: &str, + details: &Value, +) -> Result, DevnetError> { + match payload_type { + "native_transfer" => { + let from = required_string(details, "fromAccountId")?; + let to = required_string(details, "toAccountId")?; + if from != signer_account_id { + return Err(DevnetError::ProtocolAccountMissing(from)); + } + let asset = required_string(details, "assetId")?; + let amount = required_u64_string(details, "amount")?; + debit_protocol_balance(state, &from, &asset, amount)?; + credit_protocol_balance(state, &to, &asset, amount)?; + Ok(Vec::new()) + } + "faucet_funding" => { + let to = required_string(details, "toAccountId")?; + let asset = required_string(details, "assetId")?; + let amount = required_u64_string(details, "amount")?; + credit_protocol_balance(state, &to, &asset, amount)?; + Ok(Vec::new()) + } + "bridge_credit" => { + let evidence_id = required_string(details, "bridgeEvidenceId")?; + let evidence = state + .protocol_bridge_evidence + .get(&evidence_id) + .cloned() + .ok_or_else(|| DevnetError::ProtocolBridgeEvidenceMissing(evidence_id.clone()))?; + validate_protocol_bridge_evidence(state, &evidence)?; + let amount = required_u64_string(details, "amount")?; + if amount > PRODUCTION_L1_BRIDGE_CREDIT_CAP_UNITS { + return Err(DevnetError::ProtocolBridgeAmountOverCap( + evidence.credit_id.clone(), + )); + } + if state + .protocol_bridge_replay_index + .contains_key(&evidence.duplicate_key) + { + return Err(DevnetError::ProtocolDuplicateBridgeEvent( + evidence.duplicate_key, + )); + } + let observation_id = required_string(details, "observationId")?; + let credit_id = required_string(details, "creditId")?; + let source_chain_id = required_u64_number(details, "sourceChainId")?; + let asset_id = required_string(details, "assetId")?; + let recipient = required_string(details, "recipientAccountId")?; + if evidence.evidence_type != "deposit_observation" + || evidence.observation_id != observation_id + || evidence.credit_id != credit_id + || evidence.source_chain_id != source_chain_id + || evidence.asset_id != asset_id + || evidence.local_recipient_account_id != recipient + || parse_u64_string(&evidence.amount, "amount")? != amount + { + return Err(DevnetError::ProtocolBridgeEvidenceMismatch(credit_id)); + } + credit_protocol_balance(state, &recipient, &asset_id, amount)?; + state.protocol_bridge_replay_index.insert( + evidence.duplicate_key.clone(), + ProtocolBridgeReplayIndexEntry { + duplicate_key: evidence.duplicate_key.clone(), + evidence_id: evidence.evidence_id.clone(), + credit_id: evidence.credit_id.clone(), + source_chain_id: evidence.source_chain_id, + lockbox_address: evidence.lockbox_address.clone(), + source_tx_hash: evidence.source_tx_hash.clone(), + source_log_index: evidence.source_log_index, + accepted_at_block: state.next_block_number, + }, + ); + state.protocol_bridge_credits.insert( + evidence.credit_id.clone(), + ProtocolBridgeCredit { + credit_id: evidence.credit_id.clone(), + evidence_id: evidence.evidence_id.clone(), + observation_id: evidence.observation_id.clone(), + duplicate_key: evidence.duplicate_key.clone(), + source_chain_id: evidence.source_chain_id, + lockbox_address: evidence.lockbox_address.clone(), + asset_id, + amount_units: amount, + recipient_account_id: recipient, + receipt_id: receipt_id.to_string(), + event_id: event_id.to_string(), + applied_at_block: state.next_block_number, + status: "applied".to_string(), + no_value: true, + }, + ); + Ok(vec![evidence_id]) + } + "token_launch" => { + let token_id = required_string(details, "tokenId")?; + if state.token_definitions.contains_key(&token_id) { + return Err(DevnetError::TokenAlreadyExists(token_id)); + } + let recipient = required_string(details, "recipientAccountId")?; + let initial_supply = required_u64_string(details, "initialSupply")?; + let symbol = required_string(details, "symbol")?; + state.token_definitions.insert( + token_id.clone(), + LocalTestToken { + token_id: token_id.clone(), + symbol, + name: required_string(details, "name")?, + decimals: required_u64_number(details, "decimals")? as u8, + launcher_account_id: required_string(details, "issuerAccountId")?, + total_supply_units: initial_supply, + launched_at_block: state.next_block_number, + no_value: true, + }, + ); + credit_protocol_balance(state, &recipient, &token_id, initial_supply)?; + Ok(Vec::new()) + } + "token_mint" => { + let token_id = required_string(details, "tokenId")?; + let to = required_string(details, "toAccountId")?; + let amount = required_u64_string(details, "amount")?; + let token = state + .token_definitions + .get_mut(&token_id) + .ok_or_else(|| DevnetError::TokenMissing(token_id.clone()))?; + token.total_supply_units = token + .total_supply_units + .checked_add(amount) + .ok_or_else(|| DevnetError::TokenBalanceOverflow(token_id.clone()))?; + credit_protocol_balance(state, &to, &token_id, amount)?; + state.token_mint_receipts.insert( + required_string(details, "mintId")?, + LocalTestTokenMintReceipt { + mint_id: required_string(details, "mintId")?, + token_id, + to_account_id: to, + amount_units: amount, + reason: required_string(details, "reasonHash")?, + minted_at_block: state.next_block_number, + no_value: true, + }, + ); + Ok(Vec::new()) + } + "token_transfer" => { + let token_id = required_string(details, "tokenId")?; + let from = required_string(details, "fromAccountId")?; + let to = required_string(details, "toAccountId")?; + let amount = required_u64_string(details, "amount")?; + debit_protocol_balance(state, &from, &token_id, amount)?; + credit_protocol_balance(state, &to, &token_id, amount)?; + Ok(Vec::new()) + } + "pool_create" => { + let pool_id = required_string(details, "poolId")?; + if state.dex_pools.contains_key(&pool_id) { + return Err(DevnetError::PoolAlreadyExists(pool_id)); + } + state.dex_pools.insert( + pool_id.clone(), + DexPool { + pool_id, + base_asset_id: required_string(details, "baseAssetId")?, + quote_asset_id: required_string(details, "quoteAssetId")?, + created_by_account_id: required_string(details, "creatorAccountId")?, + reserve_base_units: 0, + reserve_quote_units: 0, + total_lp_units: 0, + created_at_block: state.next_block_number, + updated_at_block: state.next_block_number, + last_liquidity_receipt_id: None, + last_swap_receipt_id: None, + no_value: true, + }, + ); + Ok(Vec::new()) + } + "add_liquidity" => { + let liquidity_id = required_string(details, "liquidityId")?; + let pool_id = required_string(details, "poolId")?; + let provider = required_string(details, "providerAccountId")?; + let base_amount = required_u64_string(details, "baseAmount")?; + let quote_amount = required_u64_string(details, "quoteAmount")?; + let min_lp_units = required_u64_string(details, "minLpUnits")?; + if state.liquidity_receipts.contains_key(&liquidity_id) { + return Err(DevnetError::LiquidityReceiptAlreadyExists(liquidity_id)); + } + let pool = state + .dex_pools + .get(&pool_id) + .ok_or_else(|| DevnetError::PoolMissing(pool_id.clone()))?; + let reserve_base_before = pool.reserve_base_units; + let reserve_quote_before = pool.reserve_quote_units; + let total_lp_before = pool.total_lp_units; + let lp_units = liquidity_units_for_add(pool, base_amount, quote_amount)?; + if lp_units < min_lp_units { + return Err(DevnetError::LiquidityBelowMinimum(liquidity_id)); + } + let base_asset_id = pool.base_asset_id.clone(); + let quote_asset_id = pool.quote_asset_id.clone(); + debit_protocol_balance(state, &provider, &base_asset_id, base_amount)?; + debit_protocol_balance(state, &provider, "e_asset_id, quote_amount)?; + let reserve_base_after = checked_pool_add(&pool_id, reserve_base_before, base_amount)?; + let reserve_quote_after = + checked_pool_add(&pool_id, reserve_quote_before, quote_amount)?; + let total_lp_after = checked_pool_add(&pool_id, total_lp_before, lp_units)?; + let pool = state + .dex_pools + .get_mut(&pool_id) + .expect("pool was checked before production liquidity mutation"); + pool.reserve_base_units = reserve_base_after; + pool.reserve_quote_units = reserve_quote_after; + pool.total_lp_units = total_lp_after; + pool.updated_at_block = state.next_block_number; + pool.last_liquidity_receipt_id = Some(liquidity_id.clone()); + let lp_position_id = deterministic_lp_position_id(&pool_id, &provider); + let position = state + .lp_positions + .entry(lp_position_id.clone()) + .or_insert_with(|| LpPosition { + lp_position_id, + pool_id: pool_id.clone(), + owner_account_id: provider.clone(), + lp_units: 0, + base_units_deposited: 0, + quote_units_deposited: 0, + base_units_withdrawn: 0, + quote_units_withdrawn: 0, + updated_at_block: state.next_block_number, + no_value: true, + }); + position.lp_units = position + .lp_units + .checked_add(lp_units) + .ok_or_else(|| DevnetError::PoolReserveOverflow(pool_id.clone()))?; + position.base_units_deposited = position + .base_units_deposited + .checked_add(base_amount) + .ok_or_else(|| DevnetError::PoolReserveOverflow(pool_id.clone()))?; + position.quote_units_deposited = position + .quote_units_deposited + .checked_add(quote_amount) + .ok_or_else(|| DevnetError::PoolReserveOverflow(pool_id.clone()))?; + position.updated_at_block = state.next_block_number; + state.liquidity_receipts.insert( + liquidity_id.clone(), + LiquidityReceipt { + liquidity_id, + pool_id, + provider_account_id: provider, + action: "add".to_string(), + base_amount_units: base_amount, + quote_amount_units: quote_amount, + lp_units, + reserve_base_before, + reserve_quote_before, + reserve_base_after, + reserve_quote_after, + executed_at_block: state.next_block_number, + no_value: true, + }, + ); + Ok(Vec::new()) + } + "remove_liquidity" => { + let liquidity_id = required_string(details, "liquidityId")?; + let pool_id = required_string(details, "poolId")?; + let provider = required_string(details, "providerAccountId")?; + let lp_units = required_u64_string(details, "lpUnits")?; + let min_base = required_u64_string(details, "minBaseAmount")?; + let min_quote = required_u64_string(details, "minQuoteAmount")?; + let pool = state + .dex_pools + .get(&pool_id) + .ok_or_else(|| DevnetError::PoolMissing(pool_id.clone()))?; + let reserve_base_before = pool.reserve_base_units; + let reserve_quote_before = pool.reserve_quote_units; + let total_lp_before = pool.total_lp_units; + let base_amount = + proportional_amount(reserve_base_before, lp_units, total_lp_before, &pool_id)?; + let quote_amount = + proportional_amount(reserve_quote_before, lp_units, total_lp_before, &pool_id)?; + if base_amount < min_base || quote_amount < min_quote { + return Err(DevnetError::LiquidityBelowMinimum(liquidity_id)); + } + let lp_position_id = deterministic_lp_position_id(&pool_id, &provider); + let position = state + .lp_positions + .get_mut(&lp_position_id) + .ok_or_else(|| DevnetError::LpPositionMissing(lp_position_id.clone()))?; + if position.lp_units < lp_units { + return Err(DevnetError::LpPositionInsufficient(lp_position_id)); + } + position.lp_units -= lp_units; + position.base_units_withdrawn += base_amount; + position.quote_units_withdrawn += quote_amount; + position.updated_at_block = state.next_block_number; + let base_asset_id = pool.base_asset_id.clone(); + let quote_asset_id = pool.quote_asset_id.clone(); + let reserve_base_after = reserve_base_before + .checked_sub(base_amount) + .ok_or_else(|| DevnetError::PoolReserveInsufficient(pool_id.clone()))?; + let reserve_quote_after = reserve_quote_before + .checked_sub(quote_amount) + .ok_or_else(|| DevnetError::PoolReserveInsufficient(pool_id.clone()))?; + let pool = state + .dex_pools + .get_mut(&pool_id) + .expect("pool was checked before production remove liquidity mutation"); + pool.reserve_base_units = reserve_base_after; + pool.reserve_quote_units = reserve_quote_after; + pool.total_lp_units = total_lp_before + .checked_sub(lp_units) + .ok_or_else(|| DevnetError::PoolReserveInsufficient(pool_id.clone()))?; + pool.updated_at_block = state.next_block_number; + pool.last_liquidity_receipt_id = Some(liquidity_id.clone()); + credit_protocol_balance(state, &provider, &base_asset_id, base_amount)?; + credit_protocol_balance(state, &provider, "e_asset_id, quote_amount)?; + state.liquidity_receipts.insert( + liquidity_id.clone(), + LiquidityReceipt { + liquidity_id, + pool_id, + provider_account_id: provider, + action: "remove".to_string(), + base_amount_units: base_amount, + quote_amount_units: quote_amount, + lp_units, + reserve_base_before, + reserve_quote_before, + reserve_base_after, + reserve_quote_after, + executed_at_block: state.next_block_number, + no_value: true, + }, + ); + Ok(Vec::new()) + } + "swap" => { + let swap_id = required_string(details, "swapId")?; + let pool_id = required_string(details, "poolId")?; + let trader = required_string(details, "traderAccountId")?; + let asset_in = required_string(details, "assetInId")?; + let amount_in = required_u64_string(details, "amountIn")?; + let min_amount_out = required_u64_string(details, "minAmountOut")?; + if state.swap_receipts.contains_key(&swap_id) { + return Err(DevnetError::SwapReceiptAlreadyExists(swap_id)); + } + let pool = state + .dex_pools + .get(&pool_id) + .ok_or_else(|| DevnetError::PoolMissing(pool_id.clone()))?; + let reserve_base_before = pool.reserve_base_units; + let reserve_quote_before = pool.reserve_quote_units; + let (asset_out, amount_out, reserve_base_after, reserve_quote_after) = + if asset_in == pool.base_asset_id { + let amount_out = quote_out_for_base_in(pool, amount_in)?; + ( + pool.quote_asset_id.clone(), + amount_out, + checked_pool_add(&pool_id, reserve_base_before, amount_in)?, + reserve_quote_before + .checked_sub(amount_out) + .ok_or_else(|| DevnetError::PoolReserveInsufficient(pool_id.clone()))?, + ) + } else if asset_in == pool.quote_asset_id { + let amount_out = base_out_for_quote_in(pool, amount_in)?; + ( + pool.base_asset_id.clone(), + amount_out, + reserve_base_before + .checked_sub(amount_out) + .ok_or_else(|| DevnetError::PoolReserveInsufficient(pool_id.clone()))?, + checked_pool_add(&pool_id, reserve_quote_before, amount_in)?, + ) + } else { + return Err(DevnetError::PoolInvalidAsset(asset_in)); + }; + if amount_out < min_amount_out { + return Err(DevnetError::SwapSlippageExceeded(swap_id)); + } + debit_protocol_balance(state, &trader, &asset_in, amount_in)?; + credit_protocol_balance(state, &trader, &asset_out, amount_out)?; + let pool = state + .dex_pools + .get_mut(&pool_id) + .expect("pool was checked before production swap mutation"); + pool.reserve_base_units = reserve_base_after; + pool.reserve_quote_units = reserve_quote_after; + pool.updated_at_block = state.next_block_number; + pool.last_swap_receipt_id = Some(swap_id.clone()); + state.swap_receipts.insert( + swap_id.clone(), + SwapReceipt { + swap_id, + pool_id, + trader_account_id: trader, + asset_in_id: asset_in, + asset_out_id: asset_out, + amount_in_units: amount_in, + amount_out_units: amount_out, + reserve_base_before, + reserve_quote_before, + reserve_base_after, + reserve_quote_after, + executed_at_block: state.next_block_number, + no_value: true, + }, + ); + Ok(Vec::new()) + } + "withdrawal_intent" => { + let withdrawal_intent_id = required_string(details, "withdrawalIntentId")?; + let source_account_id = required_string(details, "sourceAccountId")?; + let asset_id = required_string(details, "assetId")?; + let amount = required_u64_string(details, "amount")?; + debit_protocol_balance(state, &source_account_id, &asset_id, amount)?; + let release_evidence_id = state + .protocol_bridge_evidence + .values() + .find(|evidence| { + evidence + .release + .as_ref() + .is_some_and(|release| release.withdrawal_intent_id == withdrawal_intent_id) + }) + .map(|evidence| evidence.evidence_id.clone()); + state.protocol_withdrawals.insert( + withdrawal_intent_id.clone(), + ProtocolWithdrawalIntent { + withdrawal_intent_id, + source_account_id, + destination_chain_id: required_u64_number(details, "destinationChainId")?, + destination_address: required_string(details, "destinationAddress")?, + asset_id, + amount_units: amount, + release_policy_hash: required_string(details, "releasePolicyHash")?, + release_evidence_id: release_evidence_id.clone(), + receipt_id: receipt_id.to_string(), + event_id: event_id.to_string(), + status: "pending_release".to_string(), + created_at_block: state.next_block_number, + no_value: true, + }, + ); + Ok(release_evidence_id.into_iter().collect()) + } + "validator_authority_config" => { + let authority_id = required_string(details, "authorityId")?; + let validator_account_id = required_string(details, "validatorAccountId")?; + let account = state + .protocol_accounts + .get(&validator_account_id) + .ok_or_else(|| DevnetError::ProtocolAccountMissing(validator_account_id.clone()))?; + state.protocol_validator_authorities.insert( + authority_id.clone(), + ProtocolValidatorAuthority { + authority_id, + account_id: validator_account_id, + public_key: account.public_key.clone(), + address: account.address.clone(), + authority_type: required_string(details, "authorityType")?, + voting_power: required_u64_string(details, "votingPower")?, + finality_weight: required_u64_string(details, "votingPower")?, + metadata_hash: required_string(details, "metadataHash")?, + status: "active".to_string(), + production_ready: false, + }, + ); + Ok(Vec::new()) + } + "finality_vote" => { + let vote_id = required_string(details, "voteId")?; + state.protocol_finality_votes.insert( + vote_id.clone(), + ProtocolFinalityVote { + vote_id, + validator_account_id: required_string(details, "validatorAccountId")?, + height: required_u64_string(details, "height")?, + block_hash: required_string(details, "blockHash")?, + state_root: required_string(details, "stateRoot")?, + vote_round: required_u64_string(details, "voteRound")?, + receipt_id: receipt_id.to_string(), + event_id: event_id.to_string(), + recorded_at_block: state.next_block_number, + }, + ); + Ok(Vec::new()) + } + "finality_certificate" => { + let certificate_id = required_string(details, "certificateId")?; + let vote_ids = required_string_array(details, "voteIds")?; + for vote_id in &vote_ids { + if !state.protocol_finality_votes.contains_key(vote_id) { + return Err(DevnetError::ProtocolFinalityVoteMissing(vote_id.clone())); + } + } + state.protocol_finality_certificates.insert( + certificate_id.clone(), + ProtocolFinalityCertificate { + certificate_id, + height: required_u64_string(details, "height")?, + block_hash: required_string(details, "blockHash")?, + state_root: required_string(details, "stateRoot")?, + signer_set_root: required_string(details, "signerSetRoot")?, + vote_ids, + quorum_numerator: required_u64_number(details, "quorumNumerator")?, + quorum_denominator: required_u64_number(details, "quorumDenominator")?, + receipt_id: receipt_id.to_string(), + event_id: event_id.to_string(), + status: "accepted".to_string(), + accepted_at_block: state.next_block_number, + }, + ); + Ok(Vec::new()) + } + other if is_object_lifecycle_payload(other) => { + let lifecycle_update_id = required_string(details, "lifecycleUpdateId")?; + if state + .protocol_object_store + .contains_key(&lifecycle_update_id) + { + return Err(DevnetError::ProtocolObjectAlreadyExists( + lifecycle_update_id, + )); + } + state.protocol_object_store.insert( + lifecycle_update_id.clone(), + ProtocolObjectStoreEntry { + lifecycle_update_id, + payload_type: payload_type.to_string(), + object_type: required_string(details, "objectType")?, + operation: required_string(details, "operation")?, + object_id: required_string(details, "objectId")?, + object_hash: required_string(details, "objectHash")?, + status: required_string(details, "status")?, + rootfield_id: optional_string(details, "rootfieldId"), + source_receipt_id: optional_string(details, "sourceReceiptId"), + parent_object_id: optional_string(details, "parentObjectId"), + receipt_id: receipt_id.to_string(), + event_id: event_id.to_string(), + updated_at_block: state.next_block_number, + }, + ); + Ok(Vec::new()) + } + other => Err(DevnetError::ProtocolUnsupportedPayload(other.to_string())), + } +} + +fn parse_protocol_bridge_evidence(value: &Value) -> Result { + serde_json::from_value(value.clone()) + .map_err(|error| DevnetError::ProtocolSchemaValidation(error.to_string())) +} + +fn validate_protocol_bridge_evidence( + state: &ChainState, + evidence: &ProtocolBridgeEvidence, +) -> Result<(), DevnetError> { + if evidence.schema != "flowchain.production_l1.bridge_evidence.v0" { + return Err(DevnetError::ProtocolSchemaValidation( + evidence.evidence_id.clone(), + )); + } + if evidence.source_chain_id != PRODUCTION_L1_BASE_SOURCE_CHAIN_ID { + return Err(DevnetError::ProtocolInvalidBridgeSourceChain( + evidence.evidence_id.clone(), + )); + } + if evidence.source_network != PRODUCTION_L1_BASE_SOURCE_NETWORK { + return Err(DevnetError::ProtocolInvalidBridgeSourceChain( + evidence.evidence_id.clone(), + )); + } + if evidence.lockbox_address.to_ascii_lowercase() + != PRODUCTION_L1_LOCKBOX_ADDRESS.to_ascii_lowercase() + { + return Err(DevnetError::ProtocolWrongLockbox( + evidence.lockbox_address.clone(), + )); + } + if evidence.finality_status != "source_finalized" { + return Err(DevnetError::ProtocolBridgeConfirmationUnsatisfied( + evidence.evidence_id.clone(), + )); + } + let amount = parse_u64_string(&evidence.amount, "amount")?; + if amount == 0 || amount > PRODUCTION_L1_BRIDGE_CREDIT_CAP_UNITS { + return Err(DevnetError::ProtocolBridgeAmountOverCap( + evidence.evidence_id.clone(), + )); + } + if state + .protocol_bridge_replay_index + .contains_key(&evidence.duplicate_key) + || state + .protocol_bridge_evidence + .values() + .any(|stored| stored.duplicate_key == evidence.duplicate_key + && stored.evidence_id != evidence.evidence_id) + { + return Err(DevnetError::ProtocolDuplicateBridgeEvent( + evidence.duplicate_key.clone(), + )); + } + + let duplicate_key = protocol_bridge_duplicate_key(evidence); + if duplicate_key != evidence.duplicate_key { + return Err(DevnetError::ProtocolMutatedBridgeEvidence( + evidence.evidence_id.clone(), + )); + } + let evidence_hash = protocol_bridge_evidence_hash(evidence); + if evidence_hash != evidence.evidence_hash { + return Err(DevnetError::ProtocolMutatedBridgeEvidence( + evidence.evidence_id.clone(), + )); + } + let evidence_id = hash_json( + "flowchain.production_l1.bridge_evidence_id.v0", + &serde_json::json!({ "evidenceHash": evidence_hash }), + ); + if evidence_id != evidence.evidence_id { + return Err(DevnetError::ProtocolMutatedBridgeEvidence( + evidence.evidence_id.clone(), + )); + } + if evidence.evidence_type == "deposit_observation" && evidence.release.is_some() { + return Err(DevnetError::ProtocolSchemaValidation( + evidence.evidence_id.clone(), + )); + } + if evidence.evidence_type == "withdrawal_release" && evidence.release.is_none() { + return Err(DevnetError::ProtocolSchemaValidation( + evidence.evidence_id.clone(), + )); + } + Ok(()) +} + +fn protocol_bridge_duplicate_key(evidence: &ProtocolBridgeEvidence) -> String { + hash_json( + "flowchain.production_l1.bridge_duplicate_key.v0", + &protocol_source_event_key(evidence), + ) +} + +fn protocol_source_event_key(evidence: &ProtocolBridgeEvidence) -> Value { + serde_json::json!({ + "sourceChainId": evidence.source_chain_id, + "lockboxAddress": evidence.lockbox_address, + "sourceTxHash": evidence.source_tx_hash, + "sourceLogIndex": evidence.source_log_index + }) +} + +fn protocol_bridge_evidence_hash(evidence: &ProtocolBridgeEvidence) -> String { + hash_json( + "flowchain.production_l1.bridge_evidence_hash.v0", + &serde_json::json!({ + "evidenceType": evidence.evidence_type, + "sourceChainId": evidence.source_chain_id, + "sourceNetwork": evidence.source_network, + "lockboxAddress": evidence.lockbox_address, + "sourceTxHash": evidence.source_tx_hash, + "sourceBlockNumber": evidence.source_block_number, + "sourceLogIndex": evidence.source_log_index, + "tokenAddress": evidence.token_address, + "assetId": evidence.asset_id, + "depositorAddress": evidence.depositor_address, + "localRecipientAccountId": evidence.local_recipient_account_id, + "amount": evidence.amount, + "observedByRelayerAccountId": evidence.observed_by_relayer_account_id, + "finalityStatus": evidence.finality_status, + "observationId": evidence.observation_id, + "creditId": evidence.credit_id, + "release": evidence.release, + "duplicateKey": evidence.duplicate_key + }), + ) +} + +fn production_receipt_id(tx_id: &str, payload_type: &str, status: &str) -> String { + let receipt_id_input = hash_json( + "flowchain.production_l1.receipt_id_input.v0", + &serde_json::json!({ + "txId": tx_id, + "payloadType": payload_type, + "status": status + }), + ); + hash_json( + "flowchain.production_l1.receipt_id.v0", + &serde_json::json!({ "receiptIdInput": receipt_id_input }), + ) +} + +fn production_event_id(tx_id: &str, receipt_id: &str, event_type: &str, index: usize) -> String { + let deterministic_id_input = hash_json( + "flowchain.production_l1.event_id_input.v0", + &serde_json::json!({ + "txId": tx_id, + "receiptId": receipt_id, + "eventType": event_type, + "index": index + }), + ); + hash_json( + "flowchain.production_l1.event_id.v0", + &serde_json::json!({ "deterministicIdInput": deterministic_id_input }), + ) +} + +fn debit_protocol_balance( + state: &mut ChainState, + account_id: &str, + asset_id: &str, + amount_units: u64, +) -> Result<(), DevnetError> { + ensure_protocol_account_active(state, account_id)?; + let balance_id = protocol_balance_id(account_id, asset_id); + let balance = state + .protocol_balances + .get_mut(&balance_id) + .ok_or_else(|| DevnetError::ProtocolBalanceMissing(balance_id.clone()))?; + if balance.amount_units < amount_units { + return Err(DevnetError::ProtocolBalanceInsufficient(balance_id)); + } + balance.amount_units -= amount_units; + balance.updated_at_block = state.next_block_number; + Ok(()) +} + +fn credit_protocol_balance( + state: &mut ChainState, + account_id: &str, + asset_id: &str, + amount_units: u64, +) -> Result<(), DevnetError> { + ensure_protocol_account_active(state, account_id)?; + if amount_units == 0 { + return Err(DevnetError::ProtocolBalanceOverflow(account_id.to_string())); + } + let balance_id = protocol_balance_id(account_id, asset_id); + let balance = state + .protocol_balances + .entry(balance_id.clone()) + .or_insert_with(|| ProtocolBalance { + balance_id, + account_id: account_id.to_string(), + asset_id: asset_id.to_string(), + amount_units: 0, + balance_type: if asset_id == PRODUCTION_L1_NATIVE_ASSET_ID { + "native_local_unit".to_string() + } else { + "test_token".to_string() + }, + updated_at_block: state.next_block_number, + no_value: true, + }); + balance.amount_units = balance + .amount_units + .checked_add(amount_units) + .ok_or_else(|| DevnetError::ProtocolBalanceOverflow(balance.balance_id.clone()))?; + balance.updated_at_block = state.next_block_number; + Ok(()) +} + +fn ensure_protocol_account_active(state: &ChainState, account_id: &str) -> Result<(), DevnetError> { + match state.protocol_accounts.get(account_id) { + Some(account) if account.status == "active" => Ok(()), + Some(_) => Err(DevnetError::ProtocolAccountInactive(account_id.to_string())), + None => Err(DevnetError::ProtocolAccountMissing(account_id.to_string())), + } +} + +fn expected_event_type(payload_type: &str) -> Option<&'static str> { + Some(match payload_type { + "native_transfer" => "NativeTransferRecorded", + "faucet_funding" => "FaucetFundingRecorded", + "bridge_credit" => "BridgeCreditApplied", + "token_launch" => "TokenLaunched", + "token_mint" => "TokenMinted", + "token_transfer" => "TokenTransferred", + "pool_create" => "PoolCreated", + "add_liquidity" => "LiquidityAdded", + "remove_liquidity" => "LiquidityRemoved", + "swap" => "SwapExecuted", + "withdrawal_intent" => "WithdrawalIntentRecorded", + "validator_authority_config" => "ValidatorAuthorityConfigured", + "finality_vote" => "FinalityVoteRecorded", + "finality_certificate" => "FinalityCertificateRecorded", + other if is_object_lifecycle_payload(other) => "ObjectLifecycleUpdated", + _ => return None, + }) +} + +fn is_object_lifecycle_payload(payload_type: &str) -> bool { + matches!( + payload_type, + "agent_account_update" + | "model_passport_update" + | "work_receipt_update" + | "artifact_availability_proof_update" + | "verifier_module_update" + | "verifier_report_update" + | "memory_cell_update" + | "challenge_update" + | "finality_receipt_update" + ) +} + +fn emitted_event_types(payload: &Value) -> Result, DevnetError> { + payload + .get("emittedEventTypes") + .and_then(Value::as_array) + .ok_or_else(|| DevnetError::ProtocolInvalidEvent("missing emittedEventTypes".to_string()))? + .iter() + .map(|value| { + value.as_str().map(ToOwned::to_owned).ok_or_else(|| { + DevnetError::ProtocolInvalidEvent("event type must be a string".to_string()) + }) + }) + .collect() +} + +fn subject_id_for_payload(payload: &Value, details: &Value) -> Result { + for key in [ + "tokenId", + "poolId", + "creditId", + "withdrawalIntentId", + "objectId", + "authorityId", + ] { + if let Some(value) = details.get(key).and_then(Value::as_str) { + return Ok(value.to_string()); + } + } + required_string(payload, "payloadId") +} + +fn expect_string(value: &Value, key: &str, expected: &str) -> Result<(), DevnetError> { + let actual = required_string(value, key)?; + if actual == expected { + return Ok(()); + } + match key { + "chainId" => Err(DevnetError::ProtocolWrongChainId(actual)), + "networkProfile" => Err(DevnetError::ProtocolWrongNetworkProfile(actual)), + "genesisHash" => Err(DevnetError::ProtocolWrongGenesisHash(actual)), + _ => Err(DevnetError::ProtocolSchemaValidation(format!( + "{key} expected {expected} got {actual}" + ))), + } +} + +fn required_string(value: &Value, key: &str) -> Result { + value + .get(key) + .and_then(Value::as_str) + .map(ToOwned::to_owned) + .ok_or_else(|| DevnetError::ProtocolSchemaValidation(format!("missing string {key}"))) +} + +fn optional_string(value: &Value, key: &str) -> Option { + value.get(key).and_then(Value::as_str).map(ToOwned::to_owned) +} + +fn required_string_array(value: &Value, key: &str) -> Result, DevnetError> { + value + .get(key) + .and_then(Value::as_array) + .ok_or_else(|| DevnetError::ProtocolSchemaValidation(format!("missing array {key}")))? + .iter() + .map(|entry| { + entry.as_str().map(ToOwned::to_owned).ok_or_else(|| { + DevnetError::ProtocolSchemaValidation(format!("{key} entries must be strings")) + }) + }) + .collect() +} + +fn required_u64_string(value: &Value, key: &str) -> Result { + let raw = required_string(value, key)?; + parse_u64_string(&raw, key) +} + +fn required_u64_number(value: &Value, key: &str) -> Result { + if let Some(number) = value.get(key).and_then(Value::as_u64) { + return Ok(number); + } + required_u64_string(value, key) +} + +fn parse_u64_string(raw: &str, key: &str) -> Result { + raw.parse::().map_err(|_| { + DevnetError::ProtocolSchemaValidation(format!("{key} must be a u64 string")) + }) +} + fn ensure_expected_id(kind: &str, actual: &str, expected: &str) -> Result<(), DevnetError> { if actual != expected { return Err(DevnetError::DeterministicIdMismatch { diff --git a/crates/flowmemory-devnet/tests/devnet_tests.rs b/crates/flowmemory-devnet/tests/devnet_tests.rs index 99287194..2ba0b0b3 100644 --- a/crates/flowmemory-devnet/tests/devnet_tests.rs +++ b/crates/flowmemory-devnet/tests/devnet_tests.rs @@ -6,6 +6,7 @@ use flowmemory_devnet::model::{ product_demo_transactions, queue_transaction, state_map_roots, state_root, }; use flowmemory_devnet::{canonical_json, keccak_hex}; +use serde_json::Value; use std::process::Command; #[test] @@ -268,6 +269,164 @@ fn every_core_transaction_type_can_be_applied() { assert_eq!(state.base_anchors.len(), 1); } +#[test] +fn production_l1_bridge_credit_updates_live_state_roots_receipts_and_replay_index() { + let mut state = genesis_state(); + let initial_root = state_root(&state); + + for evidence in production_bridge_evidence_fixture() { + queue_transaction( + &mut state, + Transaction::ApplyProtocolBridgeEvidence { evidence }, + ); + } + let evidence_block = build_block(&mut state); + assert!( + evidence_block + .receipts + .iter() + .all(|receipt| receipt.status == "applied") + ); + + for envelope in production_transaction_fixture() { + queue_transaction( + &mut state, + Transaction::ApplyProductionL1Transaction { envelope }, + ); + } + let tx_block = build_block(&mut state); + assert!( + tx_block + .receipts + .iter() + .all(|receipt| receipt.status == "applied"), + "{:?}", + tx_block.receipts + ); + + assert_ne!(initial_root, state_root(&state)); + assert_eq!(tx_block.state_root, state_root(&state)); + assert_eq!(state.protocol_bridge_evidence.len(), 2); + assert_eq!(state.protocol_bridge_credits.len(), 1); + assert_eq!(state.protocol_bridge_replay_index.len(), 1); + assert_eq!(state.protocol_receipts.len(), 23); + assert_eq!(state.protocol_events.len(), 23); + assert_eq!(state.protocol_event_receipt_index.len(), 23); + assert_eq!(state.protocol_withdrawals.len(), 1); + assert_eq!(state.protocol_finality_votes.len(), 1); + assert_eq!(state.protocol_finality_certificates.len(), 1); + assert_eq!(state.protocol_object_store.len(), 9); + + let credit = state + .protocol_bridge_credits + .values() + .next() + .expect("bridge credit"); + assert_eq!(credit.status, "applied"); + assert!( + state + .protocol_receipts + .get(&credit.receipt_id) + .expect("credit receipt") + .bridge_evidence_refs + .contains(&credit.evidence_id) + ); + assert!( + state + .protocol_events + .get(&credit.event_id) + .expect("credit event") + .event_type + == "BridgeCreditApplied" + ); + + let roots = state_map_roots(&state); + assert!(roots.protocol_bridge_credit_root.starts_with("0x")); + assert!(roots.protocol_bridge_replay_index_root.starts_with("0x")); + assert!(roots.protocol_event_receipt_index_root.starts_with("0x")); +} + +#[test] +fn production_l1_bridge_evidence_rejects_duplicate_invalid_and_mutated_cases() { + let valid = production_bridge_evidence_fixture() + .into_iter() + .next() + .expect("deposit evidence"); + + let mut state = genesis_state(); + apply_transaction( + &mut state, + &Transaction::ApplyProtocolBridgeEvidence { + evidence: valid.clone(), + }, + ) + .unwrap(); + assert!(matches!( + apply_transaction( + &mut state, + &Transaction::ApplyProtocolBridgeEvidence { + evidence: valid.clone() + }, + ), + Err(DevnetError::ProtocolDuplicateBridgeEvent(_)) + )); + + let mut invalid_chain = valid.clone(); + invalid_chain["sourceChainId"] = Value::from(1); + assert!(matches!( + apply_transaction( + &mut genesis_state(), + &Transaction::ApplyProtocolBridgeEvidence { + evidence: invalid_chain + }, + ), + Err(DevnetError::ProtocolInvalidBridgeSourceChain(_)) + )); + + let mut wrong_lockbox = valid.clone(); + wrong_lockbox["lockboxAddress"] = + Value::from("0x1111111111111111111111111111111111111111"); + assert!(matches!( + apply_transaction( + &mut genesis_state(), + &Transaction::ApplyProtocolBridgeEvidence { + evidence: wrong_lockbox + }, + ), + Err(DevnetError::ProtocolWrongLockbox(_)) + )); + + let mut over_cap = valid.clone(); + over_cap["amount"] = Value::from("5000001"); + assert!(matches!( + apply_transaction( + &mut genesis_state(), + &Transaction::ApplyProtocolBridgeEvidence { evidence: over_cap }, + ), + Err(DevnetError::ProtocolBridgeAmountOverCap(_)) + )); + + let mut pending = valid.clone(); + pending["finalityStatus"] = Value::from("source_pending"); + assert!(matches!( + apply_transaction( + &mut genesis_state(), + &Transaction::ApplyProtocolBridgeEvidence { evidence: pending }, + ), + Err(DevnetError::ProtocolBridgeConfirmationUnsatisfied(_)) + )); + + let mut mutated = valid; + mutated["depositorAddress"] = Value::from("0x2222222222222222222222222222222222222222"); + assert!(matches!( + apply_transaction( + &mut genesis_state(), + &Transaction::ApplyProtocolBridgeEvidence { evidence: mutated }, + ), + Err(DevnetError::ProtocolMutatedBridgeEvidence(_)) + )); +} + #[test] fn local_faucet_and_transfer_update_test_unit_ledger() { let mut state = genesis_state(); @@ -1204,6 +1363,98 @@ fn cli_export_import_state_round_trip_is_deterministic() { std::fs::remove_dir_all(&temp).expect("cleanup temp dir"); } +#[test] +fn cli_export_import_preserves_live_l1_bridge_protocol_objects() { + let temp = temp_dir("production-l1-export-import"); + let state = temp.join("state.json"); + let imported = temp.join("imported-state.json"); + let snapshot = temp.join("snapshot.json"); + let evidence = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) + .join("..") + .join("..") + .join("fixtures") + .join("production-l1") + .join("bridge-evidence.valid.json"); + let transactions = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) + .join("..") + .join("..") + .join("fixtures") + .join("production-l1") + .join("transactions.valid.json"); + + let init = Command::new(env!("CARGO_BIN_EXE_flowmemory-devnet")) + .args(["--state", state.to_str().expect("state path"), "init"]) + .status() + .expect("init production state"); + assert!(init.success()); + for fixture in [&evidence, &transactions] { + let submit = Command::new(env!("CARGO_BIN_EXE_flowmemory-devnet")) + .args([ + "--state", + state.to_str().expect("state path"), + "submit-fixture", + "--fixture", + fixture.to_str().expect("fixture path"), + ]) + .status() + .expect("submit production fixture"); + assert!(submit.success()); + let block = Command::new(env!("CARGO_BIN_EXE_flowmemory-devnet")) + .args([ + "--state", + state.to_str().expect("state path"), + "start", + "--blocks", + "1", + ]) + .status() + .expect("build production fixture block"); + assert!(block.success()); + } + + let export_status = Command::new(env!("CARGO_BIN_EXE_flowmemory-devnet")) + .args([ + "--state", + state.to_str().expect("state path"), + "export-state", + "--out", + snapshot.to_str().expect("snapshot path"), + ]) + .status() + .expect("export production state"); + assert!(export_status.success()); + + let import_status = Command::new(env!("CARGO_BIN_EXE_flowmemory-devnet")) + .args([ + "--state", + imported.to_str().expect("imported path"), + "import-state", + "--from", + snapshot.to_str().expect("snapshot path"), + ]) + .status() + .expect("import production state"); + assert!(import_status.success()); + + let original_body = std::fs::read_to_string(&state).expect("original state"); + let imported_body = std::fs::read_to_string(&imported).expect("imported state"); + assert_eq!(original_body, imported_body); + let imported_json: Value = serde_json::from_str(&imported_body).expect("imported json"); + assert_eq!(imported_json["protocolBridgeCredits"].as_object().unwrap().len(), 1); + assert_eq!(imported_json["protocolBridgeReplayIndex"].as_object().unwrap().len(), 1); + assert_eq!(imported_json["protocolReceipts"].as_object().unwrap().len(), 23); + assert_eq!( + imported_json["protocolEventReceiptIndex"] + .as_object() + .unwrap() + .len(), + 23 + ); + assert_eq!(imported_json["protocolFinalityCertificates"].as_object().unwrap().len(), 1); + + std::fs::remove_dir_all(&temp).expect("cleanup temp dir"); +} + #[test] fn cli_node_runs_ten_blocks_and_includes_authorized_inbox_tx() { let temp = temp_dir("cli-node"); @@ -1396,6 +1647,36 @@ fn temp_dir(name: &str) -> std::path::PathBuf { temp } +fn production_bridge_evidence_fixture() -> Vec { + let path = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) + .join("..") + .join("..") + .join("fixtures") + .join("production-l1") + .join("bridge-evidence.valid.json"); + let body = std::fs::read_to_string(path).expect("bridge evidence fixture"); + let value: Value = serde_json::from_str(&body).expect("bridge evidence json"); + value["bridgeEvidence"] + .as_array() + .expect("bridgeEvidence array") + .clone() +} + +fn production_transaction_fixture() -> Vec { + let path = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) + .join("..") + .join("..") + .join("fixtures") + .join("production-l1") + .join("transactions.valid.json"); + let body = std::fs::read_to_string(path).expect("production transaction fixture"); + let value: Value = serde_json::from_str(&body).expect("production transaction json"); + value["transactions"] + .as_array() + .expect("transactions array") + .clone() +} + fn run_demo_chain() -> ( String, String, diff --git a/docs/DECISIONS/2026-05-13-flowchain-private-local-protocol-contract.md b/docs/DECISIONS/2026-05-13-flowchain-private-local-protocol-contract.md new file mode 100644 index 00000000..d01cf957 --- /dev/null +++ b/docs/DECISIONS/2026-05-13-flowchain-private-local-protocol-contract.md @@ -0,0 +1,45 @@ +# FlowChain Private/Local Protocol Contract + +Date: 2026-05-13 + +## Status + +Accepted for the private/local testnet package. + +## Context + +Runtime, crypto, RPC, wallet, bridge, and dashboard agents need one source of truth for profile IDs, genesis, accounts, transaction envelopes, payloads, blocks, receipts, events, bridge evidence, state roots, finality, and export snapshots. + +The existing Rust devnet and control-plane surfaces already model many of these concepts, but they did not have one schema-backed fixture package that every downstream agent could validate. + +## Decision + +Add private/local FlowChain protocol schemas under `schemas/flowmemory/production-*.schema.json` and deterministic fixtures under `fixtures/production-l1/`. + +The canonical profile IDs are: + +- `flowchain-local-private` +- `flowchain-local-multinode` +- `flowchain-base8453-pilot` + +The old phrases `flowchain-local` and `flowchain-private-lan` are aliases only. They are not valid signing-domain profile IDs. + +The Base pilot profile is local/private on the destination side and uses Base chain ID `8453` only as the source evidence chain. + +## Consequences + +- Downstream agents can run `npm run validate:production-l1-protocol` and `npm run validate:production-l1-fixtures`. +- The fixture package contains one valid transaction for every payload type and one invalid transaction for every payload type. +- Bridge duplicate-source-event rejection has a stable error code. +- State roots and genesis hashes are deterministic and recomputed by validation. + +## Scope Boundaries + +This decision does not authorize public mainnet readiness, public validators, tokenomics, value-bearing bridge readiness, audited cryptography, public RPC, or hosted services. + +## Follow-Ups + +- Runtime agent: implement typed state transition checks against the payload catalog. +- Wallet/crypto agent: replace fixture-only signatures with the accepted local signing helper. +- Bridge agent: preserve source event duplicate keys from bounded Base readers. +- RPC/dashboard agents: display structured receipt failure reasons and finality states. diff --git a/docs/agent-runs/production-l1-protocol/BRIDGE_PROTOCOL_SPEC.md b/docs/agent-runs/production-l1-protocol/BRIDGE_PROTOCOL_SPEC.md new file mode 100644 index 00000000..9c65abf4 --- /dev/null +++ b/docs/agent-runs/production-l1-protocol/BRIDGE_PROTOCOL_SPEC.md @@ -0,0 +1,46 @@ +# Bridge Protocol Spec + +This is a local/private bridge accounting contract for agents. It is not a value-bearing bridge readiness claim. + +## Base 8453 Pilot + +`flowchain-base8453-pilot` has destination chain ID `7428453` and source chain ID `8453`. Source evidence uses Base transaction/log coordinates, while destination execution remains local/private. + +## Evidence Fields + +`production-bridge-evidence.schema.json` requires: + +- `sourceChainId` +- `sourceNetwork` +- `lockboxAddress` +- `sourceTxHash` +- `sourceBlockNumber` +- `sourceLogIndex` +- `tokenAddress` +- `assetId` +- `depositorAddress` +- `localRecipientAccountId` +- `amount` +- `observationId` +- `creditId` +- `duplicateKey` +- `evidenceHash` +- `observedByRelayerAccountId` +- `finalityStatus` + +Withdrawal release evidence additionally requires `withdrawalIntentId`, `releaseTxHash`, `releaseBlockNumber`, `releaseLogIndex`, `releasedToAddress`, and `releaseAuthorityAccountId`. + +## ID Derivation + +- Observation ID input: source chain ID, lockbox address, source transaction hash, and source log index. +- Credit ID input: observation ID, local recipient, asset, and amount. +- Duplicate key input: source chain ID, lockbox address, source transaction hash, and source log index. + +The runtime must reject a second evidence object with the same duplicate key with `FC_PROTO_DUPLICATE_BRIDGE_EVENT`. + +## Fixtures + +- Deposit observation and local credit evidence: `fixtures/production-l1/bridge-evidence.valid.json` +- Bridge credit transaction: `fixtures/production-l1/transactions.valid.json` +- Withdrawal intent transaction and release evidence: `fixtures/production-l1/transactions.valid.json` and `fixtures/production-l1/bridge-evidence.valid.json` +- Invalid source chain and duplicate source event cases: `fixtures/production-l1/negative-fixtures.json` diff --git a/docs/agent-runs/production-l1-protocol/CHECKLIST.md b/docs/agent-runs/production-l1-protocol/CHECKLIST.md new file mode 100644 index 00000000..50798d74 --- /dev/null +++ b/docs/agent-runs/production-l1-protocol/CHECKLIST.md @@ -0,0 +1,44 @@ +# FlowChain Private/Local Protocol Checklist + +## Required Reading + +- [x] `AGENTS.md` +- [x] `docs/START_HERE.md` +- [x] `docs/FLOWMEMORY_HQ_CONTEXT.md` +- [x] `docs/CURRENT_STATE.md` +- [x] `docs/FLOWCHAIN_FULL_PRIVATE_TESTNET.md` +- [x] `docs/FLOWCHAIN_TESTNET_ACCEPTANCE.md` +- [x] `docs/FLOWCHAIN_AGENT_INTEGRATION_MAP.md` +- [x] `docs/ROOTFLOW_V0.md` +- [x] `docs/FLOW_MEMORY_V0.md` +- [x] `docs/V0_LAUNCH_ACCEPTANCE.md` +- [x] `docs/DECISIONS/` +- [x] `schemas/flowmemory/` +- [x] `fixtures/launch-core/` +- [x] `crypto/fixtures/` +- [x] `crates/flowmemory-devnet/src/model.rs` +- [x] `services/control-plane/src/types.ts` + +## Build Checklist + +- [x] Network profile schema and fixture coverage +- [x] Genesis schema and deterministic genesis builder/validator +- [x] Validator authority schema +- [x] Account public metadata schema +- [x] Transaction envelope schema +- [x] Transaction payload union schema +- [x] Block header and body schemas +- [x] Receipt and event schemas +- [x] State root manifest schema +- [x] Bridge evidence schema +- [x] Finality receipt schema +- [x] Export snapshot schema +- [x] Positive fixture set +- [x] Negative fixture set with stable error codes +- [x] `npm run validate:production-l1-protocol` +- [x] `npm run validate:production-l1-fixtures` +- [x] `git diff --check` + +## Stop Condition + +Stop only after schema and fixture validation commands pass and all 12 production-L1 layers have a protocol object or an explicit not-applicable reason. diff --git a/docs/agent-runs/production-l1-protocol/EXPERIMENTS.md b/docs/agent-runs/production-l1-protocol/EXPERIMENTS.md new file mode 100644 index 00000000..8977c747 --- /dev/null +++ b/docs/agent-runs/production-l1-protocol/EXPERIMENTS.md @@ -0,0 +1,31 @@ +# FlowChain Private/Local Protocol Experiments + +This file records validation commands and command-output summaries for the private/local protocol contract. + +## Planned Commands + +```powershell +npm run validate:production-l1-protocol +npm run validate:production-l1-fixtures +node fixtures/production-l1/production-l1-tools.mjs build-genesis +node fixtures/production-l1/production-l1-tools.mjs validate-genesis +node fixtures/production-l1/production-l1-tools.mjs genesis-hash +git diff --check +``` + +## Results + +- `node fixtures/production-l1/production-l1-tools.mjs validate-protocol` + - `FLOWCHAIN_PRODUCTION_L1_PROTOCOL_OK schemas=14 profiles=3 payloadTypes=23` +- `node fixtures/production-l1/production-l1-tools.mjs validate-fixtures` + - `FLOWCHAIN_PRODUCTION_L1_FIXTURES_OK transactions=23 receipts=23 events=23 bridgeEvidence=2 negativeCases=31 genesisHash=0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f stateRoot=0x716ccaf7e8946591973d4614d41ba39c047ef7e89bd67d62f1aa6d90b99133ef` +- `node fixtures/production-l1/production-l1-tools.mjs build-genesis` + - `FLOWCHAIN_PRODUCTION_L1_GENESIS_BUILD_OK genesisHash=0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f` +- `node fixtures/production-l1/production-l1-tools.mjs validate-genesis` + - `FLOWCHAIN_PRODUCTION_L1_GENESIS_OK genesisHash=0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f` +- `node fixtures/production-l1/production-l1-tools.mjs genesis-hash` + - `0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f` +- `node infra/scripts/check-unsafe-claims.mjs` + - `Checked launch claims in README.md, docs, contracts.` +- `git diff --check` + - Passed with line-ending warnings for `package.json` and `schemas/flowmemory/README.md`; no whitespace errors. diff --git a/docs/agent-runs/production-l1-protocol/GENESIS_PROOF.md b/docs/agent-runs/production-l1-protocol/GENESIS_PROOF.md new file mode 100644 index 00000000..0f169e5c --- /dev/null +++ b/docs/agent-runs/production-l1-protocol/GENESIS_PROOF.md @@ -0,0 +1,29 @@ +# Genesis Proof + +## Commands + +```powershell +node fixtures/production-l1/production-l1-tools.mjs build-genesis +node fixtures/production-l1/production-l1-tools.mjs validate-genesis +node fixtures/production-l1/production-l1-tools.mjs genesis-hash +npm run validate:production-l1-protocol +npm run validate:production-l1-fixtures +``` + +## Output Summary + +- Genesis profile: `flowchain-base8453-pilot` +- Destination chain ID: `7428453` +- Base source chain ID for bridge evidence: `8453` +- Genesis hash: `0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f` +- State root: `0x716ccaf7e8946591973d4614d41ba39c047ef7e89bd67d62f1aa6d90b99133ef` +- Public identities: two users, one validator, one bridge relayer, one bridge release authority, one emergency operator +- Secret material: none + +## Hash Inputs + +Genesis hash input fields are: + +`protocolVersion`, `networkProfile`, `chainId`, `genesisTimestamp`, `stateRootSeed`, `initialAccountsRoot`, `initialBalancesRoot`, `validatorSetRoot`, `bridgePilotConfigHash`, and `tokenDexBootstrapConfigHash`. + +The builder writes `fixtures/production-l1/genesis.json` from `fixtures/production-l1/genesis.input.json`. The validator recomputes the hash and fails on drift. diff --git a/docs/agent-runs/production-l1-protocol/HANDOFF.md b/docs/agent-runs/production-l1-protocol/HANDOFF.md new file mode 100644 index 00000000..9c0eed4f --- /dev/null +++ b/docs/agent-runs/production-l1-protocol/HANDOFF.md @@ -0,0 +1,75 @@ +# FlowChain Private/Local Protocol Handoff + +## Summary + +This pass adds a runnable private/local protocol contract for downstream FlowChain agents. It includes 14 JSON schemas, deterministic fixtures, a genesis builder/hash validator, semantic fixture validation, and negative cases with stable `FC_PROTO_*` error codes. + +## Validation Commands + +```powershell +npm run validate:production-l1-protocol +npm run validate:production-l1-fixtures +node fixtures/production-l1/production-l1-tools.mjs build-genesis +node fixtures/production-l1/production-l1-tools.mjs validate-genesis +node fixtures/production-l1/production-l1-tools.mjs genesis-hash +``` + +## Schema Names + +- `schemas/flowmemory/production-network-profile.schema.json` +- `schemas/flowmemory/production-genesis.schema.json` +- `schemas/flowmemory/production-validator-authority.schema.json` +- `schemas/flowmemory/production-account-public-metadata.schema.json` +- `schemas/flowmemory/production-transaction-envelope.schema.json` +- `schemas/flowmemory/production-transaction-payload.schema.json` +- `schemas/flowmemory/production-block-header.schema.json` +- `schemas/flowmemory/production-block-body.schema.json` +- `schemas/flowmemory/production-receipt.schema.json` +- `schemas/flowmemory/production-event.schema.json` +- `schemas/flowmemory/production-state-root-manifest.schema.json` +- `schemas/flowmemory/production-bridge-evidence.schema.json` +- `schemas/flowmemory/production-finality-receipt.schema.json` +- `schemas/flowmemory/production-export-snapshot.schema.json` + +## Fixture Paths + +- `fixtures/production-l1/profiles.json` +- `fixtures/production-l1/genesis.input.json` +- `fixtures/production-l1/genesis.json` +- `fixtures/production-l1/transactions.valid.json` +- `fixtures/production-l1/receipts.valid.json` +- `fixtures/production-l1/events.valid.json` +- `fixtures/production-l1/bridge-evidence.valid.json` +- `fixtures/production-l1/state-root-manifest.valid.json` +- `fixtures/production-l1/block.valid.json` +- `fixtures/production-l1/finality-receipt.valid.json` +- `fixtures/production-l1/export-snapshot.valid.json` +- `fixtures/production-l1/negative-fixtures.json` + +## Implementation Contract + +| schema | fixture | producer agent | consumer agent | command that validates it | open risk | +| --- | --- | --- | --- | --- | --- | +| `production-network-profile.schema.json` | `profiles.json` | protocol/HQ | runtime, wallet, bridge, RPC, dashboard | `npm run validate:production-l1-protocol` | Runtime must reject legacy aliases in signing domains. | +| `production-genesis.schema.json` | `genesis.input.json`, `genesis.json` | runtime | wallet, consensus, bridge, dashboard | `npm run validate:production-l1-fixtures` | Runtime must map this genesis to existing devnet config without losing old local fields. | +| `production-validator-authority.schema.json` | `genesis.json` | consensus | runtime, RPC, dashboard | `npm run validate:production-l1-fixtures` | Consensus agent must decide whether sequencer and validator stay separate later. | +| `production-account-public-metadata.schema.json` | `genesis.json` | wallet | runtime, bridge, RPC, dashboard | `npm run validate:production-l1-fixtures` | Wallet agent must implement real public-key/address derivation for non-fixture keys. | +| `production-transaction-envelope.schema.json` | `transactions.valid.json`, `negative-fixtures.json` | wallet/crypto | runtime, RPC, dashboard | `npm run validate:production-l1-fixtures` | Crypto agent must replace fixture digest signatures with the accepted signing helper. | +| `production-transaction-payload.schema.json` | `transactions.valid.json`, `negative-fixtures.json` | wallet/runtime/bridge/consensus | runtime, indexer, dashboard | `npm run validate:production-l1-fixtures` | Runtime must replace fixture precondition strings with typed state checks. | +| `production-block-header.schema.json` | `block.valid.json` | runtime | consensus, RPC, dashboard | `npm run validate:production-l1-fixtures` | Runtime must choose the exact mapping from existing `blockNumber` to `height`. | +| `production-block-body.schema.json` | `block.valid.json` | runtime | RPC, indexer, dashboard | `npm run validate:production-l1-fixtures` | Block body currently carries all valid transaction types in one fixture block. | +| `production-receipt.schema.json` | `receipts.valid.json` | runtime | RPC, indexer, dashboard | `npm run validate:production-l1-fixtures` | Runtime must emit failed receipts with structured `failureReason`. | +| `production-event.schema.json` | `events.valid.json` | runtime/indexer | RPC, dashboard | `npm run validate:production-l1-fixtures` | Indexer may need typed event-attribute schemas after dashboard usage settles. | +| `production-state-root-manifest.schema.json` | `state-root-manifest.valid.json` | runtime/crypto | consensus, RPC, dashboard | `npm run validate:production-l1-fixtures` | Runtime must implement component-root generation over real state maps. | +| `production-bridge-evidence.schema.json` | `bridge-evidence.valid.json`, `negative-fixtures.json` | bridge relayer | runtime, RPC, dashboard | `npm run validate:production-l1-fixtures` | Relayer must source Base `8453` evidence from bounded readers and preserve duplicate keys. | +| `production-finality-receipt.schema.json` | `finality-receipt.valid.json` | consensus | runtime, RPC, dashboard | `npm run validate:production-l1-fixtures` | Consensus agent must implement downgrade and superseded status semantics. | +| `production-export-snapshot.schema.json` | `export-snapshot.valid.json` | runtime/RPC | dashboard, operators, review | `npm run validate:production-l1-fixtures` | Export command must scan for secret material before publishing bundles. | + +## Open Runtime/RPC Contract + +- Accept only canonical profile IDs in envelopes. +- Validate `chainId`, `networkProfile`, and `genesisHash` before payload handling. +- Reject stale nonces before state transition. +- Recompute `payloadHash`, `txId`, receipt IDs, event IDs, component roots, state root, and block hash. +- Return stable `FC_PROTO_*` error codes for semantic rejection. +- Treat Base `8453` bridge source evidence as source-chain evidence only; destination state remains local/private. diff --git a/docs/agent-runs/production-l1-protocol/LIVE_L1_PROTOCOL_CONFORMANCE.md b/docs/agent-runs/production-l1-protocol/LIVE_L1_PROTOCOL_CONFORMANCE.md new file mode 100644 index 00000000..e6b7aa73 --- /dev/null +++ b/docs/agent-runs/production-l1-protocol/LIVE_L1_PROTOCOL_CONFORMANCE.md @@ -0,0 +1,77 @@ +# Live L1 Protocol Conformance + +Date: 2026-05-14 + +Final status: PASS + +Scope: private/local FlowChain L1 protocol gate for bridge lifecycle and spending. This is not a public validator or value-bearing launch approval. + +## Machine Reports + +- `devnet/local/live-l1-protocol/protocol-conformance-report.json` +- `devnet/local/live-l1-protocol/bridge-mock-e2e-report.json` +- `devnet/local/live-l1-protocol/no-secret-scan-report.json` + +The protocol conformance report currently records: + +- Protocol version: `flowchain.private_local_l1.protocol.v0` +- Chain ID: `7428453` +- Network profile: `flowchain-base8453-pilot` +- Genesis hash: `0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f` +- Live state root after bridge credit and transaction catalog execution: `0x5b06d140f4e0bb68879d41933640a31d9e2bd5c13d8e7702e40784db9bf9c2fb` + +## Code-Enforced Coverage + +The live Rust state machine now owns the private/local production protocol objects instead of treating them as side fixtures: + +- Genesis profile, chain ID, network profile, genesis hash, account signer identity, payload hash, transaction ID, and nonce are checked when production envelopes enter `apply_transaction`. +- Bridge evidence is accepted through the same pending transaction and block path as wallet, transfer, token, DEX, withdrawal, finality, and object lifecycle transactions. +- Bridge credits generate normal protocol receipts, events, event-receipt indexes, replay indexes, account balance updates, and state-root changes. +- State roots now commit protocol accounts, balances, validator authorities, bridge evidence, bridge credits, replay index, receipts, events, event receipt index, withdrawals, object store, finality votes, and finality certificates. +- Export/import preserves bridge credit, receipt, replay index, account balance, event receipt index, and finality state. + +The conformance gate fails if any live bridge/spending item is fixture-only or doc-only. + +## Negative Behavior + +`npm run flowchain:protocol:live-l1:verify` exercises these invalid bridge cases through live blocks and expects stable `FC_PROTO_*` errors: + +- Duplicate Base source event: `FC_PROTO_DUPLICATE_BRIDGE_EVENT` +- Invalid source chain: `FC_PROTO_INVALID_BRIDGE_SOURCE_CHAIN` +- Wrong lockbox: `FC_PROTO_WRONG_LOCKBOX` +- Over-cap amount: `FC_PROTO_BRIDGE_AMOUNT_OVER_CAP` +- Unsatisfied confirmation proof: `FC_PROTO_BRIDGE_CONFIRMATION_UNSATISFIED` +- Mutated bridge evidence: `FC_PROTO_MUTATED_BRIDGE_EVIDENCE` + +## Root Gates + +Added root scripts: + +- `npm run flowchain:protocol:live-l1:verify` +- `npm run flowchain:production-l1:e2e` +- `npm run flowchain:bridge:mock:e2e` +- `npm run flowchain:no-secret:scan` + +## Checks Run + +- `cargo test --manifest-path crates/flowmemory-devnet/Cargo.toml` - PASS, 30 tests +- `npm run flowchain:protocol:live-l1:verify` - PASS +- `npm run flowchain:production-l1:e2e` - PASS +- `npm run flowchain:bridge:mock:e2e` - PASS +- `npm run flowchain:no-secret:scan` - PASS +- `git diff --check` - PASS + +## Blockers + +Public/value-bearing launch remains CODE-BLOCKED: + +- Production consensus is incomplete: local finality vote/certificate rows are code-backed, but public validator consensus, fork choice, slashing, and quorum operation are not proven. +- Validator and audit readiness are incomplete: validator authority state exists, but independent validator operation and security audit evidence are not complete. +- Proof system is incomplete: proof circuits, audited proving, and public verifier economics are not implemented. +- Public bridge release remains blocked: Base evidence validation and local accounting are enforced only for the private/local no-value lifecycle gate. + +## Follow-Ups + +- Consensus lane must replace local finality rows with proven validator/fork-choice semantics before any broader launch claim. +- Crypto/proof lane must replace fixture digest signatures and proof placeholders with audited signing and proving paths. +- Bridge lane must connect bounded Base readers to live evidence production without weakening replay, lockbox, source-chain, finality, or cap checks. diff --git a/docs/agent-runs/production-l1-protocol/NOTES.md b/docs/agent-runs/production-l1-protocol/NOTES.md new file mode 100644 index 00000000..db22ad81 --- /dev/null +++ b/docs/agent-runs/production-l1-protocol/NOTES.md @@ -0,0 +1,18 @@ +# FlowChain Private/Local Protocol Notes + +## Context Notes + +- The current project phase is the FlowChain private/local L1 testnet package for second-computer validation. +- Current source-of-truth docs explicitly block production mainnet readiness, public validators, tokenomics, audited cryptography, and production bridge claims. +- Existing Rust devnet model already defines local no-value accounts, faucet records, product token/DEX transactions, local object lifecycle records, deterministic roots, and blocks. +- Existing control-plane types expose local methods for chain state, accounts, balances, transactions, blocks, bridge observations, credits, withdrawals, challenges, finality, and provenance. +- Existing schemas under `schemas/flowmemory/` cover Flow Memory V0 objects, local transaction envelopes, product transactions, bridge observations, bridge credits, withdrawals, and local wallet metadata. +- New schema package covers 14 private/local protocol objects and 23 payload families. +- New fixture package covers 23 valid transactions, 23 receipts, 23 events, two bridge evidence records, a deterministic block, a state root manifest, an export snapshot, and 31 negative cases. + +## Alignment Rules + +- Reuse camelCase field names already present in the Rust devnet and TypeScript control plane unless the production protocol contract needs a clearer wrapper. +- Keep profile names chain-bound so a transaction signed for one profile cannot validate on another profile. +- Bridge pilot evidence may reference Base chain id `8453`; destination FlowChain profiles remain local/private. +- Genesis fixtures contain public identities only and no secret material. diff --git a/docs/agent-runs/production-l1-protocol/PLAN.md b/docs/agent-runs/production-l1-protocol/PLAN.md new file mode 100644 index 00000000..4ce7d4aa --- /dev/null +++ b/docs/agent-runs/production-l1-protocol/PLAN.md @@ -0,0 +1,37 @@ +# FlowChain Private/Local Protocol Plan + +Date: 2026-05-13 + +## Scope + +Define the canonical private/local FlowChain protocol contract that downstream runtime, crypto, RPC, wallet, bridge, and dashboard agents can validate against. + +## Allowed Writes + +- `docs/` +- `docs/DECISIONS/` +- `schemas/flowmemory/` +- `fixtures/` +- `research/` +- `package.json` validation aliases only +- `docs/agent-runs/production-l1-protocol/` + +## Plan + +1. Read required repo context and existing schemas, fixtures, devnet model, and control-plane types. +2. Inventory existing field names and align the production protocol contract with them where practical. +3. Add canonical protocol schemas for profiles, genesis, accounts, authorities, transactions, payloads, blocks, receipts, events, state roots, bridge evidence, finality receipts, and export snapshots. +4. Add deterministic positive fixtures for genesis, all transaction families, receipts/events, bridge evidence, state roots, and a block containing at least five transaction types. +5. Add deterministic negative fixtures with stable expected error codes. +6. Add local validation tooling and npm aliases. +7. Run production protocol and fixture validation, genesis hash print/validation, deterministic state-root validation, and `git diff --check`. +8. Write handoff, catalog, matrix, state-transition, bridge, genesis-proof, and implementation-contract docs. + +## Non-Goals + +- No production mainnet readiness claim. +- No public validator onboarding. +- No tokenomics or validator economics. +- No production bridge readiness claim. +- No private key material in committed fixtures. +- No implementation changes under crates, services, contracts, crypto, apps, hardware, or local secret files. diff --git a/docs/agent-runs/production-l1-protocol/PROFILE_MATRIX.md b/docs/agent-runs/production-l1-protocol/PROFILE_MATRIX.md new file mode 100644 index 00000000..58e5d590 --- /dev/null +++ b/docs/agent-runs/production-l1-protocol/PROFILE_MATRIX.md @@ -0,0 +1,21 @@ +# FlowChain Profile Matrix + +The canonical profile IDs are the only values accepted in transaction envelopes. Legacy names are aliases for operator language and must not be used as signing domains. + +| Profile | Legacy alias | Chain ID | Network name | Genesis hash rule | Bridge source chains | Finality rule | Block time target | Default data directory | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | +| `flowchain-local-private` | `flowchain-local` | `742001` | FlowChain Local Private | Keccak-256 over canonical sorted JSON with domain `flowchain.production_l1.genesis_hash.v0` | `31337` | `single_authority_instant`, quorum `1/1` | 1000 ms | `devnet/local/flowchain-local-private` | +| `flowchain-local-multinode` | `flowchain-private-lan` | `742002` | FlowChain Local Multinode | Same domain and input fields | `31337`, `84532` | `quorum_2f_plus_1_checkpoint`, quorum `2/3` | 2000 ms | `devnet/local/flowchain-local-multinode` | +| `flowchain-base8453-pilot` | none | `7428453` | FlowChain Base 8453 Pilot Destination | Same domain and input fields | `8453` | `source_base_confirmed_destination_local_finalized`, quorum `1/1`, 12 source confirmations | 2000 ms | `devnet/local/flowchain-base8453-pilot` | + +`flowchain-base8453-pilot` is local/private on the destination side. Its source evidence is Base chain ID `8453`; this does not make the destination a public network. + +## Replay Boundary + +The signed envelope binds `chainId`, `networkProfile`, `genesisHash`, `nonceDomain`, signer, payload type, and payload hash. A transaction signed for one profile fails validation on another profile with `FC_PROTO_WRONG_CHAIN_ID`, `FC_PROTO_WRONG_NETWORK_PROFILE`, or `FC_PROTO_WRONG_GENESIS_HASH`. + +## Allowed Families + +All three profiles expose the same schema catalog so agents can build one parser. Runtime policy may disable families later, but the current private/local fixtures validate one transaction for every family: + +`native_transfer`, `faucet_funding`, `bridge_credit`, `token_launch`, `token_mint`, `token_transfer`, `pool_create`, `add_liquidity`, `remove_liquidity`, `swap`, `withdrawal_intent`, `validator_authority_config`, `finality_vote`, `finality_certificate`, and object lifecycle updates for `AgentAccount`, `ModelPassport`, `WorkReceipt`, `ArtifactAvailabilityProof`, `VerifierModule`, `VerifierReport`, `MemoryCell`, `Challenge`, and `FinalityReceipt`. diff --git a/docs/agent-runs/production-l1-protocol/PROTOCOL_INVENTORY.md b/docs/agent-runs/production-l1-protocol/PROTOCOL_INVENTORY.md new file mode 100644 index 00000000..85fadc03 --- /dev/null +++ b/docs/agent-runs/production-l1-protocol/PROTOCOL_INVENTORY.md @@ -0,0 +1,24 @@ +# Protocol Inventory + +| Layer | Protocol object | Fixture | Downstream owner | +| --- | --- | --- | --- | +| Network profiles | `production-network-profile.schema.json` | `profiles.json` | runtime, wallet, bridge | +| Chain ID and genesis hash | `production-genesis.schema.json` | `genesis.input.json`, `genesis.json` | crypto, runtime | +| Genesis state | `production-genesis.schema.json` | `genesis.json` | runtime, RPC, dashboard | +| Account/address model | `production-account-public-metadata.schema.json` | `genesis.json` | wallet, runtime, RPC | +| Transaction envelope | `production-transaction-envelope.schema.json` | `transactions.valid.json` | wallet, crypto, runtime | +| Payload catalog | `production-transaction-payload.schema.json` | `transactions.valid.json`, `negative-fixtures.json` | runtime, bridge, consensus | +| Block header/body | `production-block-header.schema.json`, `production-block-body.schema.json` | `block.valid.json` | runtime, RPC, indexer | +| Receipts/events | `production-receipt.schema.json`, `production-event.schema.json` | `receipts.valid.json`, `events.valid.json` | runtime, indexer, dashboard | +| State roots | `production-state-root-manifest.schema.json` | `state-root-manifest.valid.json` | runtime, crypto, consensus | +| Fork choice/finality | `production-finality-receipt.schema.json` | `finality-receipt.valid.json` | consensus, RPC | +| Positive flow | All required schemas | all `*.valid.json` fixtures | all implementation agents | +| Negative cases | transaction, state root, bridge semantic checks | `negative-fixtures.json` | runtime, RPC, wallet, bridge | + +## Runtime Field Alignment + +The schema uses camelCase to match existing generated JSON and control-plane responses. It aligns with the Rust devnet concepts for transactions, blocks, receipts, deterministic roots, local balances, token definitions, pools, LP positions, memory objects, challenges, and finality receipts. Where the current Rust model uses local names such as `blockNumber` and `logicalTime`, this contract adds the profile-bound header vocabulary that the runtime agent must map explicitly. + +## Control-Plane Field Alignment + +The inventory maps to current control-plane method families: `chain_status`, `block_get`, `transaction_get`, `account_get`, `balance_get`, `token_get`, `pool_get`, `bridge_observation_get`, `bridge_credit_get`, `withdrawal_get`, `challenge_get`, `finality_get`, and raw JSON export. diff --git a/docs/agent-runs/production-l1-protocol/RECEIPT_EVENT_CATALOG.md b/docs/agent-runs/production-l1-protocol/RECEIPT_EVENT_CATALOG.md new file mode 100644 index 00000000..51238171 --- /dev/null +++ b/docs/agent-runs/production-l1-protocol/RECEIPT_EVENT_CATALOG.md @@ -0,0 +1,37 @@ +# Receipt and Event Catalog + +Receipts validate through `production-receipt.schema.json`. Events validate through `production-event.schema.json`. + +| Payload type | Success receipt | Emitted event | Bridge evidence required | +| --- | --- | --- | --- | +| `native_transfer` | balance delta and cost | `NativeTransferRecorded` | no | +| `faucet_funding` | faucet credit and cost | `FaucetFundingRecorded` | no | +| `bridge_credit` | credit applied and cost | `BridgeCreditApplied` | yes, deposit observation | +| `token_launch` | token registry write and cost | `TokenLaunched` | no | +| `token_mint` | mint write and cost | `TokenMinted` | no | +| `token_transfer` | token balance delta and cost | `TokenTransferred` | no | +| `pool_create` | pool registry write and cost | `PoolCreated` | no | +| `add_liquidity` | reserve/LP delta and cost | `LiquidityAdded` | no | +| `remove_liquidity` | reserve/LP delta and cost | `LiquidityRemoved` | no | +| `swap` | reserve/balance delta and cost | `SwapExecuted` | no | +| `withdrawal_intent` | withdrawal queue write and cost | `WithdrawalIntentRecorded` | yes, release evidence when completed | +| `validator_authority_config` | validator-state write and cost | `ValidatorAuthorityConfigured` | no | +| `finality_vote` | vote-set write and cost | `FinalityVoteRecorded` | no | +| `finality_certificate` | certificate write and cost | `FinalityCertificateRecorded` | no | +| object lifecycle updates | object-store write and cost | `ObjectLifecycleUpdated` | no | + +## Failure Shape + +Failed execution still produces a receipt with: + +- `status: "failed"` +- `errorCode: "FC_..."` +- `failureReason.reasonCode` +- `failureReason.displayMessage` +- `failureReason.retryable` + +The RPC and dashboard agents should display `failureReason.displayMessage` and use `reasonCode` for filtering. Negative fixture validation returns stable `FC_PROTO_*` codes rather than a generic invalid result. + +## Deterministic IDs + +Receipt IDs are Keccak-256 hashes over `{ txId, payloadType, status }` under the receipt ID domain. Event IDs are Keccak-256 hashes over `{ txId, receiptId, eventType, index }` under the event ID domain. The validator recomputes the IDs and roots through `npm run validate:production-l1-fixtures`. diff --git a/docs/agent-runs/production-l1-protocol/STATE_TRANSITION_SPEC.md b/docs/agent-runs/production-l1-protocol/STATE_TRANSITION_SPEC.md new file mode 100644 index 00000000..8b82e242 --- /dev/null +++ b/docs/agent-runs/production-l1-protocol/STATE_TRANSITION_SPEC.md @@ -0,0 +1,33 @@ +# State Transition Spec + +Every payload includes explicit `preconditions`, `stateWrites`, `balanceChanges`, `nonceChange`, emitted event types, and index keys. Runtime agents should replace the fixture strings with typed checks while preserving the same observable contract. + +| Family | Preconditions | State writes | Balance changes | Nonce | Index keys | Invalid cases | +| --- | --- | --- | --- | --- | --- | --- | +| Native transfer | signer owns source account; amount positive; sufficient balance | transfer record | debit source, credit recipient | increment signer | payload type, actor | stale nonce, insufficient balance, malformed payload hash | +| Faucet funding | profile allows local funding; recipient exists | faucet record | credit recipient | increment signer | payload type, actor | faucet disabled, duplicate faucet id, malformed payload hash | +| Bridge credit | source chain allowed; source event unique; evidence finalized | bridge credit, duplicate source index | credit recipient | increment relayer | credit id, observation id | invalid source chain, duplicate event, malformed payload hash | +| Token launch/mint/transfer | token policy allows action; token exists when required | token registry or token balance records | supply/balance deltas | increment signer | token id, actor | duplicate token, mint disabled, insufficient token balance | +| Pool/liquidity/swap | pool/assets exist; minimum output constraints pass | pool, LP position, swap/liquidity receipts | reserve and user deltas | increment signer | pool id, actor | bad pool, slippage, insufficient LP/balance | +| Withdrawal intent | destination chain allowed; release policy known | withdrawal record | debit or escrow source | increment signer | withdrawal id, actor | invalid destination, insufficient balance, duplicate intent | +| Validator/finality | signer has validator role; block/state roots known | validator state, vote set, certificate set | none | increment signer | height, block hash | wrong signer role, quorum failure, stale vote | +| Object lifecycle | object type known; parent/source references valid when present | object store row | none | increment signer | object type, object id | unknown type, invalid state transition, malformed object hash | + +## State Root Inputs + +The state root manifest covers these components: + +`accounts`, `balances`, `tokens`, `pools`, `lp_positions`, `bridge_credits`, `withdrawals`, `object_store`, `finality`, and `validator_state`. + +Each component root is `keccak256("flowchain.production_l1.state_component_root.v0:" + canonicalJson({ component, entries }))`. The full state root is the Keccak-256 hash of chain ID, profile, genesis hash, and the ordered component root list. The validator recomputes it twice from the same logical state and compares it to `deterministicReplay.sameLogicalStateRoot`. + +## Fork Choice and Finality Vocabulary + +- `candidate`: block is built but not accepted by local policy. +- `accepted`: block is selected by the profile fork-choice rule. +- `finalized`: block height is covered by an accepted finality receipt. +- `rejected`: block or certificate failed validation. +- `superseded`: a later accepted branch replaced the candidate. +- `downgraded`: finality was reduced because evidence or challenge state changed. + +The current fixture uses one accepted local/private block at height `1` and a finality receipt with status `accepted`. diff --git a/docs/agent-runs/production-l1-protocol/TX_CATALOG.md b/docs/agent-runs/production-l1-protocol/TX_CATALOG.md new file mode 100644 index 00000000..6dc51501 --- /dev/null +++ b/docs/agent-runs/production-l1-protocol/TX_CATALOG.md @@ -0,0 +1,28 @@ +# Transaction Catalog + +All payloads validate through `schemas/flowmemory/production-transaction-payload.schema.json` and are wrapped by `schemas/flowmemory/production-transaction-envelope.schema.json`. + +| Payload type | Required details | Primary producer | Runtime writes | +| --- | --- | --- | --- | +| `native_transfer` | from account, to account, asset, amount, memo hash | wallet | balances, sender nonce | +| `faucet_funding` | faucet id, recipient, asset, amount, reason hash, `localOnly` | runtime/operator | balances, faucet record, nonce | +| `bridge_credit` | evidence id, observation id, credit id, source chain, asset, amount, recipient | bridge relayer | bridge credits, balances, duplicate source event index, nonce | +| `token_launch` | launch id, issuer, token id, symbol, name, decimals, metadata hash, initial supply, recipient | wallet/deployer | token registry, token balance, nonce | +| `token_mint` | mint id, token id, recipient, amount, reason hash, `localOrTestMode` | wallet/deployer | token supply, token balance, nonce | +| `token_transfer` | transfer id, token id, from account, to account, amount, memo hash | wallet | token balances, nonce | +| `pool_create` | pool id, base asset, quote asset, fee bps, tick spacing, metadata hash | wallet/deployer | pool registry, nonce | +| `add_liquidity` | liquidity id, pool id, provider, base amount, quote amount, minimum LP units | wallet | pool reserves, LP position, balances, nonce | +| `remove_liquidity` | liquidity id, pool id, provider, LP units, minimum returned amounts | wallet | pool reserves, LP position, balances, nonce | +| `swap` | swap id, pool id, trader, asset in/out, input amount, minimum output, route hash | wallet | pool reserves, balances, swap receipt, nonce | +| `withdrawal_intent` | intent id, source account, destination chain/address, asset, amount, release policy hash | wallet/bridge | withdrawal queue, balances, nonce | +| `validator_authority_config` | config id, authority id, validator account, action, type, voting power, metadata hash | consensus operator | validator state, nonce | +| `finality_vote` | vote id, validator account, height, block hash, state root, round | consensus | finality vote set, nonce | +| `finality_certificate` | certificate id, height, block hash, state root, signer-set root, votes, quorum | consensus | finality certificate set, nonce | +| `*_update` object lifecycle payloads | lifecycle id, object type, operation, object id/hash, status, rootfield id, optional source/parent | runtime/indexer | object store, index keys, nonce | + +## Valid and Invalid Coverage + +- Valid fixture set: `fixtures/production-l1/transactions.valid.json` +- Invalid fixture set: `fixtures/production-l1/negative-fixtures.json` + +There is one valid transaction for every payload type and one invalid malformed-payload-hash case for every payload type. Additional negative cases cover wrong chain ID, wrong genesis hash, stale nonce, duplicate transaction, malformed state root, invalid bridge source chain, and duplicate bridge event. diff --git a/fixtures/production-l1/block.valid.json b/fixtures/production-l1/block.valid.json new file mode 100644 index 00000000..317dc49e --- /dev/null +++ b/fixtures/production-l1/block.valid.json @@ -0,0 +1,3506 @@ +{ + "schema": "flowchain.production_l1.block_body.v0", + "header": { + "schema": "flowchain.production_l1.block_header.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "height": "1", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "timestamp": "2026-05-13T15:00:02.000Z", + "proposer": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "txRoot": "0x78865e2cba533f19d123cd74fc14b52492b8a00af6b6bf7260c5341ea99f9d56", + "receiptRoot": "0x3eaf7f52991cf4caa39ecfa74a06243fc18bdac9df1dee22c85fef6fc78116f5", + "eventRoot": "0x9de2f0ad4bc77fcb2b5804db0012545b27f3f4e89124bb7a218f0d7230b77f3b", + "stateRoot": "0x716ccaf7e8946591973d4614d41ba39c047ef7e89bd67d62f1aa6d90b99133ef", + "evidenceRoot": "0xfe9913ee8132ffb0ea7dea147bd15f084ca76d057a62ecc9917117e7f8a54b60", + "finalizedHeight": "0", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "blockHash": "0x4e38335dd2b0163f75d631c9b6648b6cc59f83e2b3a32e72d301322ac27148c4" + }, + "transactions": [ + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x18e97cdd0f9b8222ae270a034b8b26daf6d73c43c425d0593100b1d889563930", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "1", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "user" + }, + "payloadType": "native_transfer", + "payloadHash": "0xb314ed92273ef9aed93bcc16e4989067a8d7dbd362373e4f15bdf2ad15d2b639", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "native_transfer", + "payloadId": "0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "1", + "details": { + "fromAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "toAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "10000", + "memoHash": "0x9284d3dc2a7d698ae915b37d7e2811f36db10682e82d56aa6bd7664d1220ef06" + }, + "preconditions": [ + "payload_type:native_transfer", + "account_nonce:1" + ], + "stateWrites": [ + "native_transfer:state_write:0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "-10000" + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "10000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "1", + "after": "2" + }, + "emittedEventTypes": [ + "NativeTransferRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "native_transfer" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x1a4bd0898df04f0e790a8256a7d254412d22e06326f8b2b46ba4039e0fbfe2ce", + "value": "0x1a4bd0898df04f0e790a8256a7d254412d22e06326f8b2b46ba4039e0fbfe2cedbb4b0f74b3d6f6b6c9cdea4aaaf227cc71941d46a3a2e4826f7ec07e15a7d2a" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x74b37fa211b380912250d589cbd52a7f08ef9e34ec68bcf034ef38d07697465a", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "2", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "faucet_funding", + "payloadHash": "0x678de8bb69e2e7585fbbd059f014e9f3f7af59b970e55a7a1817709bf3a74c4b", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "faucet_funding", + "payloadId": "0xa4e0c6b866e9ee38c2b31dd6a928388a7389c8058648609c80d490ce77f40073", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "2", + "details": { + "faucetId": "0x268c55ac11ea534f33a96f4738b075648a9603e41cc7054ee03a8eb7f0e55c34", + "toAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "5000", + "reasonHash": "0x8934e316445b4e6bcee5226b067a5eddc19fa23a869e272feb6be378dae8ed48", + "localOnly": true + }, + "preconditions": [ + "payload_type:faucet_funding", + "account_nonce:2" + ], + "stateWrites": [ + "faucet_funding:state_write:0xa4e0c6b866e9ee38c2b31dd6a928388a7389c8058648609c80d490ce77f40073" + ], + "balanceChanges": [ + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "5000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "2", + "after": "3" + }, + "emittedEventTypes": [ + "FaucetFundingRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "faucet_funding" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x5e1b2659f86f1f99703c8b54d0721b51c41eec36ba6ae9d89f1ca56df045092d", + "value": "0x5e1b2659f86f1f99703c8b54d0721b51c41eec36ba6ae9d89f1ca56df045092d387e84a80721b4291186c3a02d8a0511410504f1a702e1930a266c62333635e3" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x36f329a0663b99955a5778cefa40aed22fbafedea1230e559253aef782bbe42a", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "1", + "nonceDomain": "0x346974a0aa8346f9759dde1d56bb8962a36eb013ca5e7f8c1b8e673fcfebd08a", + "signer": { + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "publicKey": "0x02f90ad32b15b53c0e4abd4f2f0de6db96dbe0adee1dab1736b0cf596070f7ef05", + "address": "0x633621fec8e01f8346130d81c26be8e33d1dcea9", + "role": "relayer" + }, + "payloadType": "bridge_credit", + "payloadHash": "0x5945c72f2b23e8f5f301a7610a066f516c26f2d64245f94bb59821e013861979", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "bridge_credit", + "payloadId": "0x7a8668dcd2bffa80eb280031bd7757ecbaf8cd880d766d04e9bfc1a5bd8c4d66", + "actorAccountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "accountNonce": "1", + "details": { + "bridgeEvidenceId": "0x013b5052df9be23c0816f77258d50bddfad0d73eb62af5fdd96a0b45d16fee21", + "observationId": "0x070736a82e7dad444266af15ec8b521beba7c08502be2aeecb32c0f7f41b68d3", + "creditId": "0xd52d44dc757c0ecd7853bd269902848a3dd04af44db8dc704b347da47ed1b238", + "sourceChainId": 8453, + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "2500000", + "recipientAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a" + }, + "preconditions": [ + "payload_type:bridge_credit", + "account_nonce:1" + ], + "stateWrites": [ + "bridge_credit:state_write:0x7a8668dcd2bffa80eb280031bd7757ecbaf8cd880d766d04e9bfc1a5bd8c4d66" + ], + "balanceChanges": [ + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "2500000" + } + ], + "nonceChange": { + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "before": "1", + "after": "2" + }, + "emittedEventTypes": [ + "BridgeCreditApplied" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "bridge_credit" + }, + { + "key": "actorAccountId", + "value": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x28f6ace9b0b309f17bf28fa90976e64550d93889f9dd9b659caa6f46c46b005f", + "value": "0x28f6ace9b0b309f17bf28fa90976e64550d93889f9dd9b659caa6f46c46b005fb6f08e745ba67912ac7bb807db36c6a7dd4aee51335200624ea267da77652b62" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x6ca72702d734aea0d6b969b8aaa3328d0862f4b21ea0a8262ccc7839468c8c65", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "3", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "token_launch", + "payloadHash": "0x8074dc0dbd44f3431dcca27687de12bc68ef9189d86286b630f94c73931b4e07", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "token_launch", + "payloadId": "0x58b3ad1cc7dea9851e1f6813760e021681c975a6f8ebfe29a8c5116c43ac813d", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "3", + "details": { + "tokenLaunchId": "0xb941d23378dd9e79573960c3fe836cced8c07f9a5d261abee1626ae66b38e15b", + "issuerAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "tokenId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "symbol": "FLOWT", + "name": "FlowChain Local Test Token", + "decimals": 6, + "metadataHash": "0xfd3e99204deb1fb81c51aac93bf9468ba42b0a45d2c8a8201080db1627056dd5", + "initialSupply": "1000000000", + "recipientAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + }, + "preconditions": [ + "payload_type:token_launch", + "account_nonce:3" + ], + "stateWrites": [ + "token_launch:state_write:0x58b3ad1cc7dea9851e1f6813760e021681c975a6f8ebfe29a8c5116c43ac813d" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "1000000000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "3", + "after": "4" + }, + "emittedEventTypes": [ + "TokenLaunched" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "token_launch" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x674f36261cbf81240f959a8bf5dc9808862b64194e0e0bd42d547abd14ea8dde", + "value": "0x674f36261cbf81240f959a8bf5dc9808862b64194e0e0bd42d547abd14ea8dde22ceec74319ce2a380f816948f99db9385e907385eaae404b226673eef5a3650" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xc8cddac632390a6b736a7433c8fbc726028eb153517d5030ff17c94f5463a03a", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "4", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "token_mint", + "payloadHash": "0xbfdef58cb485fa1d5e6eb16a166e0cab34350c5b0e9383509015b5929069b31d", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "token_mint", + "payloadId": "0x9a084a321aab722fad0ed7f1e7bba27e4d9c72afe9d74b876a727ae2646cad9f", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "4", + "details": { + "mintId": "0x3e118238b7a7677dadb07a2df738838ae438f2fb1edc56235ec7267f85c8cc84", + "tokenId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "toAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "250000", + "reasonHash": "0xa1f900fe4d833267daf29d488dd8c4f106718feca017762e54306d640e903d75", + "localOrTestMode": true + }, + "preconditions": [ + "payload_type:token_mint", + "account_nonce:4" + ], + "stateWrites": [ + "token_mint:state_write:0x9a084a321aab722fad0ed7f1e7bba27e4d9c72afe9d74b876a727ae2646cad9f" + ], + "balanceChanges": [ + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "250000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "4", + "after": "5" + }, + "emittedEventTypes": [ + "TokenMinted" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "token_mint" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x13fe583db212ec1dcfbe6240ea7489ea9288688f423f78069413534f725cdde3", + "value": "0x13fe583db212ec1dcfbe6240ea7489ea9288688f423f78069413534f725cdde32211ac2917eb98093dd6f007b5c40de8e21e3d9b235a9f6b223088cb5a52a2a6" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x8a327e611d306b367d9794000a64395c96990d9d16b93d309e149fc56a8af9e7", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "5", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "user" + }, + "payloadType": "token_transfer", + "payloadHash": "0x8aa5892acd6e69297bb30beccfcb9b97e224562cbbc6bcab6b45d11f820f2e28", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "token_transfer", + "payloadId": "0xf297b8f97f86900fca41aa854aee01e0d8413ae99488e217ef75eaa5da1fd98f", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "5", + "details": { + "tokenTransferId": "0x13d8066d6f4711e834f123b102087394e11495c646dc1aec74112a3bd72c562b", + "tokenId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "fromAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "toAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "50000", + "memoHash": "0xc8a014c9eef7461736465de0ed544a310bc26d386b932dca8e29ae2e34adffac" + }, + "preconditions": [ + "payload_type:token_transfer", + "account_nonce:5" + ], + "stateWrites": [ + "token_transfer:state_write:0xf297b8f97f86900fca41aa854aee01e0d8413ae99488e217ef75eaa5da1fd98f" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "-50000" + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "50000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "5", + "after": "6" + }, + "emittedEventTypes": [ + "TokenTransferred" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "token_transfer" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x74294b063606729075950a0686094e3a7f5d8c6872ac4e62f5914cd75f8df417", + "value": "0x74294b063606729075950a0686094e3a7f5d8c6872ac4e62f5914cd75f8df4178028417a9d1a4519b66a088b401b8c2807dc44bcabbd04a7b95a6fd457de3696" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x459fd019e44fba8961ed3cab569eed08b906dfed8580c444002defe70b4147b4", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "6", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "pool_create", + "payloadHash": "0x542609986958c9c723b621092c8ba0456d6a5da33bf94cf33457050acdb5bc78", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "pool_create", + "payloadId": "0x099a7f62c1af5c718644e22a2a96486c4bdad7852c52d4373ed69c9a7aca3ae9", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "6", + "details": { + "poolCreateId": "0x7d29c3a9eca221bddf7903d6a45f8bca0b6fd1a001741b50d003504ad67c5c53", + "creatorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "baseAssetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "quoteAssetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "feeBps": 30, + "tickSpacing": 1, + "metadataHash": "0xdf927b67c67e3761744ac6ae5ef35375d42eda3fc857a6ec1567b24b8f29845e" + }, + "preconditions": [ + "payload_type:pool_create", + "account_nonce:6" + ], + "stateWrites": [ + "pool_create:state_write:0x099a7f62c1af5c718644e22a2a96486c4bdad7852c52d4373ed69c9a7aca3ae9" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "6", + "after": "7" + }, + "emittedEventTypes": [ + "PoolCreated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "pool_create" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x1a059c36d2c22e3e4cf0ff31990cd4b60bfce93c38fd3bc68b23d09d396e3f09", + "value": "0x1a059c36d2c22e3e4cf0ff31990cd4b60bfce93c38fd3bc68b23d09d396e3f090dbea9d7dd5742e612e330ae16b848b093d21404e8a68f67580360b024a12c88" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xd4d4e811d8f4e18334823af5c81ff769eb27ff6e4d88d9b2e197fd9378c54535", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "7", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "user" + }, + "payloadType": "add_liquidity", + "payloadHash": "0x77d4968318412db65dcc0995cc2130af1d741d65c464a500b0982f91c2cb4ddc", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "add_liquidity", + "payloadId": "0x222a60a6e50c7a8d205fd472bb75c216485f56b33f824138a2b83cedd2ab6f7b", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "7", + "details": { + "liquidityId": "0x9ea34509afbe23343522af862dad843cf73df7532606eeca817edc5e0c7c2272", + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "providerAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "baseAmount": "100000", + "quoteAmount": "5000000", + "minLpUnits": "1" + }, + "preconditions": [ + "payload_type:add_liquidity", + "account_nonce:7" + ], + "stateWrites": [ + "add_liquidity:state_write:0x222a60a6e50c7a8d205fd472bb75c216485f56b33f824138a2b83cedd2ab6f7b" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "-100000" + }, + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "-5000000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "7", + "after": "8" + }, + "emittedEventTypes": [ + "LiquidityAdded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "add_liquidity" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x3eb1a65a616eb8031c4889a20ed244423a404b95c636b73ee4cb284f5c6936bb", + "value": "0x3eb1a65a616eb8031c4889a20ed244423a404b95c636b73ee4cb284f5c6936bbe4ad5abcb31f55676be981456e1e1aeb84327afe3769b291fc874e8b2eea4884" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xacef8f2d596a89b4f375e77d99a786fe50995f54558e0010f0d186a118303c03", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "8", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "user" + }, + "payloadType": "remove_liquidity", + "payloadHash": "0x589737d24bc2636d0b10aaf2790e7e3932810f05a311ac2c4644213f405715de", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "remove_liquidity", + "payloadId": "0xb32b8118708f2adda42c92c555efab29e973efd05fc0a694ebd0cdd78e2caca5", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "8", + "details": { + "liquidityId": "0xe4a3ca64db987b9fac69d0df9069eecc4ad31da806b912b1606ef0efce172dfc", + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "providerAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "lpUnits": "100", + "minBaseAmount": "1", + "minQuoteAmount": "1" + }, + "preconditions": [ + "payload_type:remove_liquidity", + "account_nonce:8" + ], + "stateWrites": [ + "remove_liquidity:state_write:0xb32b8118708f2adda42c92c555efab29e973efd05fc0a694ebd0cdd78e2caca5" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "2000" + }, + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "100000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "8", + "after": "9" + }, + "emittedEventTypes": [ + "LiquidityRemoved" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "remove_liquidity" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x1aaaaa0c3174718b5df8bc7899384de7a450c01286a6bd98af72959a42e023e5", + "value": "0x1aaaaa0c3174718b5df8bc7899384de7a450c01286a6bd98af72959a42e023e5fb7590a0f3441a51788d3952be34a3ae28eb0dff986d95167f815e8761326405" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xc651a70810a35b170cbc851580fbc39ed1d1eed3f6ba5a7aac9837640c2e6116", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "1", + "nonceDomain": "0x8a6124844f49d9390c78a1dfd812c43c1963edf9be78b4154bc50fabf0e12f9a", + "signer": { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "publicKey": "0x02bd133d4df63458ed49a0d7acde36d546b80c735f04d9a37eb428f1d92505b6be", + "address": "0xc8d2f10666e1216121f6449f0fc5726f63590aa7", + "role": "user" + }, + "payloadType": "swap", + "payloadHash": "0xcb6bc1a569412a08d52ef59b17463ddb63fb82f6396f3fff3cdf813c2707d4a5", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "swap", + "payloadId": "0x15fa2e1e2c305a0d29bd6c674a1fec00b18346d9d60e31f7a7677bd18cb3aac9", + "actorAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "accountNonce": "1", + "details": { + "swapId": "0x671be20c2cae4a8f2b5cf9ed4de1dbe64528fdb50c5f6c052f56883f8be994d7", + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "traderAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetInId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "assetOutId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "amountIn": "1000", + "minAmountOut": "40000", + "routeHash": "0x71a523049c4579ce011a78a263713e5a2d32ae7150158aa8015fc9cb8e4871f4" + }, + "preconditions": [ + "payload_type:swap", + "account_nonce:1" + ], + "stateWrites": [ + "swap:state_write:0x15fa2e1e2c305a0d29bd6c674a1fec00b18346d9d60e31f7a7677bd18cb3aac9" + ], + "balanceChanges": [ + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "-1000" + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "49000" + } + ], + "nonceChange": { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "before": "1", + "after": "2" + }, + "emittedEventTypes": [ + "SwapExecuted" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "swap" + }, + { + "key": "actorAccountId", + "value": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x201504789fb3e32c01d8496c915ab1e448d048f49a20d9d9c0969e8b0ebe14bc", + "value": "0x201504789fb3e32c01d8496c915ab1e448d048f49a20d9d9c0969e8b0ebe14bc7d9349c8cdb4657fa66eb3aa7db3b8284401547b238bc98e92ff5920cc763b7f" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xb0db1c922d7bbfa58759dfde491317d41c9aee638b442df4dfe1985b73e34c48", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "2", + "nonceDomain": "0x8a6124844f49d9390c78a1dfd812c43c1963edf9be78b4154bc50fabf0e12f9a", + "signer": { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "publicKey": "0x02bd133d4df63458ed49a0d7acde36d546b80c735f04d9a37eb428f1d92505b6be", + "address": "0xc8d2f10666e1216121f6449f0fc5726f63590aa7", + "role": "user" + }, + "payloadType": "withdrawal_intent", + "payloadHash": "0xe638c78e1bc9a52ac1243b1da3f8d5f22707ad968d50d7a3fef03041bbf251cb", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "withdrawal_intent", + "payloadId": "0x8c8be8335d98fc6337cbef75b34ef228d11a4cacabf0b8da0d93282785d4efcb", + "actorAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "accountNonce": "2", + "details": { + "withdrawalIntentId": "0xa3bd91f938d573c2e58bb34f4842a3f9acb85df7d2b4086a5949a65b95c55ee6", + "sourceAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "destinationChainId": 8453, + "destinationAddress": "0xb8eed8a8ec1ba09a1b46e79042399df3984f36df", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "100000", + "releasePolicyHash": "0x5a1af4db0125b5c9be8ae5c2ca236108de242dc1e259d6f89e2e931c80e601c1" + }, + "preconditions": [ + "payload_type:withdrawal_intent", + "account_nonce:2" + ], + "stateWrites": [ + "withdrawal_intent:state_write:0x8c8be8335d98fc6337cbef75b34ef228d11a4cacabf0b8da0d93282785d4efcb" + ], + "balanceChanges": [ + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "-100000" + } + ], + "nonceChange": { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "before": "2", + "after": "3" + }, + "emittedEventTypes": [ + "WithdrawalIntentRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "withdrawal_intent" + }, + { + "key": "actorAccountId", + "value": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x957fb4572398a908af8493a77464a05e1271c2806f1e33c6a3ead9357941d32f", + "value": "0x957fb4572398a908af8493a77464a05e1271c2806f1e33c6a3ead9357941d32f47918c7a7829133695cd334ba1efdcf68644b5ff423fcfd80526622ef40fb1d1" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xd63772799f7ca1d3eddfcf9ba2ef9bf77444e46d8222d5721e5c38f4f86656c3", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "1", + "nonceDomain": "0x8aca75dd306f43261a9c58812a426a62ddf72e5a0823fe7ef6c4e0aff78b42d9", + "signer": { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "role": "validator" + }, + "payloadType": "validator_authority_config", + "payloadHash": "0xa9f7a299f1a986b88b7a73990c45a3d2e4bc607ffade4a73e24ac85137887b20", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "validator_authority_config", + "payloadId": "0x7536fd5ee06a6afa22228e339c896fa95e3a17c0b501c3556d8d88f07be5f908", + "actorAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "accountNonce": "1", + "details": { + "authorityConfigId": "0x1ef8f8fa3707b0f16f98ed88c79e0c7d5465b55a6c14b0236b1949fa5ffc1fb8", + "authorityId": "0x4e7ad43d8db36ddde419d64fac4768a38167efd7b9e7abc503036f2ba22c92ba", + "validatorAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "action": "update", + "authorityType": "validator", + "votingPower": "1", + "metadataHash": "0x2bf51245a695e6afc8cad010f197129cba1bca7f1ff689caccaaea01f77935c8" + }, + "preconditions": [ + "payload_type:validator_authority_config", + "account_nonce:1" + ], + "stateWrites": [ + "validator_authority_config:state_write:0x7536fd5ee06a6afa22228e339c896fa95e3a17c0b501c3556d8d88f07be5f908" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "before": "1", + "after": "2" + }, + "emittedEventTypes": [ + "ValidatorAuthorityConfigured" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "validator_authority_config" + }, + { + "key": "actorAccountId", + "value": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x30db85e4b20d362f057d21535de016ec43d9eb813821e072e4afbea9cc78e409", + "value": "0x30db85e4b20d362f057d21535de016ec43d9eb813821e072e4afbea9cc78e409b7bf7ec3e75551273d274db995655d1fbdfa863414a060d41a57040bf8234a7d" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x10f8e2a10f9e7eeb66b7958c59cca95443c84504deeee7b45b3cd695ccd74c8a", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "2", + "nonceDomain": "0x8aca75dd306f43261a9c58812a426a62ddf72e5a0823fe7ef6c4e0aff78b42d9", + "signer": { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "role": "validator" + }, + "payloadType": "finality_vote", + "payloadHash": "0x4488eab003da8fd001e2d3411f9830140e816d72a580d1f00138c90ffe28ab7b", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "finality_vote", + "payloadId": "0x680c40512bd8a86c0610e4787d5a346ed11ce7d487f37e51b49d8f347cbf4901", + "actorAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "accountNonce": "2", + "details": { + "voteId": "0x5bf522270da05b7f92d03344e49c7b9f3d82d825d4303b2bed722375e822fdce", + "validatorAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "height": "1", + "blockHash": "0x3746b76bda4221999bf94bc0b1a144002dcb08769da1878ae6e690bfaf3205c1", + "stateRoot": "0x6fb8606dcd290285bf0fa89dc40bf6ee98a766e9858cb0b18a85dd288848c4ab", + "voteRound": "1" + }, + "preconditions": [ + "payload_type:finality_vote", + "account_nonce:2" + ], + "stateWrites": [ + "finality_vote:state_write:0x680c40512bd8a86c0610e4787d5a346ed11ce7d487f37e51b49d8f347cbf4901" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "before": "2", + "after": "3" + }, + "emittedEventTypes": [ + "FinalityVoteRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "finality_vote" + }, + { + "key": "actorAccountId", + "value": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0xf8147b67f890077cebf74db5185632bb08e8128c45ae5b89569d5b9dd87aafd9", + "value": "0xf8147b67f890077cebf74db5185632bb08e8128c45ae5b89569d5b9dd87aafd9f5885301664a67492d1c64816684914d11ae78e9871877eebb8c34734006018c" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x2bf8ab2f47a541f7c2808c8bf9decec6a8f60d4d026c5ce1e43be10af156ee6c", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "3", + "nonceDomain": "0x8aca75dd306f43261a9c58812a426a62ddf72e5a0823fe7ef6c4e0aff78b42d9", + "signer": { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "role": "validator" + }, + "payloadType": "finality_certificate", + "payloadHash": "0x82e2a8a031b079adac6e41851df9cb44f05722eee933d7526765f4487e151ca2", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "finality_certificate", + "payloadId": "0x527697a531538b1617cec46d668a01a8d6b0d8210adb42b1506c0210b2df8a80", + "actorAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "accountNonce": "3", + "details": { + "certificateId": "0x4b525f224cd71929a613f6235ffb03a641916851c2fc90843feec3bbad90a3b3", + "height": "1", + "blockHash": "0x3746b76bda4221999bf94bc0b1a144002dcb08769da1878ae6e690bfaf3205c1", + "stateRoot": "0x6fb8606dcd290285bf0fa89dc40bf6ee98a766e9858cb0b18a85dd288848c4ab", + "signerSetRoot": "0x65217700c09f22aa4d3a0da9b5ee0955e2e7a196106ae6a93982d607b33d4ea3", + "voteIds": [ + "0x5bf522270da05b7f92d03344e49c7b9f3d82d825d4303b2bed722375e822fdce" + ], + "quorumNumerator": 1, + "quorumDenominator": 1 + }, + "preconditions": [ + "payload_type:finality_certificate", + "account_nonce:3" + ], + "stateWrites": [ + "finality_certificate:state_write:0x527697a531538b1617cec46d668a01a8d6b0d8210adb42b1506c0210b2df8a80" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "before": "3", + "after": "4" + }, + "emittedEventTypes": [ + "FinalityCertificateRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "finality_certificate" + }, + { + "key": "actorAccountId", + "value": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x33bf4f0d795235b556ca8e4ad33226cf6bd41f78acfdf4519b32c9a94d074637", + "value": "0x33bf4f0d795235b556ca8e4ad33226cf6bd41f78acfdf4519b32c9a94d074637a202d048be2c634cf410b35ee519b9c00c371d08950416c4d96e4ccc5a0c5bff" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xd1a8d36d371779c09ecf2a627e27ceb85854fb3797d8a4b70ad7aa2fdc0baa83", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "9", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "agent_account_update", + "payloadHash": "0xac1359e1af6c3632d5d7a2ea0b78f75beead7733d2268bd4a645e740ce358da6", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "agent_account_update", + "payloadId": "0x00159178ecb25498ba211866e664bf321b41140d3283ffdf22adf5ff1afea75e", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "9", + "details": { + "lifecycleUpdateId": "0x6e36f280f28b502261bddc5928c67c7f7801575211f4109a4dfb0531a6257a5b", + "objectType": "AgentAccount", + "operation": "create", + "objectId": "0x79587bf5b81d6b566fe12453bc30803a773997e1f85371b4ba399d761758004d", + "objectHash": "0x24ad98a6c242b0b361aa0c48f6331202eb55002dd43e0db3bcbab52b30ac8018", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0xae4c481a9422d17fe8e2b45dfbc0ff9386850a6d5cfa9067c35d14857882143d", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:agent_account_update", + "account_nonce:9" + ], + "stateWrites": [ + "agent_account_update:state_write:0x00159178ecb25498ba211866e664bf321b41140d3283ffdf22adf5ff1afea75e" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "9", + "after": "10" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "agent_account_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x203c268461b8f2a65bfcf75ec7e0c7d73e66cfe8f10d967304ecbaa1fa7211d6", + "value": "0x203c268461b8f2a65bfcf75ec7e0c7d73e66cfe8f10d967304ecbaa1fa7211d641f0bb70c6bc1acbb4949c9926fc4026d837be1e08434de9a186b46415d4421c" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xb539c517573818f12fa8d1a3604ec24296225a26ef76fb9badeaabed55b4f3dd", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "10", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "model_passport_update", + "payloadHash": "0x1441fc64083c7cef50ff08f8e469ca59f0c09b80dc15e811b52700a7b87968fb", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "model_passport_update", + "payloadId": "0xe3cab3f31196df112aea6f29a374fb337acdab4b06e38b4af4d7c791a7651c59", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "10", + "details": { + "lifecycleUpdateId": "0xf5a85105d2d5754e0c1b65b0007f87d468d2bd8213b8eb95ef1d384d61cd34d6", + "objectType": "ModelPassport", + "operation": "create", + "objectId": "0xa73adb911f58e33dcd820471675d7a3d2b242be0574e217b144f4873135a4085", + "objectHash": "0xd5de49d30e0ff04ff2de2141d119bbfb46f3b741ce529f0594936a1cfba296d3", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0xdea6e290610e42576dc9fa8855c1d8e4cbedb6106cff9976ff36ddb79b6ccbcb", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:model_passport_update", + "account_nonce:10" + ], + "stateWrites": [ + "model_passport_update:state_write:0xe3cab3f31196df112aea6f29a374fb337acdab4b06e38b4af4d7c791a7651c59" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "10", + "after": "11" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "model_passport_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x374db9766c01ee8756caf4dc7d9c18b0c82b366a481aedbaf231c787472d761f", + "value": "0x374db9766c01ee8756caf4dc7d9c18b0c82b366a481aedbaf231c787472d761f1e31e11444a086edf6e2e1c946256dbbd6ece936f179408b30709a5db93599d4" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x81650a8cda675785e199f8259b80fee11abadc43fffbf619ed694920c2b20fea", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "11", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "work_receipt_update", + "payloadHash": "0xb808fb23de2a4c5931df1bd0793a50e300e384056191bf8ec43c40a63f72cd6e", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "work_receipt_update", + "payloadId": "0x0f20ce102d27fae1dcd6e39ede8549a9ce20ea089bf7e850bd78bfbae1b3c904", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "11", + "details": { + "lifecycleUpdateId": "0x44a1288ac877ce018ed5e155c43be6131a3f861a2733bb964f60ee66eee4b9cd", + "objectType": "WorkReceipt", + "operation": "create", + "objectId": "0xa96483b49a3d6005d748a512e00ab0bf1feb77d2bad4dec4f7842310bfe401f7", + "objectHash": "0xeb0475e34e1b2818d882210c44d3a3d8c6f30b1e551b827c48d9b0619ad238d9", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0x9dd038e0ce4935319fda5f8a95674362d8b33b1d3ee787820e6c343b788cd58d", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:work_receipt_update", + "account_nonce:11" + ], + "stateWrites": [ + "work_receipt_update:state_write:0x0f20ce102d27fae1dcd6e39ede8549a9ce20ea089bf7e850bd78bfbae1b3c904" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "11", + "after": "12" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "work_receipt_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x567bc1def071888630c1b448279a6d4a44e9d00e87f4258c49a5f2bd3eac7bbf", + "value": "0x567bc1def071888630c1b448279a6d4a44e9d00e87f4258c49a5f2bd3eac7bbfd31a9c86dfc12050deb8f11fd8b8b368016aefa60ebcac8ba5262ec4243cfff4" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xf2755e509ad9a58d6c4d969ada79f08d7bfa7ceeef4d0b439959f8108ee8d026", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "12", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "artifact_availability_proof_update", + "payloadHash": "0x12875a7d20ac4115fd8b73a789a08659c80b62fa43eb61ae307c918449665593", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "artifact_availability_proof_update", + "payloadId": "0x368dde5881c4ace9e3f79d3c0c0544a33c5f397138b566019a4582b334f91d5b", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "12", + "details": { + "lifecycleUpdateId": "0x60734dd1226e4077c9e65ca13677b93fa7ffa60f82842b5091bf78afb81e8a47", + "objectType": "ArtifactAvailabilityProof", + "operation": "create", + "objectId": "0x7458f4ac71bc9008bc012e2a8cec5b529772b58f6fc86ab44bcd339a7070e069", + "objectHash": "0x67aed44d292f94b1bd141ec1f355955f96283783e08152a7237e2d37810fd49a", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0x86d33924cdab0b02f52329c23c47a17fc366aaa1f25ffe86cb043d45dce2645e", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:artifact_availability_proof_update", + "account_nonce:12" + ], + "stateWrites": [ + "artifact_availability_proof_update:state_write:0x368dde5881c4ace9e3f79d3c0c0544a33c5f397138b566019a4582b334f91d5b" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "12", + "after": "13" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "artifact_availability_proof_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x712e542a9bac78e3eaaf053ea5aa79579c48d11598be10b4ca1ff3464e66fbbd", + "value": "0x712e542a9bac78e3eaaf053ea5aa79579c48d11598be10b4ca1ff3464e66fbbddc65ca3fc5efda2596a2f0228be45b73b3bbc85552f8a65f29cf6721ad63b967" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x14c854dedf7535dc4b6d7aebf6891905d35889f95341e72df121c31d82bc2717", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "13", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "verifier_module_update", + "payloadHash": "0x0aca3f36b89204ac92eda6e6f868fc0b3ea6025c09c4ae96e7fb50ad81705fc8", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "verifier_module_update", + "payloadId": "0x995dde6d97ac1eb6929e4bd4e039cf288b5be4d092c79f62701babcbeae04829", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "13", + "details": { + "lifecycleUpdateId": "0xc92d8a917522ff573364e22a1794e254f09dd825645397bb02657eb883e82eb5", + "objectType": "VerifierModule", + "operation": "create", + "objectId": "0x5194f738c5e5d252e0ae82f28883d732b762b9944f20181b854841875c45c54b", + "objectHash": "0xfef87b4fe768283b6e0e741bde3c43e635ce3f89f769285e356027c813877895", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0xa02d1408d6f854615536af9e3fcc3c691eb8c6fad87ef68a6401fe6618618c5c", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:verifier_module_update", + "account_nonce:13" + ], + "stateWrites": [ + "verifier_module_update:state_write:0x995dde6d97ac1eb6929e4bd4e039cf288b5be4d092c79f62701babcbeae04829" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "13", + "after": "14" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "verifier_module_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x178b1397398ff39f53ede827aa50a384566c48f380f6ff70bbd2e30c17918745", + "value": "0x178b1397398ff39f53ede827aa50a384566c48f380f6ff70bbd2e30c179187456f7b1343945a7e3cafd48063b5029c6f4a7f64bdb2ba6425ceccf515cd201e1f" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xc86669294104fea26444eb412d85a6b4c940d0d05c3fdccef2c26bc7753ca0af", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "14", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "verifier_report_update", + "payloadHash": "0x9073c274dd94bfb13fbf1c40965935b5183f8f3151b09acbb020d9d94a9385fe", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "verifier_report_update", + "payloadId": "0xb32efbce075e1cb579dd1f336f3e3f19f0376bb97a73d4e9c3a42908551aee40", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "14", + "details": { + "lifecycleUpdateId": "0x2908295b327e718d264dabc5f5498f56890e28243d77aee467b194f05dcdf86e", + "objectType": "VerifierReport", + "operation": "create", + "objectId": "0x5d0ad9b32f26abc0cd7be3b8869c51aefbc3cdd5d3f01735a8820fb7ff0910e1", + "objectHash": "0xa8d1865f5910ec6a9b615c48d7768e6a6ad3d3647495ffd5e5f6e9a8870a9489", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0xb5679c8d1628adadf665abcd5c9ba0654a9cddb98de4d2fad83da2e561a17d13", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:verifier_report_update", + "account_nonce:14" + ], + "stateWrites": [ + "verifier_report_update:state_write:0xb32efbce075e1cb579dd1f336f3e3f19f0376bb97a73d4e9c3a42908551aee40" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "14", + "after": "15" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "verifier_report_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x34afe42f2c19ff474384a3fae65c8adca908053d4c74c6a52456954cdaa4ba3e", + "value": "0x34afe42f2c19ff474384a3fae65c8adca908053d4c74c6a52456954cdaa4ba3ec4829eee2eb535113d2a6c1f1713ce7e5fd15ffdfb34942478601ba4f92746b1" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x09b13bb36deeecd2f862620273e0c13b1c0c02e4545553117dc8eab61082a546", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "15", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "memory_cell_update", + "payloadHash": "0x95975da8734fca016e8c2f93ec5828fa0f19d6e571d871a2d0fe97f797b75d6f", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "memory_cell_update", + "payloadId": "0x119ce8e2b8bff44f6dd3e58c5f55142f4b91192bd88dc4b342beb1dda2e4ec2b", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "15", + "details": { + "lifecycleUpdateId": "0x8dcd30dfa2af2149622159d554cfd4b406e3b957d33c20f2d24d5e93f062807f", + "objectType": "MemoryCell", + "operation": "create", + "objectId": "0xbcd05714eabfa7babbe32888041eaca0f715073f92e8c8cbd1f81922eeab5b16", + "objectHash": "0x86eeee0b28fa6533fd4220fb4953e78c29e1d545d3cffea2d985053157923619", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0x58bd17bc953ceac0890366bbcb897f36926712b1f5b14b648e2fec47c8833281", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:memory_cell_update", + "account_nonce:15" + ], + "stateWrites": [ + "memory_cell_update:state_write:0x119ce8e2b8bff44f6dd3e58c5f55142f4b91192bd88dc4b342beb1dda2e4ec2b" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "15", + "after": "16" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "memory_cell_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x02c6d16114becab27062bec4294a991a44cfad1a85c9c4203c852e442ee9423a", + "value": "0x02c6d16114becab27062bec4294a991a44cfad1a85c9c4203c852e442ee9423a88307792b4fa2188839c0c5075254977a8bb73f1ce79e3b5de1e741e122ff712" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xc20e5b49cac7f27690643613dac7e35f00452e826cbc22b4ddd7107d224a4b4a", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "16", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "challenge_update", + "payloadHash": "0x098203b68b7bfa8eb206ba3e10aa3dcc86d203edffc05ffa01de503641f73a60", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "challenge_update", + "payloadId": "0x3b5f3c39e177cbe3f68b3e17c3386c42bc9bd233bc1481d53eac73751d910b38", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "16", + "details": { + "lifecycleUpdateId": "0xf83daf6567077f2d934cecbba620031985e36727c891e81311552640ef930ef3", + "objectType": "Challenge", + "operation": "create", + "objectId": "0x927bb5cb7a259e9ef7a3ca9ed94f4f536928f87ecec25ef8e04eb3dd16884ad9", + "objectHash": "0xa73c3472a504f9dd8d98b3851f88a1fbaf9914524c0a7879172268bcc3225acf", + "status": "resolved", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0xa148aa4f0555533c2cb50a4b7a6c705ea1952ed7622cd4f8f978868b66277863", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:challenge_update", + "account_nonce:16" + ], + "stateWrites": [ + "challenge_update:state_write:0x3b5f3c39e177cbe3f68b3e17c3386c42bc9bd233bc1481d53eac73751d910b38" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "16", + "after": "17" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "challenge_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0xaea8ccac2f425c2e879919a426d2f0134490645480109e1ec4ab3989d6ee877a", + "value": "0xaea8ccac2f425c2e879919a426d2f0134490645480109e1ec4ab3989d6ee877a3225d734144d1cb416db73c545216ac6ab28fae4014816a910bc54aefd61d8db" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x39cfb18c324d443d4096ea96c5f5a6f307558025a7bf1df7286df3d5811fe37d", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "17", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "finality_receipt_update", + "payloadHash": "0xd604885b817860cb2b3456884d3399d65b42386ff4651625542bfc73426aa9df", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "finality_receipt_update", + "payloadId": "0x696e3e7a10a04d7d980be69b0c29c7c92de93b98c829b33a33626bc7f6a51ddd", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "17", + "details": { + "lifecycleUpdateId": "0x8a5eaff64212d4663055accac2c71d212eb8c09fa387872c263357be1bb8fab9", + "objectType": "FinalityReceipt", + "operation": "finalize", + "objectId": "0xd0017f1d9ab4a827a296feed92d8427582bb2eeac7bc1d006ecb843d2a2022fa", + "objectHash": "0xe8331685281b5709bcff0d968bff6a796d9e78057156c9ad4662bcc6bb8ef1ac", + "status": "finalized", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0x055948ea197b6ddb3b4b24fa76231e753eed6326db549f88ac3026beb2d5ab94", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:finality_receipt_update", + "account_nonce:17" + ], + "stateWrites": [ + "finality_receipt_update:state_write:0x696e3e7a10a04d7d980be69b0c29c7c92de93b98c829b33a33626bc7f6a51ddd" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "17", + "after": "18" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "finality_receipt_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x14257ecfda35adc39a8373793133bd06935417159dc31980cd783db8cb124442", + "value": "0x14257ecfda35adc39a8373793133bd06935417159dc31980cd783db8cb12444226fe91f37110b380180f5549df1f929e714381dbb733f6020980717aff33ec3e" + } + } + ], + "receipts": [ + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0xaab66440be842f3a695bb4c3939c050ef52f8b73d238a3c7f0effc388e7e8d4d", + "txId": "0x18e97cdd0f9b8222ae270a034b8b26daf6d73c43c425d0593100b1d889563930", + "payloadType": "native_transfer", + "status": "succeeded", + "executionCost": { + "costUnits": "1000", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xcf625c6f805b7fba9da7c9b68741e52b9702497c08fae5c7965e44ce05b48dde", + "emittedEvents": [ + "0xc6f8e2e9c44e10a90e458a7e97baa8c21d2662bbf01c4f0617f9f52f11615ec2" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xae2106e2b4b3636ca6aea26d035901d1632f1641bf3e1d22afe370680f230c75" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x4d2f916288f57f7c89a4612d3bb30c5251b6eaae5d702000fbafa9319159ddee", + "txId": "0x74b37fa211b380912250d589cbd52a7f08ef9e34ec68bcf034ef38d07697465a", + "payloadType": "faucet_funding", + "status": "succeeded", + "executionCost": { + "costUnits": "1010", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x1eb20d6e22ed2674ec0aec53ce794eb6f6c6d6646187828ff9507d8c7c1e449a", + "emittedEvents": [ + "0x3113e8fc0d6c3cd517bd106edaf1759c05ecedbd9f269e09e1f1b5185e48a533" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x663c95dc1df22014837e55cb57fc55dac29ee716efd6eb14f9f5c589e46ff721" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x6ab4628784b485df65f9c0da7c17b74e65ef63cadecf01ef7bb167555095c173", + "txId": "0x36f329a0663b99955a5778cefa40aed22fbafedea1230e559253aef782bbe42a", + "payloadType": "bridge_credit", + "status": "succeeded", + "executionCost": { + "costUnits": "1020", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x15611c30fc281144fe3d5cc8abfdfbf11986eac503dd4af5dbd77256b237e6cd", + "emittedEvents": [ + "0x18ab2a4773227935db49d5c55f829605523fa9f792a53fcb4db56f9dda74831e" + ], + "bridgeEvidenceRefs": [ + "0x013b5052df9be23c0816f77258d50bddfad0d73eb62af5fdd96a0b45d16fee21" + ], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x81d11beec24893cc8454c41e38ef8ea5b0c5b7bb71e022166fc33e4db09967af" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x55db075836a0a940577fe6bbc9390929e41130149f85ec7742882232725a8b71", + "txId": "0x6ca72702d734aea0d6b969b8aaa3328d0862f4b21ea0a8262ccc7839468c8c65", + "payloadType": "token_launch", + "status": "succeeded", + "executionCost": { + "costUnits": "1030", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xe02d860c7dafde20cb298fb491f5d263904d7c4aaf40d427cb6c1dd76bbacc52", + "emittedEvents": [ + "0x43bc800f9038b28b8b63cbb08163fb2b254b1b292ad8a35e1345c02fbf35d26d" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x8258c11d2deb44fa14fbecc5bd9e744c6cc8ec888dac4ffea3bb71668d4ab149" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x57bd4ce1019d971caae3bc5a01c82daff0a82e8d227c004b71bc49e433361f12", + "txId": "0xc8cddac632390a6b736a7433c8fbc726028eb153517d5030ff17c94f5463a03a", + "payloadType": "token_mint", + "status": "succeeded", + "executionCost": { + "costUnits": "1040", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x4a06659e1c9f97a0d487671dd4d05b412245a5c1b5b57419ea5ed44f4d7a2a49", + "emittedEvents": [ + "0xe35c08ebb149330513eeb85e5bbc7f564e5962e12a1c1becd45907ec3d990dd7" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xddd2826a31c2344adcb3bed95c167b072436b84a9ff6e607544b7c17cc71f78c" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0xc5961f384cf1c6effa725345efde771ce45b9783b737e8de0aa7478c94607f66", + "txId": "0x8a327e611d306b367d9794000a64395c96990d9d16b93d309e149fc56a8af9e7", + "payloadType": "token_transfer", + "status": "succeeded", + "executionCost": { + "costUnits": "1050", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xff99693d7b298757481ee43c6ccf5fb60f6802335055f613a1cd624c8d03507d", + "emittedEvents": [ + "0x136b2ed86c9330e651e5f22057d0e679f79a5c9054a9baa3e7d3c815fa0a5210" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xe6dacdeefb032004e7e7566dd26c1beedf9645f230272dfe17d4615d1d3b329b" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0xf5b679bf1ca1ddf30680c5f5e336b1d7dde6afa5878a8eadfb18862f8528ecf7", + "txId": "0x459fd019e44fba8961ed3cab569eed08b906dfed8580c444002defe70b4147b4", + "payloadType": "pool_create", + "status": "succeeded", + "executionCost": { + "costUnits": "1060", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x831459db37090c02b1fb26de723e2b36a9aacfb8193053fbaa63c6afe16f6023", + "emittedEvents": [ + "0xade5c06b4eb9d2876a11cb85e3060a8e80ea53447b62f8e34e6e8ece40e9ee8b" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xcf6c6300b317e3e3632e3558e864b573bf381fef942496d7ded759bc2a46ea78" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x69a1cec77fdac4171b4d7d72ac1904f43910fa7d46b2a46dd56c7fcff7ecd142", + "txId": "0xd4d4e811d8f4e18334823af5c81ff769eb27ff6e4d88d9b2e197fd9378c54535", + "payloadType": "add_liquidity", + "status": "succeeded", + "executionCost": { + "costUnits": "1070", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xa5c8e295c1844af03094af48f1580b52b6ea38670219a136e0735bb0c1e9dbc2", + "emittedEvents": [ + "0xf00a265dd32f64efd0398ec799527cf9bee0c9044c17dd99f478f4d0aedab5b9" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x5f15474b3575f9431b79a4f07cbb2513bf669ae80c5d18aef68326d47b63b867" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0xc2473bf8abe594ecd9f0bda46cb3e3728f83a3988c1d9f477d05a7dd78e6ba55", + "txId": "0xacef8f2d596a89b4f375e77d99a786fe50995f54558e0010f0d186a118303c03", + "payloadType": "remove_liquidity", + "status": "succeeded", + "executionCost": { + "costUnits": "1080", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x82eb3fc263e910559e0ad051ac665384a67e47a85050ad8e2f2b5b79e8314b1b", + "emittedEvents": [ + "0x71e243ad26c879cabaf041f5677774f0ab8ab1922b54a7173bb35a6088c81677" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xc0cebf1d3b1868abb732ecdcebba7950a769c7cdaa98b88dd9538a3a98b7627a" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0xc04b5906bfe4d4a8dbf8a1ae4e67d118cae78cd286058b72da9e4b854a2b12dd", + "txId": "0xc651a70810a35b170cbc851580fbc39ed1d1eed3f6ba5a7aac9837640c2e6116", + "payloadType": "swap", + "status": "succeeded", + "executionCost": { + "costUnits": "1090", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xefccc2d1cb910fd2e70ec001598b59c833da8c5da24e60e564d946487979a411", + "emittedEvents": [ + "0x4c93abec1055989ee9e54a615bff00758acb593f957ebe0cbf6d1781100abb60" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x6562accb225e54ad8432ca1fda5db766afaa52167ce1643e594ba8bf894ad5cd" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x1ba588c12762f0aabcb7c76eb1e1746d93ab3d050de4fedb0baae5a1681af23d", + "txId": "0xb0db1c922d7bbfa58759dfde491317d41c9aee638b442df4dfe1985b73e34c48", + "payloadType": "withdrawal_intent", + "status": "succeeded", + "executionCost": { + "costUnits": "1100", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x7b480f778881971d21c8045e82eeae9d92a1b5270bc802c42de6dbcb17115fbf", + "emittedEvents": [ + "0xff43e6ec48d56966d680893de999d296a277ed4f77693922e833b0f0908219eb" + ], + "bridgeEvidenceRefs": [ + "0x4b632f40672ceb7ab195def56d8bc86141f1878ec31ffc742ec3e5b5d0def15d" + ], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x6175b6964ddd7b713529a0f3e4d1862ad66580b2b03c83a58ebb51bb588c5bde" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x2cbdb8fab6b7c1c5057582a137e5f8e2f4a9c8d5fd195bdd6fe1f183fdcaa44c", + "txId": "0xd63772799f7ca1d3eddfcf9ba2ef9bf77444e46d8222d5721e5c38f4f86656c3", + "payloadType": "validator_authority_config", + "status": "succeeded", + "executionCost": { + "costUnits": "1110", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x078c6abec319ffa4100e0477ba6b0924ef0c8c53d7d652e57b38f01669e2e231", + "emittedEvents": [ + "0x4213e214b202b5bc5aa268dff471c42d4197d4075d50b9dd70954d51f336e69a" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xd8e3b577578b0063bb2552baf93b257a48321605c9b0f6a987223326b7cc0855" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x5c92898faf0c75e4ec9b39246c4629e464103f9005d23160c61845ca622f6616", + "txId": "0x10f8e2a10f9e7eeb66b7958c59cca95443c84504deeee7b45b3cd695ccd74c8a", + "payloadType": "finality_vote", + "status": "succeeded", + "executionCost": { + "costUnits": "1120", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x36402784906678d57c64a2e7596ae7df8f519843c436c1eac874dd2b902ae83b", + "emittedEvents": [ + "0x147b00cef5b801830faefd80f1e5b708677b0c62e320cf133dcec604a67aef38" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x5c83e35062dd5919f27bed6ddbf1e709f34b2287190cfd3864779054d5d747e0" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x73a0b8e32efca89f7a48e2f80bc5fd311b447fc41344b3887bf713c9c935852f", + "txId": "0x2bf8ab2f47a541f7c2808c8bf9decec6a8f60d4d026c5ce1e43be10af156ee6c", + "payloadType": "finality_certificate", + "status": "succeeded", + "executionCost": { + "costUnits": "1130", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xe554cf8d92a51c8a0249968d16c648d310e82bf8eaca924ffe7b60637d5a2887", + "emittedEvents": [ + "0x57da01213fdb57bc6687284efa5ce316c0f43ddedb9e9adcad924d62de4f1bab" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x4648ccb0d567460f7485b377d5fe0dc03c4415569947db22322fd8b16e92c0ac" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0xc40dff53c1a8e16a65013d96fcabdd2ebdea0b37acdb25b6b17a7d001f43fea1", + "txId": "0xd1a8d36d371779c09ecf2a627e27ceb85854fb3797d8a4b70ad7aa2fdc0baa83", + "payloadType": "agent_account_update", + "status": "succeeded", + "executionCost": { + "costUnits": "1140", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x5f9f51f8d28ad1a6008933569c49a6e323c17c00fcfd4cb7e7da0a0827d95682", + "emittedEvents": [ + "0x381cfd3d9968a813c5a9c0e121c0852317c320d4b860fa1bbe4d53c7dc2d4266" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xd17172a44dfabbed9500c3d87cfe858a24b5134776fcf4c780ea23e253f79748" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x2261159f48fbb7b1a62b28f4156060594441987c49d6eaeecfe451f46c5bb517", + "txId": "0xb539c517573818f12fa8d1a3604ec24296225a26ef76fb9badeaabed55b4f3dd", + "payloadType": "model_passport_update", + "status": "succeeded", + "executionCost": { + "costUnits": "1150", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x5214edb50cdb17c59f43840c870424ed6adf05ddad057e889f14dde9957d9263", + "emittedEvents": [ + "0x9f6585f2178ba0d2efd9d37ce0f8625d7f802759f5c8dfa1ce37317d827c02ed" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x0e7529e5eaed1b160fccabe56ff4f0e7ec96fab63cf75d546f424c48792ce48a" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x5ff763d0fb238a08f859991582bf569c7b3c6d25ca9c6b1024d348a221b2ebdd", + "txId": "0x81650a8cda675785e199f8259b80fee11abadc43fffbf619ed694920c2b20fea", + "payloadType": "work_receipt_update", + "status": "succeeded", + "executionCost": { + "costUnits": "1160", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x316d700b2807fdffc19c5f04487d83144bb731a2a452902ede6b7509f152ab1c", + "emittedEvents": [ + "0x93f4077d3b4225a297ac3c652fe69d5e4b1e160a96201c8fd93538367ac095f8" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x98c0e82742fa16158dd81dd7aa9beaf9fd09426faf788b41aef95b2382ebea10" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x146d5001dd2bb2fca087b678f3aa265157b225e3442db20cf9361f360fba609d", + "txId": "0xf2755e509ad9a58d6c4d969ada79f08d7bfa7ceeef4d0b439959f8108ee8d026", + "payloadType": "artifact_availability_proof_update", + "status": "succeeded", + "executionCost": { + "costUnits": "1170", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x55d1944b097a3f7b0f6e790caad761d9adc5419b3300a60aefc498b2f2a91436", + "emittedEvents": [ + "0x23894d2f46ebe807e4c379a7c56a6df7231c5f5c0516aaa159f6ad2daf012bae" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xf3a79addad62c517cc109e66780cca44645d7cdd4a1c084c454cedd373a131f3" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0xaa0a8a0b973625ce0a40c573a91613ff8460461e283a3ca92c08b6923975c64b", + "txId": "0x14c854dedf7535dc4b6d7aebf6891905d35889f95341e72df121c31d82bc2717", + "payloadType": "verifier_module_update", + "status": "succeeded", + "executionCost": { + "costUnits": "1180", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xbeef686a1991ba9f08f5f5fb973b0c63593e6eed158ae1bddada8b3ef1f878a4", + "emittedEvents": [ + "0x9abd63cbe0bcadd4341288bba2ad97bc88e64c785749c493e2f65220d884d289" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x55f64a360ba0fbbe386c551a44e848e83ce8ef437d92fecb18b1237c40ded508" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x6bd4278844d4803c92246f3e44ab1bdce702245f613af658776dcec59381dfb8", + "txId": "0xc86669294104fea26444eb412d85a6b4c940d0d05c3fdccef2c26bc7753ca0af", + "payloadType": "verifier_report_update", + "status": "succeeded", + "executionCost": { + "costUnits": "1190", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xb3071da3579c43c4da7527464f9814d788e6ed33022850a35e40421f45f8f0fa", + "emittedEvents": [ + "0x80e11e3a6ec9644110ec64329394c206b09e17396b61e56520ed6a00f8536ec7" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x10c569d0178d3765fbf28f7482dbaa57950fd0793d6ec081bf9c32cd0fd84ea9" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0xcbdcebbe06f7354341395af5fc87d4b443d0cf59480761ab790e38e857c9fd1d", + "txId": "0x09b13bb36deeecd2f862620273e0c13b1c0c02e4545553117dc8eab61082a546", + "payloadType": "memory_cell_update", + "status": "succeeded", + "executionCost": { + "costUnits": "1200", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xe7ae8cf639df17cdf73fd69579771b424e9586a7d764267f52343489ba186f5f", + "emittedEvents": [ + "0xc4de82b39ea363819843ce71263a4e964742b11a7b241ce9aefb8d38d7c4f47f" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xa80ba204e441a64a0a870e13bebadb40af3ef4b9bc32314c0fb31945e9ea3821" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x2ecb3769958751ff06259795a187b2ef9972cce62aea38d1809b71fe3fcf25d5", + "txId": "0xc20e5b49cac7f27690643613dac7e35f00452e826cbc22b4ddd7107d224a4b4a", + "payloadType": "challenge_update", + "status": "succeeded", + "executionCost": { + "costUnits": "1210", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x70474a9e4deb5e341d16249dc040492d91a4e4d481ccc1002b38261dc00cbfe9", + "emittedEvents": [ + "0xe462a465a90e44bbb51e1b53aba5661cf0ad8039a84295c0819e8a4ff28744ec" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xf5defa0cc92d5fc3f96cc1b9d34bdf487d5b4ca1c83efd209fad1002ec676d49" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0xcb25bf4472251bf2e3320c7d2feed61ebd8fb831e887149906a226ef8bb14ce5", + "txId": "0x39cfb18c324d443d4096ea96c5f5a6f307558025a7bf1df7286df3d5811fe37d", + "payloadType": "finality_receipt_update", + "status": "succeeded", + "executionCost": { + "costUnits": "1220", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xa7b0cd57ed0ceffb6a7aa7bb547708cc4fd2412355471bedf4d2414a96f155fd", + "emittedEvents": [ + "0x098ee4110828ebd8b5246a3c67d4086c3205a1a43eec46139b2be182eabc941a" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x37f183226937e175cac7e0e4b01b324f21df0761121d6683907b08a16035e4c7" + } + ], + "events": [ + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0xc6f8e2e9c44e10a90e458a7e97baa8c21d2662bbf01c4f0617f9f52f11615ec2", + "eventType": "NativeTransferRecorded", + "payloadType": "native_transfer", + "txId": "0x18e97cdd0f9b8222ae270a034b8b26daf6d73c43c425d0593100b1d889563930", + "receiptId": "0xaab66440be842f3a695bb4c3939c050ef52f8b73d238a3c7f0effc388e7e8d4d", + "blockHeight": "1", + "eventIndex": 0, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa", + "attributes": [ + { + "key": "payloadType", + "value": "native_transfer", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0x61af58bac99f973ae246080a2c77f51ce9286206b2e194b8d4858cf5ffa6faba" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x3113e8fc0d6c3cd517bd106edaf1759c05ecedbd9f269e09e1f1b5185e48a533", + "eventType": "FaucetFundingRecorded", + "payloadType": "faucet_funding", + "txId": "0x74b37fa211b380912250d589cbd52a7f08ef9e34ec68bcf034ef38d07697465a", + "receiptId": "0x4d2f916288f57f7c89a4612d3bb30c5251b6eaae5d702000fbafa9319159ddee", + "blockHeight": "1", + "eventIndex": 1, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0xa4e0c6b866e9ee38c2b31dd6a928388a7389c8058648609c80d490ce77f40073", + "attributes": [ + { + "key": "payloadType", + "value": "faucet_funding", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0xa4e0c6b866e9ee38c2b31dd6a928388a7389c8058648609c80d490ce77f40073", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0x5fb4d0a17ee4ab5ad5ec0444b18210d6c1e905620812688543bb0c474e01d153" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x18ab2a4773227935db49d5c55f829605523fa9f792a53fcb4db56f9dda74831e", + "eventType": "BridgeCreditApplied", + "payloadType": "bridge_credit", + "txId": "0x36f329a0663b99955a5778cefa40aed22fbafedea1230e559253aef782bbe42a", + "receiptId": "0x6ab4628784b485df65f9c0da7c17b74e65ef63cadecf01ef7bb167555095c173", + "blockHeight": "1", + "eventIndex": 2, + "emitterAccountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "subjectId": "0xd52d44dc757c0ecd7853bd269902848a3dd04af44db8dc704b347da47ed1b238", + "attributes": [ + { + "key": "payloadType", + "value": "bridge_credit", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x7a8668dcd2bffa80eb280031bd7757ecbaf8cd880d766d04e9bfc1a5bd8c4d66", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xfc11e98b91c24df15d14d21894225acbfe3624f38c0cd1303671e4055f152bd1" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x43bc800f9038b28b8b63cbb08163fb2b254b1b292ad8a35e1345c02fbf35d26d", + "eventType": "TokenLaunched", + "payloadType": "token_launch", + "txId": "0x6ca72702d734aea0d6b969b8aaa3328d0862f4b21ea0a8262ccc7839468c8c65", + "receiptId": "0x55db075836a0a940577fe6bbc9390929e41130149f85ec7742882232725a8b71", + "blockHeight": "1", + "eventIndex": 3, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "attributes": [ + { + "key": "payloadType", + "value": "token_launch", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x58b3ad1cc7dea9851e1f6813760e021681c975a6f8ebfe29a8c5116c43ac813d", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xb4ca02bd7ce9359585d2ab3b46e32807f667fb6bc7f985c24ece6b70459c0b25" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0xe35c08ebb149330513eeb85e5bbc7f564e5962e12a1c1becd45907ec3d990dd7", + "eventType": "TokenMinted", + "payloadType": "token_mint", + "txId": "0xc8cddac632390a6b736a7433c8fbc726028eb153517d5030ff17c94f5463a03a", + "receiptId": "0x57bd4ce1019d971caae3bc5a01c82daff0a82e8d227c004b71bc49e433361f12", + "blockHeight": "1", + "eventIndex": 4, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "attributes": [ + { + "key": "payloadType", + "value": "token_mint", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x9a084a321aab722fad0ed7f1e7bba27e4d9c72afe9d74b876a727ae2646cad9f", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xed54cdaf9c06e1389348f9cc193e2ca5e454866250ceb80d795b70405a3359eb" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x136b2ed86c9330e651e5f22057d0e679f79a5c9054a9baa3e7d3c815fa0a5210", + "eventType": "TokenTransferred", + "payloadType": "token_transfer", + "txId": "0x8a327e611d306b367d9794000a64395c96990d9d16b93d309e149fc56a8af9e7", + "receiptId": "0xc5961f384cf1c6effa725345efde771ce45b9783b737e8de0aa7478c94607f66", + "blockHeight": "1", + "eventIndex": 5, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "attributes": [ + { + "key": "payloadType", + "value": "token_transfer", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0xf297b8f97f86900fca41aa854aee01e0d8413ae99488e217ef75eaa5da1fd98f", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0x3d5f0e784adffabd45d344b205d5e888e3203674fedf1e582f9b0c729c66171b" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0xade5c06b4eb9d2876a11cb85e3060a8e80ea53447b62f8e34e6e8ece40e9ee8b", + "eventType": "PoolCreated", + "payloadType": "pool_create", + "txId": "0x459fd019e44fba8961ed3cab569eed08b906dfed8580c444002defe70b4147b4", + "receiptId": "0xf5b679bf1ca1ddf30680c5f5e336b1d7dde6afa5878a8eadfb18862f8528ecf7", + "blockHeight": "1", + "eventIndex": 6, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "attributes": [ + { + "key": "payloadType", + "value": "pool_create", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x099a7f62c1af5c718644e22a2a96486c4bdad7852c52d4373ed69c9a7aca3ae9", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xfbf8aa11ae0a7be70acb43bfc0b79289c562d55117dc15fcb4c602e24526c0eb" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0xf00a265dd32f64efd0398ec799527cf9bee0c9044c17dd99f478f4d0aedab5b9", + "eventType": "LiquidityAdded", + "payloadType": "add_liquidity", + "txId": "0xd4d4e811d8f4e18334823af5c81ff769eb27ff6e4d88d9b2e197fd9378c54535", + "receiptId": "0x69a1cec77fdac4171b4d7d72ac1904f43910fa7d46b2a46dd56c7fcff7ecd142", + "blockHeight": "1", + "eventIndex": 7, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "attributes": [ + { + "key": "payloadType", + "value": "add_liquidity", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x222a60a6e50c7a8d205fd472bb75c216485f56b33f824138a2b83cedd2ab6f7b", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xcf8258b060004399c6a0eda055cf48ef82f2448cdcc7eee6e7e1234925b95b3a" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x71e243ad26c879cabaf041f5677774f0ab8ab1922b54a7173bb35a6088c81677", + "eventType": "LiquidityRemoved", + "payloadType": "remove_liquidity", + "txId": "0xacef8f2d596a89b4f375e77d99a786fe50995f54558e0010f0d186a118303c03", + "receiptId": "0xc2473bf8abe594ecd9f0bda46cb3e3728f83a3988c1d9f477d05a7dd78e6ba55", + "blockHeight": "1", + "eventIndex": 8, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "attributes": [ + { + "key": "payloadType", + "value": "remove_liquidity", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0xb32b8118708f2adda42c92c555efab29e973efd05fc0a694ebd0cdd78e2caca5", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xa8ca500f8d665f122b6a06531c76ab375e6289fa4a728a37da3ee36a7bc409a6" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x4c93abec1055989ee9e54a615bff00758acb593f957ebe0cbf6d1781100abb60", + "eventType": "SwapExecuted", + "payloadType": "swap", + "txId": "0xc651a70810a35b170cbc851580fbc39ed1d1eed3f6ba5a7aac9837640c2e6116", + "receiptId": "0xc04b5906bfe4d4a8dbf8a1ae4e67d118cae78cd286058b72da9e4b854a2b12dd", + "blockHeight": "1", + "eventIndex": 9, + "emitterAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "subjectId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "attributes": [ + { + "key": "payloadType", + "value": "swap", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x15fa2e1e2c305a0d29bd6c674a1fec00b18346d9d60e31f7a7677bd18cb3aac9", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0x0a5d6e6af7694ff270f8761508cc518196c53a185e52350394040288fc227493" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0xff43e6ec48d56966d680893de999d296a277ed4f77693922e833b0f0908219eb", + "eventType": "WithdrawalIntentRecorded", + "payloadType": "withdrawal_intent", + "txId": "0xb0db1c922d7bbfa58759dfde491317d41c9aee638b442df4dfe1985b73e34c48", + "receiptId": "0x1ba588c12762f0aabcb7c76eb1e1746d93ab3d050de4fedb0baae5a1681af23d", + "blockHeight": "1", + "eventIndex": 10, + "emitterAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "subjectId": "0xa3bd91f938d573c2e58bb34f4842a3f9acb85df7d2b4086a5949a65b95c55ee6", + "attributes": [ + { + "key": "payloadType", + "value": "withdrawal_intent", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x8c8be8335d98fc6337cbef75b34ef228d11a4cacabf0b8da0d93282785d4efcb", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0x4350cd454520ccc3caab14e0ce477ae78898f1106ef8a2229ed94efd77bb902a" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x4213e214b202b5bc5aa268dff471c42d4197d4075d50b9dd70954d51f336e69a", + "eventType": "ValidatorAuthorityConfigured", + "payloadType": "validator_authority_config", + "txId": "0xd63772799f7ca1d3eddfcf9ba2ef9bf77444e46d8222d5721e5c38f4f86656c3", + "receiptId": "0x2cbdb8fab6b7c1c5057582a137e5f8e2f4a9c8d5fd195bdd6fe1f183fdcaa44c", + "blockHeight": "1", + "eventIndex": 11, + "emitterAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "subjectId": "0x4e7ad43d8db36ddde419d64fac4768a38167efd7b9e7abc503036f2ba22c92ba", + "attributes": [ + { + "key": "payloadType", + "value": "validator_authority_config", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x7536fd5ee06a6afa22228e339c896fa95e3a17c0b501c3556d8d88f07be5f908", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0x0f9d7ed3d328545f1d82a84e1682ad2312916bc0dbf9ee17252db4d4ba14ca8c" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x147b00cef5b801830faefd80f1e5b708677b0c62e320cf133dcec604a67aef38", + "eventType": "FinalityVoteRecorded", + "payloadType": "finality_vote", + "txId": "0x10f8e2a10f9e7eeb66b7958c59cca95443c84504deeee7b45b3cd695ccd74c8a", + "receiptId": "0x5c92898faf0c75e4ec9b39246c4629e464103f9005d23160c61845ca622f6616", + "blockHeight": "1", + "eventIndex": 12, + "emitterAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "subjectId": "0x680c40512bd8a86c0610e4787d5a346ed11ce7d487f37e51b49d8f347cbf4901", + "attributes": [ + { + "key": "payloadType", + "value": "finality_vote", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x680c40512bd8a86c0610e4787d5a346ed11ce7d487f37e51b49d8f347cbf4901", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xf99ec6944d36baff78ccd86da751284ec5ac6383e6178e351132e10786827ac9" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x57da01213fdb57bc6687284efa5ce316c0f43ddedb9e9adcad924d62de4f1bab", + "eventType": "FinalityCertificateRecorded", + "payloadType": "finality_certificate", + "txId": "0x2bf8ab2f47a541f7c2808c8bf9decec6a8f60d4d026c5ce1e43be10af156ee6c", + "receiptId": "0x73a0b8e32efca89f7a48e2f80bc5fd311b447fc41344b3887bf713c9c935852f", + "blockHeight": "1", + "eventIndex": 13, + "emitterAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "subjectId": "0x527697a531538b1617cec46d668a01a8d6b0d8210adb42b1506c0210b2df8a80", + "attributes": [ + { + "key": "payloadType", + "value": "finality_certificate", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x527697a531538b1617cec46d668a01a8d6b0d8210adb42b1506c0210b2df8a80", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xf3ab1e31f6bf0de8f379b3c7e2c6ab6f85142919d775f1f94e171d053f8a1693" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x381cfd3d9968a813c5a9c0e121c0852317c320d4b860fa1bbe4d53c7dc2d4266", + "eventType": "ObjectLifecycleUpdated", + "payloadType": "agent_account_update", + "txId": "0xd1a8d36d371779c09ecf2a627e27ceb85854fb3797d8a4b70ad7aa2fdc0baa83", + "receiptId": "0xc40dff53c1a8e16a65013d96fcabdd2ebdea0b37acdb25b6b17a7d001f43fea1", + "blockHeight": "1", + "eventIndex": 14, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0x79587bf5b81d6b566fe12453bc30803a773997e1f85371b4ba399d761758004d", + "attributes": [ + { + "key": "payloadType", + "value": "agent_account_update", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x00159178ecb25498ba211866e664bf321b41140d3283ffdf22adf5ff1afea75e", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xc72ef6730d2caafe7ca78e2cd052fef3df83d5ecfff61d98c047fdc5815a6b4d" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x9f6585f2178ba0d2efd9d37ce0f8625d7f802759f5c8dfa1ce37317d827c02ed", + "eventType": "ObjectLifecycleUpdated", + "payloadType": "model_passport_update", + "txId": "0xb539c517573818f12fa8d1a3604ec24296225a26ef76fb9badeaabed55b4f3dd", + "receiptId": "0x2261159f48fbb7b1a62b28f4156060594441987c49d6eaeecfe451f46c5bb517", + "blockHeight": "1", + "eventIndex": 15, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0xa73adb911f58e33dcd820471675d7a3d2b242be0574e217b144f4873135a4085", + "attributes": [ + { + "key": "payloadType", + "value": "model_passport_update", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0xe3cab3f31196df112aea6f29a374fb337acdab4b06e38b4af4d7c791a7651c59", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0x5a2d3910f0b49ea405259b4d85188bab68c5d032140c1d5ce3facbdec5ab9849" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x93f4077d3b4225a297ac3c652fe69d5e4b1e160a96201c8fd93538367ac095f8", + "eventType": "ObjectLifecycleUpdated", + "payloadType": "work_receipt_update", + "txId": "0x81650a8cda675785e199f8259b80fee11abadc43fffbf619ed694920c2b20fea", + "receiptId": "0x5ff763d0fb238a08f859991582bf569c7b3c6d25ca9c6b1024d348a221b2ebdd", + "blockHeight": "1", + "eventIndex": 16, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0xa96483b49a3d6005d748a512e00ab0bf1feb77d2bad4dec4f7842310bfe401f7", + "attributes": [ + { + "key": "payloadType", + "value": "work_receipt_update", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x0f20ce102d27fae1dcd6e39ede8549a9ce20ea089bf7e850bd78bfbae1b3c904", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0x2d9fdcfea45005f53d5c7f130ddc1051d0670f4673bd1bdf15c5ac62a9f4c5cd" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x23894d2f46ebe807e4c379a7c56a6df7231c5f5c0516aaa159f6ad2daf012bae", + "eventType": "ObjectLifecycleUpdated", + "payloadType": "artifact_availability_proof_update", + "txId": "0xf2755e509ad9a58d6c4d969ada79f08d7bfa7ceeef4d0b439959f8108ee8d026", + "receiptId": "0x146d5001dd2bb2fca087b678f3aa265157b225e3442db20cf9361f360fba609d", + "blockHeight": "1", + "eventIndex": 17, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0x7458f4ac71bc9008bc012e2a8cec5b529772b58f6fc86ab44bcd339a7070e069", + "attributes": [ + { + "key": "payloadType", + "value": "artifact_availability_proof_update", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x368dde5881c4ace9e3f79d3c0c0544a33c5f397138b566019a4582b334f91d5b", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xa15e0396b2bcd11c7b71265c04737af7db6b80bdba5f1962a48b8282ab954a5b" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x9abd63cbe0bcadd4341288bba2ad97bc88e64c785749c493e2f65220d884d289", + "eventType": "ObjectLifecycleUpdated", + "payloadType": "verifier_module_update", + "txId": "0x14c854dedf7535dc4b6d7aebf6891905d35889f95341e72df121c31d82bc2717", + "receiptId": "0xaa0a8a0b973625ce0a40c573a91613ff8460461e283a3ca92c08b6923975c64b", + "blockHeight": "1", + "eventIndex": 18, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0x5194f738c5e5d252e0ae82f28883d732b762b9944f20181b854841875c45c54b", + "attributes": [ + { + "key": "payloadType", + "value": "verifier_module_update", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x995dde6d97ac1eb6929e4bd4e039cf288b5be4d092c79f62701babcbeae04829", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xc4ec3f6e2fa93a9d0de804735332b2b4759200a05c17e79f3af74ee8a202e271" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x80e11e3a6ec9644110ec64329394c206b09e17396b61e56520ed6a00f8536ec7", + "eventType": "ObjectLifecycleUpdated", + "payloadType": "verifier_report_update", + "txId": "0xc86669294104fea26444eb412d85a6b4c940d0d05c3fdccef2c26bc7753ca0af", + "receiptId": "0x6bd4278844d4803c92246f3e44ab1bdce702245f613af658776dcec59381dfb8", + "blockHeight": "1", + "eventIndex": 19, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0x5d0ad9b32f26abc0cd7be3b8869c51aefbc3cdd5d3f01735a8820fb7ff0910e1", + "attributes": [ + { + "key": "payloadType", + "value": "verifier_report_update", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0xb32efbce075e1cb579dd1f336f3e3f19f0376bb97a73d4e9c3a42908551aee40", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xeff272ec05deebd90cb44299696c02c612aaba75633b83e46a387ec862d086c0" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0xc4de82b39ea363819843ce71263a4e964742b11a7b241ce9aefb8d38d7c4f47f", + "eventType": "ObjectLifecycleUpdated", + "payloadType": "memory_cell_update", + "txId": "0x09b13bb36deeecd2f862620273e0c13b1c0c02e4545553117dc8eab61082a546", + "receiptId": "0xcbdcebbe06f7354341395af5fc87d4b443d0cf59480761ab790e38e857c9fd1d", + "blockHeight": "1", + "eventIndex": 20, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0xbcd05714eabfa7babbe32888041eaca0f715073f92e8c8cbd1f81922eeab5b16", + "attributes": [ + { + "key": "payloadType", + "value": "memory_cell_update", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x119ce8e2b8bff44f6dd3e58c5f55142f4b91192bd88dc4b342beb1dda2e4ec2b", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xb1eb78d8ad8ed90e6620da26ca085674d45b56e637a9575805178fb3b9a90db3" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0xe462a465a90e44bbb51e1b53aba5661cf0ad8039a84295c0819e8a4ff28744ec", + "eventType": "ObjectLifecycleUpdated", + "payloadType": "challenge_update", + "txId": "0xc20e5b49cac7f27690643613dac7e35f00452e826cbc22b4ddd7107d224a4b4a", + "receiptId": "0x2ecb3769958751ff06259795a187b2ef9972cce62aea38d1809b71fe3fcf25d5", + "blockHeight": "1", + "eventIndex": 21, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0x927bb5cb7a259e9ef7a3ca9ed94f4f536928f87ecec25ef8e04eb3dd16884ad9", + "attributes": [ + { + "key": "payloadType", + "value": "challenge_update", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x3b5f3c39e177cbe3f68b3e17c3386c42bc9bd233bc1481d53eac73751d910b38", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0x73ee5bc61d052d998e5598fa7cfa43ca39a1df00875f5bfc58b65e24f1524735" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x098ee4110828ebd8b5246a3c67d4086c3205a1a43eec46139b2be182eabc941a", + "eventType": "ObjectLifecycleUpdated", + "payloadType": "finality_receipt_update", + "txId": "0x39cfb18c324d443d4096ea96c5f5a6f307558025a7bf1df7286df3d5811fe37d", + "receiptId": "0xcb25bf4472251bf2e3320c7d2feed61ebd8fb831e887149906a226ef8bb14ce5", + "blockHeight": "1", + "eventIndex": 22, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0xd0017f1d9ab4a827a296feed92d8427582bb2eeac7bc1d006ecb843d2a2022fa", + "attributes": [ + { + "key": "payloadType", + "value": "finality_receipt_update", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x696e3e7a10a04d7d980be69b0c29c7c92de93b98c829b33a33626bc7f6a51ddd", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xf042e5c0afe0e537908e203f8cb1dda49b7ddace7f975bf58a1815128bc82981" + } + ], + "bridgeEvidence": [ + { + "schema": "flowchain.production_l1.bridge_evidence.v0", + "evidenceId": "0x013b5052df9be23c0816f77258d50bddfad0d73eb62af5fdd96a0b45d16fee21", + "evidenceType": "deposit_observation", + "sourceChainId": 8453, + "sourceNetwork": "base-mainnet-source-for-local-private-pilot", + "lockboxAddress": "0xb9524481c154c195b4236846fe9d8fcffd6ce407", + "sourceTxHash": "0x4487b7f7bffffe4903117c8190d64e58c40ecf96c43a4d30e0483a2b9ece0ee0", + "sourceBlockNumber": "45960000", + "sourceLogIndex": 7, + "tokenAddress": "0xe257180eba8c3194bd24ead035549e8beffbab16", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "depositorAddress": "0x6c6f65541dd5c673e0e3c23ba09f5e8735eaffcc", + "localRecipientAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "2500000", + "observedByRelayerAccountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "finalityStatus": "source_finalized", + "observationId": "0x070736a82e7dad444266af15ec8b521beba7c08502be2aeecb32c0f7f41b68d3", + "creditId": "0xd52d44dc757c0ecd7853bd269902848a3dd04af44db8dc704b347da47ed1b238", + "release": null, + "duplicateKey": "0x55575733fb056aaedf2d14985fc891da67a4093c6bc7d6719e4fcb83023fb467", + "evidenceHash": "0x7b96b892961fdd0534f8966c5b01bc85a5fb68ec6e88167c0d4397563197505b", + "localOnly": true, + "productionReady": false + }, + { + "schema": "flowchain.production_l1.bridge_evidence.v0", + "evidenceId": "0x4b632f40672ceb7ab195def56d8bc86141f1878ec31ffc742ec3e5b5d0def15d", + "evidenceType": "withdrawal_release", + "sourceChainId": 8453, + "sourceNetwork": "base-mainnet-source-for-local-private-pilot", + "lockboxAddress": "0xb9524481c154c195b4236846fe9d8fcffd6ce407", + "sourceTxHash": "0x4c19bdd150cfea9c1ca0d2235056607b40982e689306f7719c28888411dddcc0", + "sourceBlockNumber": "45960120", + "sourceLogIndex": 11, + "tokenAddress": "0xe257180eba8c3194bd24ead035549e8beffbab16", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "depositorAddress": "0x22b3e55090c43674cd92d303dffa95081ba06103", + "localRecipientAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "100000", + "observedByRelayerAccountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "finalityStatus": "source_finalized", + "release": { + "withdrawalIntentId": "0xa3bd91f938d573c2e58bb34f4842a3f9acb85df7d2b4086a5949a65b95c55ee6", + "releaseTxHash": "0x3eebf0e7466340c2ea56088c6c1c31bf7d6d0fe9a3c9944492861a51b387ecbb", + "releaseBlockNumber": "45960120", + "releaseLogIndex": 11, + "releasedToAddress": "0xb8eed8a8ec1ba09a1b46e79042399df3984f36df", + "releaseAuthorityAccountId": "0x9f7090c47663019f3d7647a2d4b5895a529e9dbac911bb2fde2c359828cbb3b8" + }, + "observationId": "0x2164a4e48209dee7e559ef33c22c098a880b2c61e866a5693eee877ac15cf4a7", + "creditId": "0x4de0d9d0ab3b86cfbd88cdd3bdbd1b0679646c18e56b63ec39898915b331fd1b", + "duplicateKey": "0x9f34308d4d924b7b5661ebcfa85f009c510730d6fca1f4aa14d2aa6fa2a7dd26", + "evidenceHash": "0x59d1fe84cc182b0b4cdaf891dad808bc7cbd25d6282ac3e8c91ae3b59ad30c78", + "localOnly": true, + "productionReady": false + } + ], + "stateRootManifest": { + "schema": "flowchain.production_l1.state_root_manifest.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "stateRoot": "0x716ccaf7e8946591973d4614d41ba39c047ef7e89bd67d62f1aa6d90b99133ef", + "stateRootAlgorithm": "keccak256(canonical-json-sorted-keys-v0)", + "components": [ + { + "component": "accounts", + "root": "0xf4914d4bb9ced10596986f52eefbe15e6b775c8b0855d51f85addd175b61e046", + "count": 6, + "ownerAgent": "wallet", + "inputs": [ + "accountId", + "publicKey", + "address", + "roleFlags", + "nonceDomain" + ] + }, + { + "component": "balances", + "root": "0x8a4fbb966efb61bd6e8f78fb7b8b510086b2650504654cc82a61d3ed97ac4d1c", + "count": 7, + "ownerAgent": "runtime", + "inputs": [ + "accountId", + "assetId", + "amount" + ] + }, + { + "component": "tokens", + "root": "0x542972588a71cf20b19e18681adc3bfbdcf7ca2fed4d4e60858e7679c2cbe238", + "count": 1, + "ownerAgent": "runtime", + "inputs": [ + "tokenId", + "symbol", + "decimals", + "totalSupply" + ] + }, + { + "component": "pools", + "root": "0x66666b609cd2486e0b688b8967452a54b49e684f587c107c8392d58b62ae3897", + "count": 1, + "ownerAgent": "runtime", + "inputs": [ + "poolId", + "baseAssetId", + "quoteAssetId", + "reserves" + ] + }, + { + "component": "lp_positions", + "root": "0xac45ae606ad56a72fd38b75aad52ed9b46365dfcca5b7679e3f7397d88ef05d3", + "count": 1, + "ownerAgent": "runtime", + "inputs": [ + "lpPositionId", + "poolId", + "ownerAccountId", + "lpUnits" + ] + }, + { + "component": "bridge_credits", + "root": "0x0f91f6d8d6a014b6b9e5c271e8a746256c4ef3b00c2194e0b858e405b7044b9a", + "count": 1, + "ownerAgent": "bridge", + "inputs": [ + "creditId", + "observationId", + "accountId", + "assetId", + "amount" + ] + }, + { + "component": "withdrawals", + "root": "0x179cf78b41131caefd13d557b73e73258fcb027e103007115deeb98e7755959f", + "count": 1, + "ownerAgent": "bridge", + "inputs": [ + "withdrawalIntentId", + "accountId", + "assetId", + "amount", + "releaseEvidenceId" + ] + }, + { + "component": "object_store", + "root": "0x96cca38dd6e86995a2b3551676a5c5777c3d270762cab8769771f840a9ac23fd", + "count": 9, + "ownerAgent": "runtime", + "inputs": [ + "objectType", + "objectId", + "objectHash", + "status" + ] + }, + { + "component": "finality", + "root": "0xbc714da6fb6a0957172d578e52e611e35c2f5c7a5433435c31736e6da2abf6f6", + "count": 1, + "ownerAgent": "consensus", + "inputs": [ + "height", + "status", + "certificateId" + ] + }, + { + "component": "validator_state", + "root": "0x6ae2131489fb1d27c5a6786fe058ad7a4d70edc598c0d766028fc1f4d1532290", + "count": 1, + "ownerAgent": "consensus", + "inputs": [ + "authorityId", + "accountId", + "votingPower", + "status" + ] + } + ], + "stateComponents": { + "accounts": [ + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "label": "alice-user", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": true, + "validator": false, + "bridgeOperator": false, + "deployer": true, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x1c114222c149606293a4dac2c2b8bd53d64517a2cb4804b13c560e6f0e3e09de", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "label": "bob-user", + "publicKey": "0x02bd133d4df63458ed49a0d7acde36d546b80c735f04d9a37eb428f1d92505b6be", + "address": "0xc8d2f10666e1216121f6449f0fc5726f63590aa7", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x8a6124844f49d9390c78a1dfd812c43c1963edf9be78b4154bc50fabf0e12f9a", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": true, + "validator": false, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0xd7456e440b78c346aa02b5fff11c181d45d40c691d836e571d464a595db02008", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "label": "validator-one", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x8aca75dd306f43261a9c58812a426a62ddf72e5a0823fe7ef6c4e0aff78b42d9", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": true, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x18e55b4da0218551072142ab2f110626c3f47f0c6f2a8fc5dbb5efb2fa3b34eb", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "label": "bridge-relayer", + "publicKey": "0x02f90ad32b15b53c0e4abd4f2f0de6db96dbe0adee1dab1736b0cf596070f7ef05", + "address": "0x633621fec8e01f8346130d81c26be8e33d1dcea9", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x346974a0aa8346f9759dde1d56bb8962a36eb013ca5e7f8c1b8e673fcfebd08a", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": true, + "deployer": false, + "relayer": true, + "emergencyOperator": false + }, + "metadataHash": "0x09d6e50d1093be697a68f09a0a8c99c1c8b072dd71ea832305d5153ae585a3ff", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0x9f7090c47663019f3d7647a2d4b5895a529e9dbac911bb2fde2c359828cbb3b8", + "label": "bridge-release-authority", + "publicKey": "0x02be094d43f51fb0e267c4ed5767bf26ef1370dc3c7756d1399d8e152c3a59b602", + "address": "0xdb523727f85b4f6d0ff5f62fc4d6c25a337af90d", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x0df088a7e0abfe419a042ed6caf58dba22d3a4f7e8ca066c3585b859ae870e4f", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": true, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x8f83b49dac9afecf998c810362df58ad3e05daa154a80f63cbf32acf3f435ed2", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0x458a01532bc3ec202c267dbd715ef239d54e3844cb37c57f504ab7e7f077ac8a", + "label": "emergency-operator", + "publicKey": "0x0202837e867307660b83033448b53dae9fbf18646041ac72fc3797272b59d65d79", + "address": "0x9386458c8c48d14bfebedc4fd00a528c15727b9e", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x6c2e83ab478452519394a62c494432d5e6643b6fd28c95af2fb38e55644ab734", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": true + }, + "metadataHash": "0xc0602b4f0b0d0dd87908d4808189afb4e60c7d7100865cabaf215fdf1311996f", + "status": "active", + "productionReady": false + } + ], + "balances": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "1000000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "100000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "50000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "25000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "2640000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "amount": "995050000", + "balanceType": "test_token", + "noValue": true + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "amount": "349000", + "balanceType": "test_token", + "noValue": true + } + ], + "tokens": [ + { + "tokenId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "symbol": "FLOWT", + "name": "FlowChain Local Test Token", + "decimals": 6, + "totalSupply": "1000250000", + "noValue": true + } + ], + "pools": [ + { + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "baseAssetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "quoteAssetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "reserveBase": "99000", + "reserveQuote": "4951000", + "feeBps": 30, + "noValue": true + } + ], + "lp_positions": [ + { + "lpPositionId": "0x027c83ae59eefcbea8ecb604e3a527e4392c82376866e2f1e6804bae5a1dbd7d", + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "ownerAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "lpUnits": "99900", + "noValue": true + } + ], + "bridge_credits": [ + { + "creditId": "0xd52d44dc757c0ecd7853bd269902848a3dd04af44db8dc704b347da47ed1b238", + "observationId": "0x070736a82e7dad444266af15ec8b521beba7c08502be2aeecb32c0f7f41b68d3", + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "2500000", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024" + } + ], + "withdrawals": [ + { + "withdrawalIntentId": "0xa3bd91f938d573c2e58bb34f4842a3f9acb85df7d2b4086a5949a65b95c55ee6", + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "100000", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "releaseEvidenceId": "0x4b632f40672ceb7ab195def56d8bc86141f1878ec31ffc742ec3e5b5d0def15d" + } + ], + "object_store": [ + { + "objectType": "AgentAccount", + "objectId": "0x79587bf5b81d6b566fe12453bc30803a773997e1f85371b4ba399d761758004d", + "objectHash": "0x24ad98a6c242b0b361aa0c48f6331202eb55002dd43e0db3bcbab52b30ac8018", + "status": "active" + }, + { + "objectType": "ModelPassport", + "objectId": "0xa73adb911f58e33dcd820471675d7a3d2b242be0574e217b144f4873135a4085", + "objectHash": "0xd5de49d30e0ff04ff2de2141d119bbfb46f3b741ce529f0594936a1cfba296d3", + "status": "active" + }, + { + "objectType": "WorkReceipt", + "objectId": "0xa96483b49a3d6005d748a512e00ab0bf1feb77d2bad4dec4f7842310bfe401f7", + "objectHash": "0xeb0475e34e1b2818d882210c44d3a3d8c6f30b1e551b827c48d9b0619ad238d9", + "status": "active" + }, + { + "objectType": "ArtifactAvailabilityProof", + "objectId": "0x7458f4ac71bc9008bc012e2a8cec5b529772b58f6fc86ab44bcd339a7070e069", + "objectHash": "0x67aed44d292f94b1bd141ec1f355955f96283783e08152a7237e2d37810fd49a", + "status": "active" + }, + { + "objectType": "VerifierModule", + "objectId": "0x5194f738c5e5d252e0ae82f28883d732b762b9944f20181b854841875c45c54b", + "objectHash": "0xfef87b4fe768283b6e0e741bde3c43e635ce3f89f769285e356027c813877895", + "status": "active" + }, + { + "objectType": "VerifierReport", + "objectId": "0x5d0ad9b32f26abc0cd7be3b8869c51aefbc3cdd5d3f01735a8820fb7ff0910e1", + "objectHash": "0xa8d1865f5910ec6a9b615c48d7768e6a6ad3d3647495ffd5e5f6e9a8870a9489", + "status": "active" + }, + { + "objectType": "MemoryCell", + "objectId": "0xbcd05714eabfa7babbe32888041eaca0f715073f92e8c8cbd1f81922eeab5b16", + "objectHash": "0x86eeee0b28fa6533fd4220fb4953e78c29e1d545d3cffea2d985053157923619", + "status": "active" + }, + { + "objectType": "Challenge", + "objectId": "0x927bb5cb7a259e9ef7a3ca9ed94f4f536928f87ecec25ef8e04eb3dd16884ad9", + "objectHash": "0xa73c3472a504f9dd8d98b3851f88a1fbaf9914524c0a7879172268bcc3225acf", + "status": "resolved" + }, + { + "objectType": "FinalityReceipt", + "objectId": "0xd0017f1d9ab4a827a296feed92d8427582bb2eeac7bc1d006ecb843d2a2022fa", + "objectHash": "0xe8331685281b5709bcff0d968bff6a796d9e78057156c9ad4662bcc6bb8ef1ac", + "status": "finalized" + } + ], + "finality": [ + { + "height": "1", + "status": "accepted", + "certificateId": "0x4b525f224cd71929a613f6235ffb03a641916851c2fc90843feec3bbad90a3b3" + } + ], + "validator_state": [ + { + "schema": "flowchain.production_l1.validator_authority.v0", + "authorityId": "0x4e7ad43d8db36ddde419d64fac4768a38167efd7b9e7abc503036f2ba22c92ba", + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "authorityType": "validator", + "votingPower": "1", + "finalityWeight": "1", + "metadataHash": "0x708f6074acaf685798e4085ceb5d4c3053dfa72bc1ccf0078feb3dbcd39c5e15", + "status": "active", + "productionReady": false + } + ] + }, + "deterministicReplay": { + "sameLogicalStateRoot": "0x716ccaf7e8946591973d4614d41ba39c047ef7e89bd67d62f1aa6d90b99133ef", + "replayCommand": "npm run validate:production-l1-fixtures" + } + } +} diff --git a/fixtures/production-l1/bridge-evidence.valid.json b/fixtures/production-l1/bridge-evidence.valid.json new file mode 100644 index 00000000..9836ac3e --- /dev/null +++ b/fixtures/production-l1/bridge-evidence.valid.json @@ -0,0 +1,62 @@ +{ + "schema": "flowchain.production_l1.bridge_evidence_fixture_set.v0", + "bridgeEvidence": [ + { + "schema": "flowchain.production_l1.bridge_evidence.v0", + "evidenceId": "0x013b5052df9be23c0816f77258d50bddfad0d73eb62af5fdd96a0b45d16fee21", + "evidenceType": "deposit_observation", + "sourceChainId": 8453, + "sourceNetwork": "base-mainnet-source-for-local-private-pilot", + "lockboxAddress": "0xb9524481c154c195b4236846fe9d8fcffd6ce407", + "sourceTxHash": "0x4487b7f7bffffe4903117c8190d64e58c40ecf96c43a4d30e0483a2b9ece0ee0", + "sourceBlockNumber": "45960000", + "sourceLogIndex": 7, + "tokenAddress": "0xe257180eba8c3194bd24ead035549e8beffbab16", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "depositorAddress": "0x6c6f65541dd5c673e0e3c23ba09f5e8735eaffcc", + "localRecipientAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "2500000", + "observedByRelayerAccountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "finalityStatus": "source_finalized", + "observationId": "0x070736a82e7dad444266af15ec8b521beba7c08502be2aeecb32c0f7f41b68d3", + "creditId": "0xd52d44dc757c0ecd7853bd269902848a3dd04af44db8dc704b347da47ed1b238", + "release": null, + "duplicateKey": "0x55575733fb056aaedf2d14985fc891da67a4093c6bc7d6719e4fcb83023fb467", + "evidenceHash": "0x7b96b892961fdd0534f8966c5b01bc85a5fb68ec6e88167c0d4397563197505b", + "localOnly": true, + "productionReady": false + }, + { + "schema": "flowchain.production_l1.bridge_evidence.v0", + "evidenceId": "0x4b632f40672ceb7ab195def56d8bc86141f1878ec31ffc742ec3e5b5d0def15d", + "evidenceType": "withdrawal_release", + "sourceChainId": 8453, + "sourceNetwork": "base-mainnet-source-for-local-private-pilot", + "lockboxAddress": "0xb9524481c154c195b4236846fe9d8fcffd6ce407", + "sourceTxHash": "0x4c19bdd150cfea9c1ca0d2235056607b40982e689306f7719c28888411dddcc0", + "sourceBlockNumber": "45960120", + "sourceLogIndex": 11, + "tokenAddress": "0xe257180eba8c3194bd24ead035549e8beffbab16", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "depositorAddress": "0x22b3e55090c43674cd92d303dffa95081ba06103", + "localRecipientAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "100000", + "observedByRelayerAccountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "finalityStatus": "source_finalized", + "release": { + "withdrawalIntentId": "0xa3bd91f938d573c2e58bb34f4842a3f9acb85df7d2b4086a5949a65b95c55ee6", + "releaseTxHash": "0x3eebf0e7466340c2ea56088c6c1c31bf7d6d0fe9a3c9944492861a51b387ecbb", + "releaseBlockNumber": "45960120", + "releaseLogIndex": 11, + "releasedToAddress": "0xb8eed8a8ec1ba09a1b46e79042399df3984f36df", + "releaseAuthorityAccountId": "0x9f7090c47663019f3d7647a2d4b5895a529e9dbac911bb2fde2c359828cbb3b8" + }, + "observationId": "0x2164a4e48209dee7e559ef33c22c098a880b2c61e866a5693eee877ac15cf4a7", + "creditId": "0x4de0d9d0ab3b86cfbd88cdd3bdbd1b0679646c18e56b63ec39898915b331fd1b", + "duplicateKey": "0x9f34308d4d924b7b5661ebcfa85f009c510730d6fca1f4aa14d2aa6fa2a7dd26", + "evidenceHash": "0x59d1fe84cc182b0b4cdaf891dad808bc7cbd25d6282ac3e8c91ae3b59ad30c78", + "localOnly": true, + "productionReady": false + } + ] +} diff --git a/fixtures/production-l1/events.valid.json b/fixtures/production-l1/events.valid.json new file mode 100644 index 00000000..53790b31 --- /dev/null +++ b/fixtures/production-l1/events.valid.json @@ -0,0 +1,580 @@ +{ + "schema": "flowchain.production_l1.event_fixture_set.v0", + "events": [ + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0xc6f8e2e9c44e10a90e458a7e97baa8c21d2662bbf01c4f0617f9f52f11615ec2", + "eventType": "NativeTransferRecorded", + "payloadType": "native_transfer", + "txId": "0x18e97cdd0f9b8222ae270a034b8b26daf6d73c43c425d0593100b1d889563930", + "receiptId": "0xaab66440be842f3a695bb4c3939c050ef52f8b73d238a3c7f0effc388e7e8d4d", + "blockHeight": "1", + "eventIndex": 0, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa", + "attributes": [ + { + "key": "payloadType", + "value": "native_transfer", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0x61af58bac99f973ae246080a2c77f51ce9286206b2e194b8d4858cf5ffa6faba" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x3113e8fc0d6c3cd517bd106edaf1759c05ecedbd9f269e09e1f1b5185e48a533", + "eventType": "FaucetFundingRecorded", + "payloadType": "faucet_funding", + "txId": "0x74b37fa211b380912250d589cbd52a7f08ef9e34ec68bcf034ef38d07697465a", + "receiptId": "0x4d2f916288f57f7c89a4612d3bb30c5251b6eaae5d702000fbafa9319159ddee", + "blockHeight": "1", + "eventIndex": 1, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0xa4e0c6b866e9ee38c2b31dd6a928388a7389c8058648609c80d490ce77f40073", + "attributes": [ + { + "key": "payloadType", + "value": "faucet_funding", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0xa4e0c6b866e9ee38c2b31dd6a928388a7389c8058648609c80d490ce77f40073", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0x5fb4d0a17ee4ab5ad5ec0444b18210d6c1e905620812688543bb0c474e01d153" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x18ab2a4773227935db49d5c55f829605523fa9f792a53fcb4db56f9dda74831e", + "eventType": "BridgeCreditApplied", + "payloadType": "bridge_credit", + "txId": "0x36f329a0663b99955a5778cefa40aed22fbafedea1230e559253aef782bbe42a", + "receiptId": "0x6ab4628784b485df65f9c0da7c17b74e65ef63cadecf01ef7bb167555095c173", + "blockHeight": "1", + "eventIndex": 2, + "emitterAccountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "subjectId": "0xd52d44dc757c0ecd7853bd269902848a3dd04af44db8dc704b347da47ed1b238", + "attributes": [ + { + "key": "payloadType", + "value": "bridge_credit", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x7a8668dcd2bffa80eb280031bd7757ecbaf8cd880d766d04e9bfc1a5bd8c4d66", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xfc11e98b91c24df15d14d21894225acbfe3624f38c0cd1303671e4055f152bd1" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x43bc800f9038b28b8b63cbb08163fb2b254b1b292ad8a35e1345c02fbf35d26d", + "eventType": "TokenLaunched", + "payloadType": "token_launch", + "txId": "0x6ca72702d734aea0d6b969b8aaa3328d0862f4b21ea0a8262ccc7839468c8c65", + "receiptId": "0x55db075836a0a940577fe6bbc9390929e41130149f85ec7742882232725a8b71", + "blockHeight": "1", + "eventIndex": 3, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "attributes": [ + { + "key": "payloadType", + "value": "token_launch", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x58b3ad1cc7dea9851e1f6813760e021681c975a6f8ebfe29a8c5116c43ac813d", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xb4ca02bd7ce9359585d2ab3b46e32807f667fb6bc7f985c24ece6b70459c0b25" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0xe35c08ebb149330513eeb85e5bbc7f564e5962e12a1c1becd45907ec3d990dd7", + "eventType": "TokenMinted", + "payloadType": "token_mint", + "txId": "0xc8cddac632390a6b736a7433c8fbc726028eb153517d5030ff17c94f5463a03a", + "receiptId": "0x57bd4ce1019d971caae3bc5a01c82daff0a82e8d227c004b71bc49e433361f12", + "blockHeight": "1", + "eventIndex": 4, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "attributes": [ + { + "key": "payloadType", + "value": "token_mint", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x9a084a321aab722fad0ed7f1e7bba27e4d9c72afe9d74b876a727ae2646cad9f", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xed54cdaf9c06e1389348f9cc193e2ca5e454866250ceb80d795b70405a3359eb" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x136b2ed86c9330e651e5f22057d0e679f79a5c9054a9baa3e7d3c815fa0a5210", + "eventType": "TokenTransferred", + "payloadType": "token_transfer", + "txId": "0x8a327e611d306b367d9794000a64395c96990d9d16b93d309e149fc56a8af9e7", + "receiptId": "0xc5961f384cf1c6effa725345efde771ce45b9783b737e8de0aa7478c94607f66", + "blockHeight": "1", + "eventIndex": 5, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "attributes": [ + { + "key": "payloadType", + "value": "token_transfer", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0xf297b8f97f86900fca41aa854aee01e0d8413ae99488e217ef75eaa5da1fd98f", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0x3d5f0e784adffabd45d344b205d5e888e3203674fedf1e582f9b0c729c66171b" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0xade5c06b4eb9d2876a11cb85e3060a8e80ea53447b62f8e34e6e8ece40e9ee8b", + "eventType": "PoolCreated", + "payloadType": "pool_create", + "txId": "0x459fd019e44fba8961ed3cab569eed08b906dfed8580c444002defe70b4147b4", + "receiptId": "0xf5b679bf1ca1ddf30680c5f5e336b1d7dde6afa5878a8eadfb18862f8528ecf7", + "blockHeight": "1", + "eventIndex": 6, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "attributes": [ + { + "key": "payloadType", + "value": "pool_create", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x099a7f62c1af5c718644e22a2a96486c4bdad7852c52d4373ed69c9a7aca3ae9", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xfbf8aa11ae0a7be70acb43bfc0b79289c562d55117dc15fcb4c602e24526c0eb" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0xf00a265dd32f64efd0398ec799527cf9bee0c9044c17dd99f478f4d0aedab5b9", + "eventType": "LiquidityAdded", + "payloadType": "add_liquidity", + "txId": "0xd4d4e811d8f4e18334823af5c81ff769eb27ff6e4d88d9b2e197fd9378c54535", + "receiptId": "0x69a1cec77fdac4171b4d7d72ac1904f43910fa7d46b2a46dd56c7fcff7ecd142", + "blockHeight": "1", + "eventIndex": 7, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "attributes": [ + { + "key": "payloadType", + "value": "add_liquidity", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x222a60a6e50c7a8d205fd472bb75c216485f56b33f824138a2b83cedd2ab6f7b", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xcf8258b060004399c6a0eda055cf48ef82f2448cdcc7eee6e7e1234925b95b3a" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x71e243ad26c879cabaf041f5677774f0ab8ab1922b54a7173bb35a6088c81677", + "eventType": "LiquidityRemoved", + "payloadType": "remove_liquidity", + "txId": "0xacef8f2d596a89b4f375e77d99a786fe50995f54558e0010f0d186a118303c03", + "receiptId": "0xc2473bf8abe594ecd9f0bda46cb3e3728f83a3988c1d9f477d05a7dd78e6ba55", + "blockHeight": "1", + "eventIndex": 8, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "attributes": [ + { + "key": "payloadType", + "value": "remove_liquidity", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0xb32b8118708f2adda42c92c555efab29e973efd05fc0a694ebd0cdd78e2caca5", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xa8ca500f8d665f122b6a06531c76ab375e6289fa4a728a37da3ee36a7bc409a6" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x4c93abec1055989ee9e54a615bff00758acb593f957ebe0cbf6d1781100abb60", + "eventType": "SwapExecuted", + "payloadType": "swap", + "txId": "0xc651a70810a35b170cbc851580fbc39ed1d1eed3f6ba5a7aac9837640c2e6116", + "receiptId": "0xc04b5906bfe4d4a8dbf8a1ae4e67d118cae78cd286058b72da9e4b854a2b12dd", + "blockHeight": "1", + "eventIndex": 9, + "emitterAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "subjectId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "attributes": [ + { + "key": "payloadType", + "value": "swap", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x15fa2e1e2c305a0d29bd6c674a1fec00b18346d9d60e31f7a7677bd18cb3aac9", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0x0a5d6e6af7694ff270f8761508cc518196c53a185e52350394040288fc227493" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0xff43e6ec48d56966d680893de999d296a277ed4f77693922e833b0f0908219eb", + "eventType": "WithdrawalIntentRecorded", + "payloadType": "withdrawal_intent", + "txId": "0xb0db1c922d7bbfa58759dfde491317d41c9aee638b442df4dfe1985b73e34c48", + "receiptId": "0x1ba588c12762f0aabcb7c76eb1e1746d93ab3d050de4fedb0baae5a1681af23d", + "blockHeight": "1", + "eventIndex": 10, + "emitterAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "subjectId": "0xa3bd91f938d573c2e58bb34f4842a3f9acb85df7d2b4086a5949a65b95c55ee6", + "attributes": [ + { + "key": "payloadType", + "value": "withdrawal_intent", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x8c8be8335d98fc6337cbef75b34ef228d11a4cacabf0b8da0d93282785d4efcb", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0x4350cd454520ccc3caab14e0ce477ae78898f1106ef8a2229ed94efd77bb902a" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x4213e214b202b5bc5aa268dff471c42d4197d4075d50b9dd70954d51f336e69a", + "eventType": "ValidatorAuthorityConfigured", + "payloadType": "validator_authority_config", + "txId": "0xd63772799f7ca1d3eddfcf9ba2ef9bf77444e46d8222d5721e5c38f4f86656c3", + "receiptId": "0x2cbdb8fab6b7c1c5057582a137e5f8e2f4a9c8d5fd195bdd6fe1f183fdcaa44c", + "blockHeight": "1", + "eventIndex": 11, + "emitterAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "subjectId": "0x4e7ad43d8db36ddde419d64fac4768a38167efd7b9e7abc503036f2ba22c92ba", + "attributes": [ + { + "key": "payloadType", + "value": "validator_authority_config", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x7536fd5ee06a6afa22228e339c896fa95e3a17c0b501c3556d8d88f07be5f908", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0x0f9d7ed3d328545f1d82a84e1682ad2312916bc0dbf9ee17252db4d4ba14ca8c" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x147b00cef5b801830faefd80f1e5b708677b0c62e320cf133dcec604a67aef38", + "eventType": "FinalityVoteRecorded", + "payloadType": "finality_vote", + "txId": "0x10f8e2a10f9e7eeb66b7958c59cca95443c84504deeee7b45b3cd695ccd74c8a", + "receiptId": "0x5c92898faf0c75e4ec9b39246c4629e464103f9005d23160c61845ca622f6616", + "blockHeight": "1", + "eventIndex": 12, + "emitterAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "subjectId": "0x680c40512bd8a86c0610e4787d5a346ed11ce7d487f37e51b49d8f347cbf4901", + "attributes": [ + { + "key": "payloadType", + "value": "finality_vote", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x680c40512bd8a86c0610e4787d5a346ed11ce7d487f37e51b49d8f347cbf4901", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xf99ec6944d36baff78ccd86da751284ec5ac6383e6178e351132e10786827ac9" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x57da01213fdb57bc6687284efa5ce316c0f43ddedb9e9adcad924d62de4f1bab", + "eventType": "FinalityCertificateRecorded", + "payloadType": "finality_certificate", + "txId": "0x2bf8ab2f47a541f7c2808c8bf9decec6a8f60d4d026c5ce1e43be10af156ee6c", + "receiptId": "0x73a0b8e32efca89f7a48e2f80bc5fd311b447fc41344b3887bf713c9c935852f", + "blockHeight": "1", + "eventIndex": 13, + "emitterAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "subjectId": "0x527697a531538b1617cec46d668a01a8d6b0d8210adb42b1506c0210b2df8a80", + "attributes": [ + { + "key": "payloadType", + "value": "finality_certificate", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x527697a531538b1617cec46d668a01a8d6b0d8210adb42b1506c0210b2df8a80", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xf3ab1e31f6bf0de8f379b3c7e2c6ab6f85142919d775f1f94e171d053f8a1693" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x381cfd3d9968a813c5a9c0e121c0852317c320d4b860fa1bbe4d53c7dc2d4266", + "eventType": "ObjectLifecycleUpdated", + "payloadType": "agent_account_update", + "txId": "0xd1a8d36d371779c09ecf2a627e27ceb85854fb3797d8a4b70ad7aa2fdc0baa83", + "receiptId": "0xc40dff53c1a8e16a65013d96fcabdd2ebdea0b37acdb25b6b17a7d001f43fea1", + "blockHeight": "1", + "eventIndex": 14, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0x79587bf5b81d6b566fe12453bc30803a773997e1f85371b4ba399d761758004d", + "attributes": [ + { + "key": "payloadType", + "value": "agent_account_update", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x00159178ecb25498ba211866e664bf321b41140d3283ffdf22adf5ff1afea75e", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xc72ef6730d2caafe7ca78e2cd052fef3df83d5ecfff61d98c047fdc5815a6b4d" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x9f6585f2178ba0d2efd9d37ce0f8625d7f802759f5c8dfa1ce37317d827c02ed", + "eventType": "ObjectLifecycleUpdated", + "payloadType": "model_passport_update", + "txId": "0xb539c517573818f12fa8d1a3604ec24296225a26ef76fb9badeaabed55b4f3dd", + "receiptId": "0x2261159f48fbb7b1a62b28f4156060594441987c49d6eaeecfe451f46c5bb517", + "blockHeight": "1", + "eventIndex": 15, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0xa73adb911f58e33dcd820471675d7a3d2b242be0574e217b144f4873135a4085", + "attributes": [ + { + "key": "payloadType", + "value": "model_passport_update", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0xe3cab3f31196df112aea6f29a374fb337acdab4b06e38b4af4d7c791a7651c59", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0x5a2d3910f0b49ea405259b4d85188bab68c5d032140c1d5ce3facbdec5ab9849" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x93f4077d3b4225a297ac3c652fe69d5e4b1e160a96201c8fd93538367ac095f8", + "eventType": "ObjectLifecycleUpdated", + "payloadType": "work_receipt_update", + "txId": "0x81650a8cda675785e199f8259b80fee11abadc43fffbf619ed694920c2b20fea", + "receiptId": "0x5ff763d0fb238a08f859991582bf569c7b3c6d25ca9c6b1024d348a221b2ebdd", + "blockHeight": "1", + "eventIndex": 16, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0xa96483b49a3d6005d748a512e00ab0bf1feb77d2bad4dec4f7842310bfe401f7", + "attributes": [ + { + "key": "payloadType", + "value": "work_receipt_update", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x0f20ce102d27fae1dcd6e39ede8549a9ce20ea089bf7e850bd78bfbae1b3c904", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0x2d9fdcfea45005f53d5c7f130ddc1051d0670f4673bd1bdf15c5ac62a9f4c5cd" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x23894d2f46ebe807e4c379a7c56a6df7231c5f5c0516aaa159f6ad2daf012bae", + "eventType": "ObjectLifecycleUpdated", + "payloadType": "artifact_availability_proof_update", + "txId": "0xf2755e509ad9a58d6c4d969ada79f08d7bfa7ceeef4d0b439959f8108ee8d026", + "receiptId": "0x146d5001dd2bb2fca087b678f3aa265157b225e3442db20cf9361f360fba609d", + "blockHeight": "1", + "eventIndex": 17, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0x7458f4ac71bc9008bc012e2a8cec5b529772b58f6fc86ab44bcd339a7070e069", + "attributes": [ + { + "key": "payloadType", + "value": "artifact_availability_proof_update", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x368dde5881c4ace9e3f79d3c0c0544a33c5f397138b566019a4582b334f91d5b", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xa15e0396b2bcd11c7b71265c04737af7db6b80bdba5f1962a48b8282ab954a5b" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x9abd63cbe0bcadd4341288bba2ad97bc88e64c785749c493e2f65220d884d289", + "eventType": "ObjectLifecycleUpdated", + "payloadType": "verifier_module_update", + "txId": "0x14c854dedf7535dc4b6d7aebf6891905d35889f95341e72df121c31d82bc2717", + "receiptId": "0xaa0a8a0b973625ce0a40c573a91613ff8460461e283a3ca92c08b6923975c64b", + "blockHeight": "1", + "eventIndex": 18, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0x5194f738c5e5d252e0ae82f28883d732b762b9944f20181b854841875c45c54b", + "attributes": [ + { + "key": "payloadType", + "value": "verifier_module_update", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x995dde6d97ac1eb6929e4bd4e039cf288b5be4d092c79f62701babcbeae04829", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xc4ec3f6e2fa93a9d0de804735332b2b4759200a05c17e79f3af74ee8a202e271" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x80e11e3a6ec9644110ec64329394c206b09e17396b61e56520ed6a00f8536ec7", + "eventType": "ObjectLifecycleUpdated", + "payloadType": "verifier_report_update", + "txId": "0xc86669294104fea26444eb412d85a6b4c940d0d05c3fdccef2c26bc7753ca0af", + "receiptId": "0x6bd4278844d4803c92246f3e44ab1bdce702245f613af658776dcec59381dfb8", + "blockHeight": "1", + "eventIndex": 19, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0x5d0ad9b32f26abc0cd7be3b8869c51aefbc3cdd5d3f01735a8820fb7ff0910e1", + "attributes": [ + { + "key": "payloadType", + "value": "verifier_report_update", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0xb32efbce075e1cb579dd1f336f3e3f19f0376bb97a73d4e9c3a42908551aee40", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xeff272ec05deebd90cb44299696c02c612aaba75633b83e46a387ec862d086c0" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0xc4de82b39ea363819843ce71263a4e964742b11a7b241ce9aefb8d38d7c4f47f", + "eventType": "ObjectLifecycleUpdated", + "payloadType": "memory_cell_update", + "txId": "0x09b13bb36deeecd2f862620273e0c13b1c0c02e4545553117dc8eab61082a546", + "receiptId": "0xcbdcebbe06f7354341395af5fc87d4b443d0cf59480761ab790e38e857c9fd1d", + "blockHeight": "1", + "eventIndex": 20, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0xbcd05714eabfa7babbe32888041eaca0f715073f92e8c8cbd1f81922eeab5b16", + "attributes": [ + { + "key": "payloadType", + "value": "memory_cell_update", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x119ce8e2b8bff44f6dd3e58c5f55142f4b91192bd88dc4b342beb1dda2e4ec2b", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xb1eb78d8ad8ed90e6620da26ca085674d45b56e637a9575805178fb3b9a90db3" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0xe462a465a90e44bbb51e1b53aba5661cf0ad8039a84295c0819e8a4ff28744ec", + "eventType": "ObjectLifecycleUpdated", + "payloadType": "challenge_update", + "txId": "0xc20e5b49cac7f27690643613dac7e35f00452e826cbc22b4ddd7107d224a4b4a", + "receiptId": "0x2ecb3769958751ff06259795a187b2ef9972cce62aea38d1809b71fe3fcf25d5", + "blockHeight": "1", + "eventIndex": 21, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0x927bb5cb7a259e9ef7a3ca9ed94f4f536928f87ecec25ef8e04eb3dd16884ad9", + "attributes": [ + { + "key": "payloadType", + "value": "challenge_update", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x3b5f3c39e177cbe3f68b3e17c3386c42bc9bd233bc1481d53eac73751d910b38", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0x73ee5bc61d052d998e5598fa7cfa43ca39a1df00875f5bfc58b65e24f1524735" + }, + { + "schema": "flowchain.production_l1.event.v0", + "eventId": "0x098ee4110828ebd8b5246a3c67d4086c3205a1a43eec46139b2be182eabc941a", + "eventType": "ObjectLifecycleUpdated", + "payloadType": "finality_receipt_update", + "txId": "0x39cfb18c324d443d4096ea96c5f5a6f307558025a7bf1df7286df3d5811fe37d", + "receiptId": "0xcb25bf4472251bf2e3320c7d2feed61ebd8fb831e887149906a226ef8bb14ce5", + "blockHeight": "1", + "eventIndex": 22, + "emitterAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "subjectId": "0xd0017f1d9ab4a827a296feed92d8427582bb2eeac7bc1d006ecb843d2a2022fa", + "attributes": [ + { + "key": "payloadType", + "value": "finality_receipt_update", + "valueType": "string" + }, + { + "key": "payloadId", + "value": "0x696e3e7a10a04d7d980be69b0c29c7c92de93b98c829b33a33626bc7f6a51ddd", + "valueType": "hex32" + } + ], + "deterministicIdInput": "0xf042e5c0afe0e537908e203f8cb1dda49b7ddace7f975bf58a1815128bc82981" + } + ] +} diff --git a/fixtures/production-l1/export-snapshot.valid.json b/fixtures/production-l1/export-snapshot.valid.json new file mode 100644 index 00000000..196fa4c4 --- /dev/null +++ b/fixtures/production-l1/export-snapshot.valid.json @@ -0,0 +1,909 @@ +{ + "schema": "flowchain.production_l1.export_snapshot.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "blockHeight": "1", + "blockHash": "0x4e38335dd2b0163f75d631c9b6648b6cc59f83e2b3a32e72d301322ac27148c4", + "stateRoot": "0x716ccaf7e8946591973d4614d41ba39c047ef7e89bd67d62f1aa6d90b99133ef", + "stateRootManifest": { + "schema": "flowchain.production_l1.state_root_manifest.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "stateRoot": "0x716ccaf7e8946591973d4614d41ba39c047ef7e89bd67d62f1aa6d90b99133ef", + "stateRootAlgorithm": "keccak256(canonical-json-sorted-keys-v0)", + "components": [ + { + "component": "accounts", + "root": "0xf4914d4bb9ced10596986f52eefbe15e6b775c8b0855d51f85addd175b61e046", + "count": 6, + "ownerAgent": "wallet", + "inputs": [ + "accountId", + "publicKey", + "address", + "roleFlags", + "nonceDomain" + ] + }, + { + "component": "balances", + "root": "0x8a4fbb966efb61bd6e8f78fb7b8b510086b2650504654cc82a61d3ed97ac4d1c", + "count": 7, + "ownerAgent": "runtime", + "inputs": [ + "accountId", + "assetId", + "amount" + ] + }, + { + "component": "tokens", + "root": "0x542972588a71cf20b19e18681adc3bfbdcf7ca2fed4d4e60858e7679c2cbe238", + "count": 1, + "ownerAgent": "runtime", + "inputs": [ + "tokenId", + "symbol", + "decimals", + "totalSupply" + ] + }, + { + "component": "pools", + "root": "0x66666b609cd2486e0b688b8967452a54b49e684f587c107c8392d58b62ae3897", + "count": 1, + "ownerAgent": "runtime", + "inputs": [ + "poolId", + "baseAssetId", + "quoteAssetId", + "reserves" + ] + }, + { + "component": "lp_positions", + "root": "0xac45ae606ad56a72fd38b75aad52ed9b46365dfcca5b7679e3f7397d88ef05d3", + "count": 1, + "ownerAgent": "runtime", + "inputs": [ + "lpPositionId", + "poolId", + "ownerAccountId", + "lpUnits" + ] + }, + { + "component": "bridge_credits", + "root": "0x0f91f6d8d6a014b6b9e5c271e8a746256c4ef3b00c2194e0b858e405b7044b9a", + "count": 1, + "ownerAgent": "bridge", + "inputs": [ + "creditId", + "observationId", + "accountId", + "assetId", + "amount" + ] + }, + { + "component": "withdrawals", + "root": "0x179cf78b41131caefd13d557b73e73258fcb027e103007115deeb98e7755959f", + "count": 1, + "ownerAgent": "bridge", + "inputs": [ + "withdrawalIntentId", + "accountId", + "assetId", + "amount", + "releaseEvidenceId" + ] + }, + { + "component": "object_store", + "root": "0x96cca38dd6e86995a2b3551676a5c5777c3d270762cab8769771f840a9ac23fd", + "count": 9, + "ownerAgent": "runtime", + "inputs": [ + "objectType", + "objectId", + "objectHash", + "status" + ] + }, + { + "component": "finality", + "root": "0xbc714da6fb6a0957172d578e52e611e35c2f5c7a5433435c31736e6da2abf6f6", + "count": 1, + "ownerAgent": "consensus", + "inputs": [ + "height", + "status", + "certificateId" + ] + }, + { + "component": "validator_state", + "root": "0x6ae2131489fb1d27c5a6786fe058ad7a4d70edc598c0d766028fc1f4d1532290", + "count": 1, + "ownerAgent": "consensus", + "inputs": [ + "authorityId", + "accountId", + "votingPower", + "status" + ] + } + ], + "stateComponents": { + "accounts": [ + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "label": "alice-user", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": true, + "validator": false, + "bridgeOperator": false, + "deployer": true, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x1c114222c149606293a4dac2c2b8bd53d64517a2cb4804b13c560e6f0e3e09de", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "label": "bob-user", + "publicKey": "0x02bd133d4df63458ed49a0d7acde36d546b80c735f04d9a37eb428f1d92505b6be", + "address": "0xc8d2f10666e1216121f6449f0fc5726f63590aa7", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x8a6124844f49d9390c78a1dfd812c43c1963edf9be78b4154bc50fabf0e12f9a", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": true, + "validator": false, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0xd7456e440b78c346aa02b5fff11c181d45d40c691d836e571d464a595db02008", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "label": "validator-one", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x8aca75dd306f43261a9c58812a426a62ddf72e5a0823fe7ef6c4e0aff78b42d9", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": true, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x18e55b4da0218551072142ab2f110626c3f47f0c6f2a8fc5dbb5efb2fa3b34eb", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "label": "bridge-relayer", + "publicKey": "0x02f90ad32b15b53c0e4abd4f2f0de6db96dbe0adee1dab1736b0cf596070f7ef05", + "address": "0x633621fec8e01f8346130d81c26be8e33d1dcea9", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x346974a0aa8346f9759dde1d56bb8962a36eb013ca5e7f8c1b8e673fcfebd08a", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": true, + "deployer": false, + "relayer": true, + "emergencyOperator": false + }, + "metadataHash": "0x09d6e50d1093be697a68f09a0a8c99c1c8b072dd71ea832305d5153ae585a3ff", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0x9f7090c47663019f3d7647a2d4b5895a529e9dbac911bb2fde2c359828cbb3b8", + "label": "bridge-release-authority", + "publicKey": "0x02be094d43f51fb0e267c4ed5767bf26ef1370dc3c7756d1399d8e152c3a59b602", + "address": "0xdb523727f85b4f6d0ff5f62fc4d6c25a337af90d", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x0df088a7e0abfe419a042ed6caf58dba22d3a4f7e8ca066c3585b859ae870e4f", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": true, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x8f83b49dac9afecf998c810362df58ad3e05daa154a80f63cbf32acf3f435ed2", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0x458a01532bc3ec202c267dbd715ef239d54e3844cb37c57f504ab7e7f077ac8a", + "label": "emergency-operator", + "publicKey": "0x0202837e867307660b83033448b53dae9fbf18646041ac72fc3797272b59d65d79", + "address": "0x9386458c8c48d14bfebedc4fd00a528c15727b9e", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x6c2e83ab478452519394a62c494432d5e6643b6fd28c95af2fb38e55644ab734", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": true + }, + "metadataHash": "0xc0602b4f0b0d0dd87908d4808189afb4e60c7d7100865cabaf215fdf1311996f", + "status": "active", + "productionReady": false + } + ], + "balances": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "1000000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "100000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "50000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "25000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "2640000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "amount": "995050000", + "balanceType": "test_token", + "noValue": true + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "amount": "349000", + "balanceType": "test_token", + "noValue": true + } + ], + "tokens": [ + { + "tokenId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "symbol": "FLOWT", + "name": "FlowChain Local Test Token", + "decimals": 6, + "totalSupply": "1000250000", + "noValue": true + } + ], + "pools": [ + { + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "baseAssetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "quoteAssetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "reserveBase": "99000", + "reserveQuote": "4951000", + "feeBps": 30, + "noValue": true + } + ], + "lp_positions": [ + { + "lpPositionId": "0x027c83ae59eefcbea8ecb604e3a527e4392c82376866e2f1e6804bae5a1dbd7d", + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "ownerAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "lpUnits": "99900", + "noValue": true + } + ], + "bridge_credits": [ + { + "creditId": "0xd52d44dc757c0ecd7853bd269902848a3dd04af44db8dc704b347da47ed1b238", + "observationId": "0x070736a82e7dad444266af15ec8b521beba7c08502be2aeecb32c0f7f41b68d3", + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "2500000", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024" + } + ], + "withdrawals": [ + { + "withdrawalIntentId": "0xa3bd91f938d573c2e58bb34f4842a3f9acb85df7d2b4086a5949a65b95c55ee6", + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "100000", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "releaseEvidenceId": "0x4b632f40672ceb7ab195def56d8bc86141f1878ec31ffc742ec3e5b5d0def15d" + } + ], + "object_store": [ + { + "objectType": "AgentAccount", + "objectId": "0x79587bf5b81d6b566fe12453bc30803a773997e1f85371b4ba399d761758004d", + "objectHash": "0x24ad98a6c242b0b361aa0c48f6331202eb55002dd43e0db3bcbab52b30ac8018", + "status": "active" + }, + { + "objectType": "ModelPassport", + "objectId": "0xa73adb911f58e33dcd820471675d7a3d2b242be0574e217b144f4873135a4085", + "objectHash": "0xd5de49d30e0ff04ff2de2141d119bbfb46f3b741ce529f0594936a1cfba296d3", + "status": "active" + }, + { + "objectType": "WorkReceipt", + "objectId": "0xa96483b49a3d6005d748a512e00ab0bf1feb77d2bad4dec4f7842310bfe401f7", + "objectHash": "0xeb0475e34e1b2818d882210c44d3a3d8c6f30b1e551b827c48d9b0619ad238d9", + "status": "active" + }, + { + "objectType": "ArtifactAvailabilityProof", + "objectId": "0x7458f4ac71bc9008bc012e2a8cec5b529772b58f6fc86ab44bcd339a7070e069", + "objectHash": "0x67aed44d292f94b1bd141ec1f355955f96283783e08152a7237e2d37810fd49a", + "status": "active" + }, + { + "objectType": "VerifierModule", + "objectId": "0x5194f738c5e5d252e0ae82f28883d732b762b9944f20181b854841875c45c54b", + "objectHash": "0xfef87b4fe768283b6e0e741bde3c43e635ce3f89f769285e356027c813877895", + "status": "active" + }, + { + "objectType": "VerifierReport", + "objectId": "0x5d0ad9b32f26abc0cd7be3b8869c51aefbc3cdd5d3f01735a8820fb7ff0910e1", + "objectHash": "0xa8d1865f5910ec6a9b615c48d7768e6a6ad3d3647495ffd5e5f6e9a8870a9489", + "status": "active" + }, + { + "objectType": "MemoryCell", + "objectId": "0xbcd05714eabfa7babbe32888041eaca0f715073f92e8c8cbd1f81922eeab5b16", + "objectHash": "0x86eeee0b28fa6533fd4220fb4953e78c29e1d545d3cffea2d985053157923619", + "status": "active" + }, + { + "objectType": "Challenge", + "objectId": "0x927bb5cb7a259e9ef7a3ca9ed94f4f536928f87ecec25ef8e04eb3dd16884ad9", + "objectHash": "0xa73c3472a504f9dd8d98b3851f88a1fbaf9914524c0a7879172268bcc3225acf", + "status": "resolved" + }, + { + "objectType": "FinalityReceipt", + "objectId": "0xd0017f1d9ab4a827a296feed92d8427582bb2eeac7bc1d006ecb843d2a2022fa", + "objectHash": "0xe8331685281b5709bcff0d968bff6a796d9e78057156c9ad4662bcc6bb8ef1ac", + "status": "finalized" + } + ], + "finality": [ + { + "height": "1", + "status": "accepted", + "certificateId": "0x4b525f224cd71929a613f6235ffb03a641916851c2fc90843feec3bbad90a3b3" + } + ], + "validator_state": [ + { + "schema": "flowchain.production_l1.validator_authority.v0", + "authorityId": "0x4e7ad43d8db36ddde419d64fac4768a38167efd7b9e7abc503036f2ba22c92ba", + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "authorityType": "validator", + "votingPower": "1", + "finalityWeight": "1", + "metadataHash": "0x708f6074acaf685798e4085ceb5d4c3053dfa72bc1ccf0078feb3dbcd39c5e15", + "status": "active", + "productionReady": false + } + ] + }, + "deterministicReplay": { + "sameLogicalStateRoot": "0x716ccaf7e8946591973d4614d41ba39c047ef7e89bd67d62f1aa6d90b99133ef", + "replayCommand": "npm run validate:production-l1-fixtures" + } + }, + "accounts": [ + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "label": "alice-user", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": true, + "validator": false, + "bridgeOperator": false, + "deployer": true, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x1c114222c149606293a4dac2c2b8bd53d64517a2cb4804b13c560e6f0e3e09de", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "label": "bob-user", + "publicKey": "0x02bd133d4df63458ed49a0d7acde36d546b80c735f04d9a37eb428f1d92505b6be", + "address": "0xc8d2f10666e1216121f6449f0fc5726f63590aa7", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x8a6124844f49d9390c78a1dfd812c43c1963edf9be78b4154bc50fabf0e12f9a", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": true, + "validator": false, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0xd7456e440b78c346aa02b5fff11c181d45d40c691d836e571d464a595db02008", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "label": "validator-one", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x8aca75dd306f43261a9c58812a426a62ddf72e5a0823fe7ef6c4e0aff78b42d9", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": true, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x18e55b4da0218551072142ab2f110626c3f47f0c6f2a8fc5dbb5efb2fa3b34eb", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "label": "bridge-relayer", + "publicKey": "0x02f90ad32b15b53c0e4abd4f2f0de6db96dbe0adee1dab1736b0cf596070f7ef05", + "address": "0x633621fec8e01f8346130d81c26be8e33d1dcea9", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x346974a0aa8346f9759dde1d56bb8962a36eb013ca5e7f8c1b8e673fcfebd08a", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": true, + "deployer": false, + "relayer": true, + "emergencyOperator": false + }, + "metadataHash": "0x09d6e50d1093be697a68f09a0a8c99c1c8b072dd71ea832305d5153ae585a3ff", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0x9f7090c47663019f3d7647a2d4b5895a529e9dbac911bb2fde2c359828cbb3b8", + "label": "bridge-release-authority", + "publicKey": "0x02be094d43f51fb0e267c4ed5767bf26ef1370dc3c7756d1399d8e152c3a59b602", + "address": "0xdb523727f85b4f6d0ff5f62fc4d6c25a337af90d", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x0df088a7e0abfe419a042ed6caf58dba22d3a4f7e8ca066c3585b859ae870e4f", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": true, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x8f83b49dac9afecf998c810362df58ad3e05daa154a80f63cbf32acf3f435ed2", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0x458a01532bc3ec202c267dbd715ef239d54e3844cb37c57f504ab7e7f077ac8a", + "label": "emergency-operator", + "publicKey": "0x0202837e867307660b83033448b53dae9fbf18646041ac72fc3797272b59d65d79", + "address": "0x9386458c8c48d14bfebedc4fd00a528c15727b9e", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x6c2e83ab478452519394a62c494432d5e6643b6fd28c95af2fb38e55644ab734", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": true + }, + "metadataHash": "0xc0602b4f0b0d0dd87908d4808189afb4e60c7d7100865cabaf215fdf1311996f", + "status": "active", + "productionReady": false + } + ], + "balances": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "1000000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "100000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "50000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "25000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "2640000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "amount": "995050000", + "balanceType": "test_token", + "noValue": true + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "amount": "349000", + "balanceType": "test_token", + "noValue": true + } + ], + "tokens": [ + { + "tokenId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "symbol": "FLOWT", + "name": "FlowChain Local Test Token", + "decimals": 6, + "totalSupply": "1000250000", + "noValue": true + } + ], + "pools": [ + { + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "baseAssetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "quoteAssetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "reserveBase": "99000", + "reserveQuote": "4951000", + "feeBps": 30, + "noValue": true + } + ], + "bridgeCredits": [ + { + "creditId": "0xd52d44dc757c0ecd7853bd269902848a3dd04af44db8dc704b347da47ed1b238", + "observationId": "0x070736a82e7dad444266af15ec8b521beba7c08502be2aeecb32c0f7f41b68d3", + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "2500000", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024" + } + ], + "withdrawals": [ + { + "withdrawalIntentId": "0xa3bd91f938d573c2e58bb34f4842a3f9acb85df7d2b4086a5949a65b95c55ee6", + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "100000", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "releaseEvidenceId": "0x4b632f40672ceb7ab195def56d8bc86141f1878ec31ffc742ec3e5b5d0def15d" + } + ], + "objectStoreRefs": [ + { + "objectType": "AgentAccount", + "objectId": "0x79587bf5b81d6b566fe12453bc30803a773997e1f85371b4ba399d761758004d", + "objectHash": "0x24ad98a6c242b0b361aa0c48f6331202eb55002dd43e0db3bcbab52b30ac8018", + "status": "active" + }, + { + "objectType": "ModelPassport", + "objectId": "0xa73adb911f58e33dcd820471675d7a3d2b242be0574e217b144f4873135a4085", + "objectHash": "0xd5de49d30e0ff04ff2de2141d119bbfb46f3b741ce529f0594936a1cfba296d3", + "status": "active" + }, + { + "objectType": "WorkReceipt", + "objectId": "0xa96483b49a3d6005d748a512e00ab0bf1feb77d2bad4dec4f7842310bfe401f7", + "objectHash": "0xeb0475e34e1b2818d882210c44d3a3d8c6f30b1e551b827c48d9b0619ad238d9", + "status": "active" + }, + { + "objectType": "ArtifactAvailabilityProof", + "objectId": "0x7458f4ac71bc9008bc012e2a8cec5b529772b58f6fc86ab44bcd339a7070e069", + "objectHash": "0x67aed44d292f94b1bd141ec1f355955f96283783e08152a7237e2d37810fd49a", + "status": "active" + }, + { + "objectType": "VerifierModule", + "objectId": "0x5194f738c5e5d252e0ae82f28883d732b762b9944f20181b854841875c45c54b", + "objectHash": "0xfef87b4fe768283b6e0e741bde3c43e635ce3f89f769285e356027c813877895", + "status": "active" + }, + { + "objectType": "VerifierReport", + "objectId": "0x5d0ad9b32f26abc0cd7be3b8869c51aefbc3cdd5d3f01735a8820fb7ff0910e1", + "objectHash": "0xa8d1865f5910ec6a9b615c48d7768e6a6ad3d3647495ffd5e5f6e9a8870a9489", + "status": "active" + }, + { + "objectType": "MemoryCell", + "objectId": "0xbcd05714eabfa7babbe32888041eaca0f715073f92e8c8cbd1f81922eeab5b16", + "objectHash": "0x86eeee0b28fa6533fd4220fb4953e78c29e1d545d3cffea2d985053157923619", + "status": "active" + }, + { + "objectType": "Challenge", + "objectId": "0x927bb5cb7a259e9ef7a3ca9ed94f4f536928f87ecec25ef8e04eb3dd16884ad9", + "objectHash": "0xa73c3472a504f9dd8d98b3851f88a1fbaf9914524c0a7879172268bcc3225acf", + "status": "resolved" + }, + { + "objectType": "FinalityReceipt", + "objectId": "0xd0017f1d9ab4a827a296feed92d8427582bb2eeac7bc1d006ecb843d2a2022fa", + "objectHash": "0xe8331685281b5709bcff0d968bff6a796d9e78057156c9ad4662bcc6bb8ef1ac", + "status": "finalized" + } + ], + "finalityReceipts": [ + { + "schema": "flowchain.production_l1.finality_receipt.v0", + "finalityReceiptId": "0x923470bea3e37e7f11f768a5a454b411f744c475a2e53b9c2459569de15d5bda", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "height": "1", + "blockHash": "0x4e38335dd2b0163f75d631c9b6648b6cc59f83e2b3a32e72d301322ac27148c4", + "stateRoot": "0x716ccaf7e8946591973d4614d41ba39c047ef7e89bd67d62f1aa6d90b99133ef", + "finalizedHeight": "1", + "finalityRule": "source_base_confirmed_destination_local_finalized", + "status": "accepted", + "validatorSetHash": "0xc3ad18f0ddd541d07e5efbb7fba7b1ef17523e20565611bb8e30ae590f2303c0", + "certificateHash": "0x5edc290e0df1707fb298a1fa49c0aae535f26151a1a9f577dc81289c4119f387", + "evidenceRoot": "0xfe9913ee8132ffb0ea7dea147bd15f084ca76d057a62ecc9917117e7f8a54b60", + "producedAt": "2026-05-13T15:00:03.000Z", + "productionReady": false + } + ], + "provenance": { + "generatedBy": "fixtures/production-l1/production-l1-tools.mjs", + "schemaNames": [ + "production-account-public-metadata.schema.json", + "production-block-body.schema.json", + "production-block-header.schema.json", + "production-bridge-evidence.schema.json", + "production-event.schema.json", + "production-export-snapshot.schema.json", + "production-finality-receipt.schema.json", + "production-genesis.schema.json", + "production-network-profile.schema.json", + "production-receipt.schema.json", + "production-state-root-manifest.schema.json", + "production-transaction-envelope.schema.json", + "production-transaction-payload.schema.json", + "production-validator-authority.schema.json" + ], + "fixturePaths": [ + "fixtures/production-l1/profiles.json", + "fixtures/production-l1/genesis.input.json", + "fixtures/production-l1/genesis.json", + "fixtures/production-l1/transactions.valid.json", + "fixtures/production-l1/receipts.valid.json", + "fixtures/production-l1/block.valid.json", + "fixtures/production-l1/negative-fixtures.json" + ], + "validationCommands": [ + "npm run validate:production-l1-protocol", + "npm run validate:production-l1-fixtures" + ] + }, + "productionReady": false +} diff --git a/fixtures/production-l1/finality-receipt.valid.json b/fixtures/production-l1/finality-receipt.valid.json new file mode 100644 index 00000000..64382aff --- /dev/null +++ b/fixtures/production-l1/finality-receipt.valid.json @@ -0,0 +1,17 @@ +{ + "schema": "flowchain.production_l1.finality_receipt.v0", + "finalityReceiptId": "0x923470bea3e37e7f11f768a5a454b411f744c475a2e53b9c2459569de15d5bda", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "height": "1", + "blockHash": "0x4e38335dd2b0163f75d631c9b6648b6cc59f83e2b3a32e72d301322ac27148c4", + "stateRoot": "0x716ccaf7e8946591973d4614d41ba39c047ef7e89bd67d62f1aa6d90b99133ef", + "finalizedHeight": "1", + "finalityRule": "source_base_confirmed_destination_local_finalized", + "status": "accepted", + "validatorSetHash": "0xc3ad18f0ddd541d07e5efbb7fba7b1ef17523e20565611bb8e30ae590f2303c0", + "certificateHash": "0x5edc290e0df1707fb298a1fa49c0aae535f26151a1a9f577dc81289c4119f387", + "evidenceRoot": "0xfe9913ee8132ffb0ea7dea147bd15f084ca76d057a62ecc9917117e7f8a54b60", + "producedAt": "2026-05-13T15:00:03.000Z", + "productionReady": false +} diff --git a/fixtures/production-l1/genesis.input.json b/fixtures/production-l1/genesis.input.json new file mode 100644 index 00000000..cf9cb28e --- /dev/null +++ b/fixtures/production-l1/genesis.input.json @@ -0,0 +1,269 @@ +{ + "schema": "flowchain.production_l1.genesis_input.v0", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "networkProfile": "flowchain-base8453-pilot", + "chainId": "7428453", + "networkName": "FlowChain Base 8453 Pilot Destination", + "genesisTimestamp": "2026-05-13T15:00:00.000Z", + "genesisUnixMs": "1778684400000", + "stateRootSeed": "0x75881068f60f90222d1556de109cb5cc97737a5c37239785cae0845227e45889", + "initialAccounts": [ + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "label": "alice-user", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": true, + "validator": false, + "bridgeOperator": false, + "deployer": true, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x1c114222c149606293a4dac2c2b8bd53d64517a2cb4804b13c560e6f0e3e09de", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "label": "bob-user", + "publicKey": "0x02bd133d4df63458ed49a0d7acde36d546b80c735f04d9a37eb428f1d92505b6be", + "address": "0xc8d2f10666e1216121f6449f0fc5726f63590aa7", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x8a6124844f49d9390c78a1dfd812c43c1963edf9be78b4154bc50fabf0e12f9a", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": true, + "validator": false, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0xd7456e440b78c346aa02b5fff11c181d45d40c691d836e571d464a595db02008", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "label": "validator-one", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x8aca75dd306f43261a9c58812a426a62ddf72e5a0823fe7ef6c4e0aff78b42d9", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": true, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x18e55b4da0218551072142ab2f110626c3f47f0c6f2a8fc5dbb5efb2fa3b34eb", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "label": "bridge-relayer", + "publicKey": "0x02f90ad32b15b53c0e4abd4f2f0de6db96dbe0adee1dab1736b0cf596070f7ef05", + "address": "0x633621fec8e01f8346130d81c26be8e33d1dcea9", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x346974a0aa8346f9759dde1d56bb8962a36eb013ca5e7f8c1b8e673fcfebd08a", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": true, + "deployer": false, + "relayer": true, + "emergencyOperator": false + }, + "metadataHash": "0x09d6e50d1093be697a68f09a0a8c99c1c8b072dd71ea832305d5153ae585a3ff", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0x9f7090c47663019f3d7647a2d4b5895a529e9dbac911bb2fde2c359828cbb3b8", + "label": "bridge-release-authority", + "publicKey": "0x02be094d43f51fb0e267c4ed5767bf26ef1370dc3c7756d1399d8e152c3a59b602", + "address": "0xdb523727f85b4f6d0ff5f62fc4d6c25a337af90d", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x0df088a7e0abfe419a042ed6caf58dba22d3a4f7e8ca066c3585b859ae870e4f", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": true, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x8f83b49dac9afecf998c810362df58ad3e05daa154a80f63cbf32acf3f435ed2", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0x458a01532bc3ec202c267dbd715ef239d54e3844cb37c57f504ab7e7f077ac8a", + "label": "emergency-operator", + "publicKey": "0x0202837e867307660b83033448b53dae9fbf18646041ac72fc3797272b59d65d79", + "address": "0x9386458c8c48d14bfebedc4fd00a528c15727b9e", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x6c2e83ab478452519394a62c494432d5e6643b6fd28c95af2fb38e55644ab734", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": true + }, + "metadataHash": "0xc0602b4f0b0d0dd87908d4808189afb4e60c7d7100865cabaf215fdf1311996f", + "status": "active", + "productionReady": false + } + ], + "initialBalances": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "1000000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "100000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "50000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "25000", + "balanceType": "native_local_unit", + "noValue": true + } + ], + "validatorSet": [ + { + "schema": "flowchain.production_l1.validator_authority.v0", + "authorityId": "0x4e7ad43d8db36ddde419d64fac4768a38167efd7b9e7abc503036f2ba22c92ba", + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "authorityType": "validator", + "votingPower": "1", + "finalityWeight": "1", + "metadataHash": "0x708f6074acaf685798e4085ceb5d4c3053dfa72bc1ccf0078feb3dbcd39c5e15", + "status": "active", + "productionReady": false + } + ], + "bridgePilotConfig": { + "enabled": true, + "sourceChainId": 8453, + "sourceNetwork": "base-mainnet-source-for-local-private-pilot", + "destinationProfile": "flowchain-base8453-pilot", + "lockboxAddress": "0xb9524481c154c195b4236846fe9d8fcffd6ce407", + "releaseAuthorityAccountId": "0x9f7090c47663019f3d7647a2d4b5895a529e9dbac911bb2fde2c359828cbb3b8", + "relayerAccountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "duplicatePolicy": "reject_same_source_chain_lockbox_tx_hash_log_index", + "productionReady": false + }, + "tokenDexBootstrapConfig": { + "nativeAssetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "localTokenLaunchAllowed": true, + "localTokenMintAllowed": true, + "dexBootstrapAllowed": true, + "defaultFeeBps": 30, + "productionReady": false + }, + "productionReady": false +} diff --git a/fixtures/production-l1/genesis.json b/fixtures/production-l1/genesis.json new file mode 100644 index 00000000..aa59741d --- /dev/null +++ b/fixtures/production-l1/genesis.json @@ -0,0 +1,283 @@ +{ + "schema": "flowchain.production_l1.genesis.v0", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "networkProfile": "flowchain-base8453-pilot", + "chainId": "7428453", + "networkName": "FlowChain Base 8453 Pilot Destination", + "genesisTimestamp": "2026-05-13T15:00:00.000Z", + "genesisUnixMs": "1778684400000", + "stateRootSeed": "0x75881068f60f90222d1556de109cb5cc97737a5c37239785cae0845227e45889", + "initialAccounts": [ + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "label": "alice-user", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": true, + "validator": false, + "bridgeOperator": false, + "deployer": true, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x1c114222c149606293a4dac2c2b8bd53d64517a2cb4804b13c560e6f0e3e09de", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "label": "bob-user", + "publicKey": "0x02bd133d4df63458ed49a0d7acde36d546b80c735f04d9a37eb428f1d92505b6be", + "address": "0xc8d2f10666e1216121f6449f0fc5726f63590aa7", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x8a6124844f49d9390c78a1dfd812c43c1963edf9be78b4154bc50fabf0e12f9a", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": true, + "validator": false, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0xd7456e440b78c346aa02b5fff11c181d45d40c691d836e571d464a595db02008", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "label": "validator-one", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x8aca75dd306f43261a9c58812a426a62ddf72e5a0823fe7ef6c4e0aff78b42d9", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": true, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x18e55b4da0218551072142ab2f110626c3f47f0c6f2a8fc5dbb5efb2fa3b34eb", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "label": "bridge-relayer", + "publicKey": "0x02f90ad32b15b53c0e4abd4f2f0de6db96dbe0adee1dab1736b0cf596070f7ef05", + "address": "0x633621fec8e01f8346130d81c26be8e33d1dcea9", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x346974a0aa8346f9759dde1d56bb8962a36eb013ca5e7f8c1b8e673fcfebd08a", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": true, + "deployer": false, + "relayer": true, + "emergencyOperator": false + }, + "metadataHash": "0x09d6e50d1093be697a68f09a0a8c99c1c8b072dd71ea832305d5153ae585a3ff", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0x9f7090c47663019f3d7647a2d4b5895a529e9dbac911bb2fde2c359828cbb3b8", + "label": "bridge-release-authority", + "publicKey": "0x02be094d43f51fb0e267c4ed5767bf26ef1370dc3c7756d1399d8e152c3a59b602", + "address": "0xdb523727f85b4f6d0ff5f62fc4d6c25a337af90d", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x0df088a7e0abfe419a042ed6caf58dba22d3a4f7e8ca066c3585b859ae870e4f", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": true, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x8f83b49dac9afecf998c810362df58ad3e05daa154a80f63cbf32acf3f435ed2", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0x458a01532bc3ec202c267dbd715ef239d54e3844cb37c57f504ab7e7f077ac8a", + "label": "emergency-operator", + "publicKey": "0x0202837e867307660b83033448b53dae9fbf18646041ac72fc3797272b59d65d79", + "address": "0x9386458c8c48d14bfebedc4fd00a528c15727b9e", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x6c2e83ab478452519394a62c494432d5e6643b6fd28c95af2fb38e55644ab734", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": true + }, + "metadataHash": "0xc0602b4f0b0d0dd87908d4808189afb4e60c7d7100865cabaf215fdf1311996f", + "status": "active", + "productionReady": false + } + ], + "initialBalances": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "1000000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "100000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "50000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "25000", + "balanceType": "native_local_unit", + "noValue": true + } + ], + "validatorSet": [ + { + "schema": "flowchain.production_l1.validator_authority.v0", + "authorityId": "0x4e7ad43d8db36ddde419d64fac4768a38167efd7b9e7abc503036f2ba22c92ba", + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "authorityType": "validator", + "votingPower": "1", + "finalityWeight": "1", + "metadataHash": "0x708f6074acaf685798e4085ceb5d4c3053dfa72bc1ccf0078feb3dbcd39c5e15", + "status": "active", + "productionReady": false + } + ], + "bridgePilotConfig": { + "enabled": true, + "sourceChainId": 8453, + "sourceNetwork": "base-mainnet-source-for-local-private-pilot", + "destinationProfile": "flowchain-base8453-pilot", + "lockboxAddress": "0xb9524481c154c195b4236846fe9d8fcffd6ce407", + "releaseAuthorityAccountId": "0x9f7090c47663019f3d7647a2d4b5895a529e9dbac911bb2fde2c359828cbb3b8", + "relayerAccountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "duplicatePolicy": "reject_same_source_chain_lockbox_tx_hash_log_index", + "productionReady": false + }, + "tokenDexBootstrapConfig": { + "nativeAssetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "localTokenLaunchAllowed": true, + "localTokenMintAllowed": true, + "dexBootstrapAllowed": true, + "defaultFeeBps": 30, + "productionReady": false + }, + "genesisHashInput": { + "schema": "flowchain.production_l1.genesis_hash_input.v0", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "networkProfile": "flowchain-base8453-pilot", + "chainId": "7428453", + "genesisTimestamp": "2026-05-13T15:00:00.000Z", + "stateRootSeed": "0x75881068f60f90222d1556de109cb5cc97737a5c37239785cae0845227e45889", + "initialAccountsRoot": "0x91cdc4fdae6be0aa293034b1c285a792a80f1b340c36d464eba19e3e6a3292dc", + "initialBalancesRoot": "0x67a2c9cebe2ce83217b296780d8d4f40962ca5480749e85df47ad63c9f8ee32b", + "validatorSetRoot": "0xdfd054306ca900b02b00162b6dd0466671db855427cd70485941591a1f28d95d", + "bridgePilotConfigHash": "0x81d33cd24951a5d29b7a00bc13bff16c88fbab383ff85aff2bb1c90aa34764d7", + "tokenDexBootstrapConfigHash": "0x3827a01a10fb7304018effc5db1ab9d0bb579cb7ad33f34926551c1218245801" + }, + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "productionReady": false +} diff --git a/fixtures/production-l1/negative-fixtures.json b/fixtures/production-l1/negative-fixtures.json new file mode 100644 index 00000000..38f28e6f --- /dev/null +++ b/fixtures/production-l1/negative-fixtures.json @@ -0,0 +1,3166 @@ +{ + "schema": "flowchain.production_l1.negative_fixture_set.v0", + "cases": [ + { + "caseId": "wrong_chain_transaction", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_WRONG_CHAIN_ID", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x18e97cdd0f9b8222ae270a034b8b26daf6d73c43c425d0593100b1d889563930", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "742999", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "1", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "user" + }, + "payloadType": "native_transfer", + "payloadHash": "0xb314ed92273ef9aed93bcc16e4989067a8d7dbd362373e4f15bdf2ad15d2b639", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "native_transfer", + "payloadId": "0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "1", + "details": { + "fromAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "toAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "10000", + "memoHash": "0x9284d3dc2a7d698ae915b37d7e2811f36db10682e82d56aa6bd7664d1220ef06" + }, + "preconditions": [ + "payload_type:native_transfer", + "account_nonce:1" + ], + "stateWrites": [ + "native_transfer:state_write:0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "-10000" + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "10000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "1", + "after": "2" + }, + "emittedEventTypes": [ + "NativeTransferRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "native_transfer" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x1a4bd0898df04f0e790a8256a7d254412d22e06326f8b2b46ba4039e0fbfe2ce", + "value": "0x1a4bd0898df04f0e790a8256a7d254412d22e06326f8b2b46ba4039e0fbfe2cedbb4b0f74b3d6f6b6c9cdea4aaaf227cc71941d46a3a2e4826f7ec07e15a7d2a" + } + } + }, + { + "caseId": "wrong_genesis_hash_transaction", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_WRONG_GENESIS_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x18e97cdd0f9b8222ae270a034b8b26daf6d73c43c425d0593100b1d889563930", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x2756ab5e2876284dda9fafbb4155bf331a5adcc22829f99e5c9fe2c17ba72420", + "nonce": "1", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "user" + }, + "payloadType": "native_transfer", + "payloadHash": "0xb314ed92273ef9aed93bcc16e4989067a8d7dbd362373e4f15bdf2ad15d2b639", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "native_transfer", + "payloadId": "0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "1", + "details": { + "fromAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "toAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "10000", + "memoHash": "0x9284d3dc2a7d698ae915b37d7e2811f36db10682e82d56aa6bd7664d1220ef06" + }, + "preconditions": [ + "payload_type:native_transfer", + "account_nonce:1" + ], + "stateWrites": [ + "native_transfer:state_write:0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "-10000" + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "10000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "1", + "after": "2" + }, + "emittedEventTypes": [ + "NativeTransferRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "native_transfer" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x1a4bd0898df04f0e790a8256a7d254412d22e06326f8b2b46ba4039e0fbfe2ce", + "value": "0x1a4bd0898df04f0e790a8256a7d254412d22e06326f8b2b46ba4039e0fbfe2cedbb4b0f74b3d6f6b6c9cdea4aaaf227cc71941d46a3a2e4826f7ec07e15a7d2a" + } + } + }, + { + "caseId": "stale_nonce_transaction", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_STALE_NONCE", + "expectedNonce": "5", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x18e97cdd0f9b8222ae270a034b8b26daf6d73c43c425d0593100b1d889563930", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "1", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "user" + }, + "payloadType": "native_transfer", + "payloadHash": "0xb314ed92273ef9aed93bcc16e4989067a8d7dbd362373e4f15bdf2ad15d2b639", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "native_transfer", + "payloadId": "0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "1", + "details": { + "fromAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "toAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "10000", + "memoHash": "0x9284d3dc2a7d698ae915b37d7e2811f36db10682e82d56aa6bd7664d1220ef06" + }, + "preconditions": [ + "payload_type:native_transfer", + "account_nonce:1" + ], + "stateWrites": [ + "native_transfer:state_write:0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "-10000" + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "10000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "1", + "after": "2" + }, + "emittedEventTypes": [ + "NativeTransferRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "native_transfer" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x1a4bd0898df04f0e790a8256a7d254412d22e06326f8b2b46ba4039e0fbfe2ce", + "value": "0x1a4bd0898df04f0e790a8256a7d254412d22e06326f8b2b46ba4039e0fbfe2cedbb4b0f74b3d6f6b6c9cdea4aaaf227cc71941d46a3a2e4826f7ec07e15a7d2a" + } + } + }, + { + "caseId": "duplicate_tx_transaction_set", + "fixtureKind": "transaction_set", + "expectedErrorCode": "FC_PROTO_DUPLICATE_TX", + "transactions": [ + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x18e97cdd0f9b8222ae270a034b8b26daf6d73c43c425d0593100b1d889563930", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "1", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "user" + }, + "payloadType": "native_transfer", + "payloadHash": "0xb314ed92273ef9aed93bcc16e4989067a8d7dbd362373e4f15bdf2ad15d2b639", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "native_transfer", + "payloadId": "0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "1", + "details": { + "fromAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "toAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "10000", + "memoHash": "0x9284d3dc2a7d698ae915b37d7e2811f36db10682e82d56aa6bd7664d1220ef06" + }, + "preconditions": [ + "payload_type:native_transfer", + "account_nonce:1" + ], + "stateWrites": [ + "native_transfer:state_write:0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "-10000" + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "10000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "1", + "after": "2" + }, + "emittedEventTypes": [ + "NativeTransferRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "native_transfer" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x1a4bd0898df04f0e790a8256a7d254412d22e06326f8b2b46ba4039e0fbfe2ce", + "value": "0x1a4bd0898df04f0e790a8256a7d254412d22e06326f8b2b46ba4039e0fbfe2cedbb4b0f74b3d6f6b6c9cdea4aaaf227cc71941d46a3a2e4826f7ec07e15a7d2a" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x18e97cdd0f9b8222ae270a034b8b26daf6d73c43c425d0593100b1d889563930", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "1", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "user" + }, + "payloadType": "native_transfer", + "payloadHash": "0xb314ed92273ef9aed93bcc16e4989067a8d7dbd362373e4f15bdf2ad15d2b639", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "native_transfer", + "payloadId": "0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "1", + "details": { + "fromAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "toAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "10000", + "memoHash": "0x9284d3dc2a7d698ae915b37d7e2811f36db10682e82d56aa6bd7664d1220ef06" + }, + "preconditions": [ + "payload_type:native_transfer", + "account_nonce:1" + ], + "stateWrites": [ + "native_transfer:state_write:0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "-10000" + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "10000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "1", + "after": "2" + }, + "emittedEventTypes": [ + "NativeTransferRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "native_transfer" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x1a4bd0898df04f0e790a8256a7d254412d22e06326f8b2b46ba4039e0fbfe2ce", + "value": "0x1a4bd0898df04f0e790a8256a7d254412d22e06326f8b2b46ba4039e0fbfe2cedbb4b0f74b3d6f6b6c9cdea4aaaf227cc71941d46a3a2e4826f7ec07e15a7d2a" + } + } + ] + }, + { + "caseId": "malformed_payload_hash_transaction", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x18e97cdd0f9b8222ae270a034b8b26daf6d73c43c425d0593100b1d889563930", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "1", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "user" + }, + "payloadType": "native_transfer", + "payloadHash": "0xb314ed92273ef9aed93bcc16e4989067a8d7dbd362373e4f15bdf2ad15d2b630", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "native_transfer", + "payloadId": "0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "1", + "details": { + "fromAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "toAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "10000", + "memoHash": "0x9284d3dc2a7d698ae915b37d7e2811f36db10682e82d56aa6bd7664d1220ef06" + }, + "preconditions": [ + "payload_type:native_transfer", + "account_nonce:1" + ], + "stateWrites": [ + "native_transfer:state_write:0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "-10000" + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "10000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "1", + "after": "2" + }, + "emittedEventTypes": [ + "NativeTransferRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "native_transfer" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x1a4bd0898df04f0e790a8256a7d254412d22e06326f8b2b46ba4039e0fbfe2ce", + "value": "0x1a4bd0898df04f0e790a8256a7d254412d22e06326f8b2b46ba4039e0fbfe2cedbb4b0f74b3d6f6b6c9cdea4aaaf227cc71941d46a3a2e4826f7ec07e15a7d2a" + } + } + }, + { + "caseId": "malformed_state_root_manifest", + "fixtureKind": "state_root_manifest", + "expectedErrorCode": "FC_PROTO_MALFORMED_STATE_ROOT", + "stateRootManifest": { + "schema": "flowchain.production_l1.state_root_manifest.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "stateRoot": "0x0000000000000000000000000000000000000000000000000000000000000000", + "stateRootAlgorithm": "keccak256(canonical-json-sorted-keys-v0)", + "components": [ + { + "component": "accounts", + "root": "0xf4914d4bb9ced10596986f52eefbe15e6b775c8b0855d51f85addd175b61e046", + "count": 6, + "ownerAgent": "wallet", + "inputs": [ + "accountId", + "publicKey", + "address", + "roleFlags", + "nonceDomain" + ] + }, + { + "component": "balances", + "root": "0x8a4fbb966efb61bd6e8f78fb7b8b510086b2650504654cc82a61d3ed97ac4d1c", + "count": 7, + "ownerAgent": "runtime", + "inputs": [ + "accountId", + "assetId", + "amount" + ] + }, + { + "component": "tokens", + "root": "0x542972588a71cf20b19e18681adc3bfbdcf7ca2fed4d4e60858e7679c2cbe238", + "count": 1, + "ownerAgent": "runtime", + "inputs": [ + "tokenId", + "symbol", + "decimals", + "totalSupply" + ] + }, + { + "component": "pools", + "root": "0x66666b609cd2486e0b688b8967452a54b49e684f587c107c8392d58b62ae3897", + "count": 1, + "ownerAgent": "runtime", + "inputs": [ + "poolId", + "baseAssetId", + "quoteAssetId", + "reserves" + ] + }, + { + "component": "lp_positions", + "root": "0xac45ae606ad56a72fd38b75aad52ed9b46365dfcca5b7679e3f7397d88ef05d3", + "count": 1, + "ownerAgent": "runtime", + "inputs": [ + "lpPositionId", + "poolId", + "ownerAccountId", + "lpUnits" + ] + }, + { + "component": "bridge_credits", + "root": "0x0f91f6d8d6a014b6b9e5c271e8a746256c4ef3b00c2194e0b858e405b7044b9a", + "count": 1, + "ownerAgent": "bridge", + "inputs": [ + "creditId", + "observationId", + "accountId", + "assetId", + "amount" + ] + }, + { + "component": "withdrawals", + "root": "0x179cf78b41131caefd13d557b73e73258fcb027e103007115deeb98e7755959f", + "count": 1, + "ownerAgent": "bridge", + "inputs": [ + "withdrawalIntentId", + "accountId", + "assetId", + "amount", + "releaseEvidenceId" + ] + }, + { + "component": "object_store", + "root": "0x96cca38dd6e86995a2b3551676a5c5777c3d270762cab8769771f840a9ac23fd", + "count": 9, + "ownerAgent": "runtime", + "inputs": [ + "objectType", + "objectId", + "objectHash", + "status" + ] + }, + { + "component": "finality", + "root": "0xbc714da6fb6a0957172d578e52e611e35c2f5c7a5433435c31736e6da2abf6f6", + "count": 1, + "ownerAgent": "consensus", + "inputs": [ + "height", + "status", + "certificateId" + ] + }, + { + "component": "validator_state", + "root": "0x6ae2131489fb1d27c5a6786fe058ad7a4d70edc598c0d766028fc1f4d1532290", + "count": 1, + "ownerAgent": "consensus", + "inputs": [ + "authorityId", + "accountId", + "votingPower", + "status" + ] + } + ], + "stateComponents": { + "accounts": [ + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "label": "alice-user", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": true, + "validator": false, + "bridgeOperator": false, + "deployer": true, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x1c114222c149606293a4dac2c2b8bd53d64517a2cb4804b13c560e6f0e3e09de", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "label": "bob-user", + "publicKey": "0x02bd133d4df63458ed49a0d7acde36d546b80c735f04d9a37eb428f1d92505b6be", + "address": "0xc8d2f10666e1216121f6449f0fc5726f63590aa7", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x8a6124844f49d9390c78a1dfd812c43c1963edf9be78b4154bc50fabf0e12f9a", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": true, + "validator": false, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0xd7456e440b78c346aa02b5fff11c181d45d40c691d836e571d464a595db02008", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "label": "validator-one", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x8aca75dd306f43261a9c58812a426a62ddf72e5a0823fe7ef6c4e0aff78b42d9", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": true, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x18e55b4da0218551072142ab2f110626c3f47f0c6f2a8fc5dbb5efb2fa3b34eb", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "label": "bridge-relayer", + "publicKey": "0x02f90ad32b15b53c0e4abd4f2f0de6db96dbe0adee1dab1736b0cf596070f7ef05", + "address": "0x633621fec8e01f8346130d81c26be8e33d1dcea9", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x346974a0aa8346f9759dde1d56bb8962a36eb013ca5e7f8c1b8e673fcfebd08a", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": true, + "deployer": false, + "relayer": true, + "emergencyOperator": false + }, + "metadataHash": "0x09d6e50d1093be697a68f09a0a8c99c1c8b072dd71ea832305d5153ae585a3ff", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0x9f7090c47663019f3d7647a2d4b5895a529e9dbac911bb2fde2c359828cbb3b8", + "label": "bridge-release-authority", + "publicKey": "0x02be094d43f51fb0e267c4ed5767bf26ef1370dc3c7756d1399d8e152c3a59b602", + "address": "0xdb523727f85b4f6d0ff5f62fc4d6c25a337af90d", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x0df088a7e0abfe419a042ed6caf58dba22d3a4f7e8ca066c3585b859ae870e4f", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": true, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x8f83b49dac9afecf998c810362df58ad3e05daa154a80f63cbf32acf3f435ed2", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0x458a01532bc3ec202c267dbd715ef239d54e3844cb37c57f504ab7e7f077ac8a", + "label": "emergency-operator", + "publicKey": "0x0202837e867307660b83033448b53dae9fbf18646041ac72fc3797272b59d65d79", + "address": "0x9386458c8c48d14bfebedc4fd00a528c15727b9e", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x6c2e83ab478452519394a62c494432d5e6643b6fd28c95af2fb38e55644ab734", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": true + }, + "metadataHash": "0xc0602b4f0b0d0dd87908d4808189afb4e60c7d7100865cabaf215fdf1311996f", + "status": "active", + "productionReady": false + } + ], + "balances": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "1000000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "100000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "50000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "25000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "2640000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "amount": "995050000", + "balanceType": "test_token", + "noValue": true + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "amount": "349000", + "balanceType": "test_token", + "noValue": true + } + ], + "tokens": [ + { + "tokenId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "symbol": "FLOWT", + "name": "FlowChain Local Test Token", + "decimals": 6, + "totalSupply": "1000250000", + "noValue": true + } + ], + "pools": [ + { + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "baseAssetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "quoteAssetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "reserveBase": "99000", + "reserveQuote": "4951000", + "feeBps": 30, + "noValue": true + } + ], + "lp_positions": [ + { + "lpPositionId": "0x027c83ae59eefcbea8ecb604e3a527e4392c82376866e2f1e6804bae5a1dbd7d", + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "ownerAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "lpUnits": "99900", + "noValue": true + } + ], + "bridge_credits": [ + { + "creditId": "0xd52d44dc757c0ecd7853bd269902848a3dd04af44db8dc704b347da47ed1b238", + "observationId": "0x070736a82e7dad444266af15ec8b521beba7c08502be2aeecb32c0f7f41b68d3", + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "2500000", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024" + } + ], + "withdrawals": [ + { + "withdrawalIntentId": "0xa3bd91f938d573c2e58bb34f4842a3f9acb85df7d2b4086a5949a65b95c55ee6", + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "100000", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "releaseEvidenceId": "0x4b632f40672ceb7ab195def56d8bc86141f1878ec31ffc742ec3e5b5d0def15d" + } + ], + "object_store": [ + { + "objectType": "AgentAccount", + "objectId": "0x79587bf5b81d6b566fe12453bc30803a773997e1f85371b4ba399d761758004d", + "objectHash": "0x24ad98a6c242b0b361aa0c48f6331202eb55002dd43e0db3bcbab52b30ac8018", + "status": "active" + }, + { + "objectType": "ModelPassport", + "objectId": "0xa73adb911f58e33dcd820471675d7a3d2b242be0574e217b144f4873135a4085", + "objectHash": "0xd5de49d30e0ff04ff2de2141d119bbfb46f3b741ce529f0594936a1cfba296d3", + "status": "active" + }, + { + "objectType": "WorkReceipt", + "objectId": "0xa96483b49a3d6005d748a512e00ab0bf1feb77d2bad4dec4f7842310bfe401f7", + "objectHash": "0xeb0475e34e1b2818d882210c44d3a3d8c6f30b1e551b827c48d9b0619ad238d9", + "status": "active" + }, + { + "objectType": "ArtifactAvailabilityProof", + "objectId": "0x7458f4ac71bc9008bc012e2a8cec5b529772b58f6fc86ab44bcd339a7070e069", + "objectHash": "0x67aed44d292f94b1bd141ec1f355955f96283783e08152a7237e2d37810fd49a", + "status": "active" + }, + { + "objectType": "VerifierModule", + "objectId": "0x5194f738c5e5d252e0ae82f28883d732b762b9944f20181b854841875c45c54b", + "objectHash": "0xfef87b4fe768283b6e0e741bde3c43e635ce3f89f769285e356027c813877895", + "status": "active" + }, + { + "objectType": "VerifierReport", + "objectId": "0x5d0ad9b32f26abc0cd7be3b8869c51aefbc3cdd5d3f01735a8820fb7ff0910e1", + "objectHash": "0xa8d1865f5910ec6a9b615c48d7768e6a6ad3d3647495ffd5e5f6e9a8870a9489", + "status": "active" + }, + { + "objectType": "MemoryCell", + "objectId": "0xbcd05714eabfa7babbe32888041eaca0f715073f92e8c8cbd1f81922eeab5b16", + "objectHash": "0x86eeee0b28fa6533fd4220fb4953e78c29e1d545d3cffea2d985053157923619", + "status": "active" + }, + { + "objectType": "Challenge", + "objectId": "0x927bb5cb7a259e9ef7a3ca9ed94f4f536928f87ecec25ef8e04eb3dd16884ad9", + "objectHash": "0xa73c3472a504f9dd8d98b3851f88a1fbaf9914524c0a7879172268bcc3225acf", + "status": "resolved" + }, + { + "objectType": "FinalityReceipt", + "objectId": "0xd0017f1d9ab4a827a296feed92d8427582bb2eeac7bc1d006ecb843d2a2022fa", + "objectHash": "0xe8331685281b5709bcff0d968bff6a796d9e78057156c9ad4662bcc6bb8ef1ac", + "status": "finalized" + } + ], + "finality": [ + { + "height": "1", + "status": "accepted", + "certificateId": "0x4b525f224cd71929a613f6235ffb03a641916851c2fc90843feec3bbad90a3b3" + } + ], + "validator_state": [ + { + "schema": "flowchain.production_l1.validator_authority.v0", + "authorityId": "0x4e7ad43d8db36ddde419d64fac4768a38167efd7b9e7abc503036f2ba22c92ba", + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "authorityType": "validator", + "votingPower": "1", + "finalityWeight": "1", + "metadataHash": "0x708f6074acaf685798e4085ceb5d4c3053dfa72bc1ccf0078feb3dbcd39c5e15", + "status": "active", + "productionReady": false + } + ] + }, + "deterministicReplay": { + "sameLogicalStateRoot": "0x716ccaf7e8946591973d4614d41ba39c047ef7e89bd67d62f1aa6d90b99133ef", + "replayCommand": "npm run validate:production-l1-fixtures" + } + } + }, + { + "caseId": "invalid_bridge_source_chain", + "fixtureKind": "bridge_evidence", + "expectedErrorCode": "FC_PROTO_INVALID_BRIDGE_SOURCE_CHAIN", + "bridgeEvidence": { + "schema": "flowchain.production_l1.bridge_evidence.v0", + "evidenceId": "0x013b5052df9be23c0816f77258d50bddfad0d73eb62af5fdd96a0b45d16fee21", + "evidenceType": "deposit_observation", + "sourceChainId": 1, + "sourceNetwork": "base-mainnet-source-for-local-private-pilot", + "lockboxAddress": "0xb9524481c154c195b4236846fe9d8fcffd6ce407", + "sourceTxHash": "0x4487b7f7bffffe4903117c8190d64e58c40ecf96c43a4d30e0483a2b9ece0ee0", + "sourceBlockNumber": "45960000", + "sourceLogIndex": 7, + "tokenAddress": "0xe257180eba8c3194bd24ead035549e8beffbab16", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "depositorAddress": "0x6c6f65541dd5c673e0e3c23ba09f5e8735eaffcc", + "localRecipientAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "2500000", + "observedByRelayerAccountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "finalityStatus": "source_finalized", + "observationId": "0x070736a82e7dad444266af15ec8b521beba7c08502be2aeecb32c0f7f41b68d3", + "creditId": "0xd52d44dc757c0ecd7853bd269902848a3dd04af44db8dc704b347da47ed1b238", + "release": null, + "duplicateKey": "0x55575733fb056aaedf2d14985fc891da67a4093c6bc7d6719e4fcb83023fb467", + "evidenceHash": "0x7b96b892961fdd0534f8966c5b01bc85a5fb68ec6e88167c0d4397563197505b", + "localOnly": true, + "productionReady": false + } + }, + { + "caseId": "duplicate_bridge_event", + "fixtureKind": "bridge_evidence_set", + "expectedErrorCode": "FC_PROTO_DUPLICATE_BRIDGE_EVENT", + "bridgeEvidence": [ + { + "schema": "flowchain.production_l1.bridge_evidence.v0", + "evidenceId": "0x013b5052df9be23c0816f77258d50bddfad0d73eb62af5fdd96a0b45d16fee21", + "evidenceType": "deposit_observation", + "sourceChainId": 8453, + "sourceNetwork": "base-mainnet-source-for-local-private-pilot", + "lockboxAddress": "0xb9524481c154c195b4236846fe9d8fcffd6ce407", + "sourceTxHash": "0x4487b7f7bffffe4903117c8190d64e58c40ecf96c43a4d30e0483a2b9ece0ee0", + "sourceBlockNumber": "45960000", + "sourceLogIndex": 7, + "tokenAddress": "0xe257180eba8c3194bd24ead035549e8beffbab16", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "depositorAddress": "0x6c6f65541dd5c673e0e3c23ba09f5e8735eaffcc", + "localRecipientAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "2500000", + "observedByRelayerAccountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "finalityStatus": "source_finalized", + "observationId": "0x070736a82e7dad444266af15ec8b521beba7c08502be2aeecb32c0f7f41b68d3", + "creditId": "0xd52d44dc757c0ecd7853bd269902848a3dd04af44db8dc704b347da47ed1b238", + "release": null, + "duplicateKey": "0x55575733fb056aaedf2d14985fc891da67a4093c6bc7d6719e4fcb83023fb467", + "evidenceHash": "0x7b96b892961fdd0534f8966c5b01bc85a5fb68ec6e88167c0d4397563197505b", + "localOnly": true, + "productionReady": false + }, + { + "schema": "flowchain.production_l1.bridge_evidence.v0", + "evidenceId": "0x34ff08e292a1eeda30597d6de62364099164907b10665d961437c93e7ed7d582", + "evidenceType": "deposit_observation", + "sourceChainId": 8453, + "sourceNetwork": "base-mainnet-source-for-local-private-pilot", + "lockboxAddress": "0xb9524481c154c195b4236846fe9d8fcffd6ce407", + "sourceTxHash": "0x4487b7f7bffffe4903117c8190d64e58c40ecf96c43a4d30e0483a2b9ece0ee0", + "sourceBlockNumber": "45960000", + "sourceLogIndex": 7, + "tokenAddress": "0xe257180eba8c3194bd24ead035549e8beffbab16", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "depositorAddress": "0x6c6f65541dd5c673e0e3c23ba09f5e8735eaffcc", + "localRecipientAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "2500000", + "observedByRelayerAccountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "finalityStatus": "source_finalized", + "observationId": "0x070736a82e7dad444266af15ec8b521beba7c08502be2aeecb32c0f7f41b68d3", + "creditId": "0xd52d44dc757c0ecd7853bd269902848a3dd04af44db8dc704b347da47ed1b238", + "release": null, + "duplicateKey": "0x55575733fb056aaedf2d14985fc891da67a4093c6bc7d6719e4fcb83023fb467", + "evidenceHash": "0x7b96b892961fdd0534f8966c5b01bc85a5fb68ec6e88167c0d4397563197505b", + "localOnly": true, + "productionReady": false + } + ] + }, + { + "caseId": "invalid_native_transfer_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x18e97cdd0f9b8222ae270a034b8b26daf6d73c43c425d0593100b1d889563930", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "1", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "user" + }, + "payloadType": "native_transfer", + "payloadHash": "0xb314ed92273ef9aed93bcc16e4989067a8d7dbd362373e4f15bdf2ad15d2b630", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "native_transfer", + "payloadId": "0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "1", + "details": { + "fromAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "toAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "10000", + "memoHash": "0x9284d3dc2a7d698ae915b37d7e2811f36db10682e82d56aa6bd7664d1220ef06" + }, + "preconditions": [ + "payload_type:native_transfer", + "account_nonce:1" + ], + "stateWrites": [ + "native_transfer:state_write:0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "-10000" + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "10000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "1", + "after": "2" + }, + "emittedEventTypes": [ + "NativeTransferRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "native_transfer" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x1a4bd0898df04f0e790a8256a7d254412d22e06326f8b2b46ba4039e0fbfe2ce", + "value": "0x1a4bd0898df04f0e790a8256a7d254412d22e06326f8b2b46ba4039e0fbfe2cedbb4b0f74b3d6f6b6c9cdea4aaaf227cc71941d46a3a2e4826f7ec07e15a7d2a" + } + } + }, + { + "caseId": "invalid_faucet_funding_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x74b37fa211b380912250d589cbd52a7f08ef9e34ec68bcf034ef38d07697465a", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "2", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "faucet_funding", + "payloadHash": "0x678de8bb69e2e7585fbbd059f014e9f3f7af59b970e55a7a1817709bf3a74c40", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "faucet_funding", + "payloadId": "0xa4e0c6b866e9ee38c2b31dd6a928388a7389c8058648609c80d490ce77f40073", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "2", + "details": { + "faucetId": "0x268c55ac11ea534f33a96f4738b075648a9603e41cc7054ee03a8eb7f0e55c34", + "toAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "5000", + "reasonHash": "0x8934e316445b4e6bcee5226b067a5eddc19fa23a869e272feb6be378dae8ed48", + "localOnly": true + }, + "preconditions": [ + "payload_type:faucet_funding", + "account_nonce:2" + ], + "stateWrites": [ + "faucet_funding:state_write:0xa4e0c6b866e9ee38c2b31dd6a928388a7389c8058648609c80d490ce77f40073" + ], + "balanceChanges": [ + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "5000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "2", + "after": "3" + }, + "emittedEventTypes": [ + "FaucetFundingRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "faucet_funding" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x5e1b2659f86f1f99703c8b54d0721b51c41eec36ba6ae9d89f1ca56df045092d", + "value": "0x5e1b2659f86f1f99703c8b54d0721b51c41eec36ba6ae9d89f1ca56df045092d387e84a80721b4291186c3a02d8a0511410504f1a702e1930a266c62333635e3" + } + } + }, + { + "caseId": "invalid_bridge_credit_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x36f329a0663b99955a5778cefa40aed22fbafedea1230e559253aef782bbe42a", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "1", + "nonceDomain": "0x346974a0aa8346f9759dde1d56bb8962a36eb013ca5e7f8c1b8e673fcfebd08a", + "signer": { + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "publicKey": "0x02f90ad32b15b53c0e4abd4f2f0de6db96dbe0adee1dab1736b0cf596070f7ef05", + "address": "0x633621fec8e01f8346130d81c26be8e33d1dcea9", + "role": "relayer" + }, + "payloadType": "bridge_credit", + "payloadHash": "0x5945c72f2b23e8f5f301a7610a066f516c26f2d64245f94bb59821e013861970", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "bridge_credit", + "payloadId": "0x7a8668dcd2bffa80eb280031bd7757ecbaf8cd880d766d04e9bfc1a5bd8c4d66", + "actorAccountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "accountNonce": "1", + "details": { + "bridgeEvidenceId": "0x013b5052df9be23c0816f77258d50bddfad0d73eb62af5fdd96a0b45d16fee21", + "observationId": "0x070736a82e7dad444266af15ec8b521beba7c08502be2aeecb32c0f7f41b68d3", + "creditId": "0xd52d44dc757c0ecd7853bd269902848a3dd04af44db8dc704b347da47ed1b238", + "sourceChainId": 8453, + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "2500000", + "recipientAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a" + }, + "preconditions": [ + "payload_type:bridge_credit", + "account_nonce:1" + ], + "stateWrites": [ + "bridge_credit:state_write:0x7a8668dcd2bffa80eb280031bd7757ecbaf8cd880d766d04e9bfc1a5bd8c4d66" + ], + "balanceChanges": [ + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "2500000" + } + ], + "nonceChange": { + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "before": "1", + "after": "2" + }, + "emittedEventTypes": [ + "BridgeCreditApplied" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "bridge_credit" + }, + { + "key": "actorAccountId", + "value": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x28f6ace9b0b309f17bf28fa90976e64550d93889f9dd9b659caa6f46c46b005f", + "value": "0x28f6ace9b0b309f17bf28fa90976e64550d93889f9dd9b659caa6f46c46b005fb6f08e745ba67912ac7bb807db36c6a7dd4aee51335200624ea267da77652b62" + } + } + }, + { + "caseId": "invalid_token_launch_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x6ca72702d734aea0d6b969b8aaa3328d0862f4b21ea0a8262ccc7839468c8c65", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "3", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "token_launch", + "payloadHash": "0x8074dc0dbd44f3431dcca27687de12bc68ef9189d86286b630f94c73931b4e00", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "token_launch", + "payloadId": "0x58b3ad1cc7dea9851e1f6813760e021681c975a6f8ebfe29a8c5116c43ac813d", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "3", + "details": { + "tokenLaunchId": "0xb941d23378dd9e79573960c3fe836cced8c07f9a5d261abee1626ae66b38e15b", + "issuerAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "tokenId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "symbol": "FLOWT", + "name": "FlowChain Local Test Token", + "decimals": 6, + "metadataHash": "0xfd3e99204deb1fb81c51aac93bf9468ba42b0a45d2c8a8201080db1627056dd5", + "initialSupply": "1000000000", + "recipientAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + }, + "preconditions": [ + "payload_type:token_launch", + "account_nonce:3" + ], + "stateWrites": [ + "token_launch:state_write:0x58b3ad1cc7dea9851e1f6813760e021681c975a6f8ebfe29a8c5116c43ac813d" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "1000000000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "3", + "after": "4" + }, + "emittedEventTypes": [ + "TokenLaunched" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "token_launch" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x674f36261cbf81240f959a8bf5dc9808862b64194e0e0bd42d547abd14ea8dde", + "value": "0x674f36261cbf81240f959a8bf5dc9808862b64194e0e0bd42d547abd14ea8dde22ceec74319ce2a380f816948f99db9385e907385eaae404b226673eef5a3650" + } + } + }, + { + "caseId": "invalid_token_mint_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xc8cddac632390a6b736a7433c8fbc726028eb153517d5030ff17c94f5463a03a", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "4", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "token_mint", + "payloadHash": "0xbfdef58cb485fa1d5e6eb16a166e0cab34350c5b0e9383509015b5929069b310", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "token_mint", + "payloadId": "0x9a084a321aab722fad0ed7f1e7bba27e4d9c72afe9d74b876a727ae2646cad9f", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "4", + "details": { + "mintId": "0x3e118238b7a7677dadb07a2df738838ae438f2fb1edc56235ec7267f85c8cc84", + "tokenId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "toAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "250000", + "reasonHash": "0xa1f900fe4d833267daf29d488dd8c4f106718feca017762e54306d640e903d75", + "localOrTestMode": true + }, + "preconditions": [ + "payload_type:token_mint", + "account_nonce:4" + ], + "stateWrites": [ + "token_mint:state_write:0x9a084a321aab722fad0ed7f1e7bba27e4d9c72afe9d74b876a727ae2646cad9f" + ], + "balanceChanges": [ + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "250000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "4", + "after": "5" + }, + "emittedEventTypes": [ + "TokenMinted" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "token_mint" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x13fe583db212ec1dcfbe6240ea7489ea9288688f423f78069413534f725cdde3", + "value": "0x13fe583db212ec1dcfbe6240ea7489ea9288688f423f78069413534f725cdde32211ac2917eb98093dd6f007b5c40de8e21e3d9b235a9f6b223088cb5a52a2a6" + } + } + }, + { + "caseId": "invalid_token_transfer_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x8a327e611d306b367d9794000a64395c96990d9d16b93d309e149fc56a8af9e7", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "5", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "user" + }, + "payloadType": "token_transfer", + "payloadHash": "0x8aa5892acd6e69297bb30beccfcb9b97e224562cbbc6bcab6b45d11f820f2e20", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "token_transfer", + "payloadId": "0xf297b8f97f86900fca41aa854aee01e0d8413ae99488e217ef75eaa5da1fd98f", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "5", + "details": { + "tokenTransferId": "0x13d8066d6f4711e834f123b102087394e11495c646dc1aec74112a3bd72c562b", + "tokenId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "fromAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "toAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "50000", + "memoHash": "0xc8a014c9eef7461736465de0ed544a310bc26d386b932dca8e29ae2e34adffac" + }, + "preconditions": [ + "payload_type:token_transfer", + "account_nonce:5" + ], + "stateWrites": [ + "token_transfer:state_write:0xf297b8f97f86900fca41aa854aee01e0d8413ae99488e217ef75eaa5da1fd98f" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "-50000" + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "50000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "5", + "after": "6" + }, + "emittedEventTypes": [ + "TokenTransferred" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "token_transfer" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x74294b063606729075950a0686094e3a7f5d8c6872ac4e62f5914cd75f8df417", + "value": "0x74294b063606729075950a0686094e3a7f5d8c6872ac4e62f5914cd75f8df4178028417a9d1a4519b66a088b401b8c2807dc44bcabbd04a7b95a6fd457de3696" + } + } + }, + { + "caseId": "invalid_pool_create_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x459fd019e44fba8961ed3cab569eed08b906dfed8580c444002defe70b4147b4", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "6", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "pool_create", + "payloadHash": "0x542609986958c9c723b621092c8ba0456d6a5da33bf94cf33457050acdb5bc70", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "pool_create", + "payloadId": "0x099a7f62c1af5c718644e22a2a96486c4bdad7852c52d4373ed69c9a7aca3ae9", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "6", + "details": { + "poolCreateId": "0x7d29c3a9eca221bddf7903d6a45f8bca0b6fd1a001741b50d003504ad67c5c53", + "creatorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "baseAssetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "quoteAssetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "feeBps": 30, + "tickSpacing": 1, + "metadataHash": "0xdf927b67c67e3761744ac6ae5ef35375d42eda3fc857a6ec1567b24b8f29845e" + }, + "preconditions": [ + "payload_type:pool_create", + "account_nonce:6" + ], + "stateWrites": [ + "pool_create:state_write:0x099a7f62c1af5c718644e22a2a96486c4bdad7852c52d4373ed69c9a7aca3ae9" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "6", + "after": "7" + }, + "emittedEventTypes": [ + "PoolCreated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "pool_create" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x1a059c36d2c22e3e4cf0ff31990cd4b60bfce93c38fd3bc68b23d09d396e3f09", + "value": "0x1a059c36d2c22e3e4cf0ff31990cd4b60bfce93c38fd3bc68b23d09d396e3f090dbea9d7dd5742e612e330ae16b848b093d21404e8a68f67580360b024a12c88" + } + } + }, + { + "caseId": "invalid_add_liquidity_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xd4d4e811d8f4e18334823af5c81ff769eb27ff6e4d88d9b2e197fd9378c54535", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "7", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "user" + }, + "payloadType": "add_liquidity", + "payloadHash": "0x77d4968318412db65dcc0995cc2130af1d741d65c464a500b0982f91c2cb4dd0", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "add_liquidity", + "payloadId": "0x222a60a6e50c7a8d205fd472bb75c216485f56b33f824138a2b83cedd2ab6f7b", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "7", + "details": { + "liquidityId": "0x9ea34509afbe23343522af862dad843cf73df7532606eeca817edc5e0c7c2272", + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "providerAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "baseAmount": "100000", + "quoteAmount": "5000000", + "minLpUnits": "1" + }, + "preconditions": [ + "payload_type:add_liquidity", + "account_nonce:7" + ], + "stateWrites": [ + "add_liquidity:state_write:0x222a60a6e50c7a8d205fd472bb75c216485f56b33f824138a2b83cedd2ab6f7b" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "-100000" + }, + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "-5000000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "7", + "after": "8" + }, + "emittedEventTypes": [ + "LiquidityAdded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "add_liquidity" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x3eb1a65a616eb8031c4889a20ed244423a404b95c636b73ee4cb284f5c6936bb", + "value": "0x3eb1a65a616eb8031c4889a20ed244423a404b95c636b73ee4cb284f5c6936bbe4ad5abcb31f55676be981456e1e1aeb84327afe3769b291fc874e8b2eea4884" + } + } + }, + { + "caseId": "invalid_remove_liquidity_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xacef8f2d596a89b4f375e77d99a786fe50995f54558e0010f0d186a118303c03", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "8", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "user" + }, + "payloadType": "remove_liquidity", + "payloadHash": "0x589737d24bc2636d0b10aaf2790e7e3932810f05a311ac2c4644213f405715d0", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "remove_liquidity", + "payloadId": "0xb32b8118708f2adda42c92c555efab29e973efd05fc0a694ebd0cdd78e2caca5", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "8", + "details": { + "liquidityId": "0xe4a3ca64db987b9fac69d0df9069eecc4ad31da806b912b1606ef0efce172dfc", + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "providerAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "lpUnits": "100", + "minBaseAmount": "1", + "minQuoteAmount": "1" + }, + "preconditions": [ + "payload_type:remove_liquidity", + "account_nonce:8" + ], + "stateWrites": [ + "remove_liquidity:state_write:0xb32b8118708f2adda42c92c555efab29e973efd05fc0a694ebd0cdd78e2caca5" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "2000" + }, + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "100000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "8", + "after": "9" + }, + "emittedEventTypes": [ + "LiquidityRemoved" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "remove_liquidity" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x1aaaaa0c3174718b5df8bc7899384de7a450c01286a6bd98af72959a42e023e5", + "value": "0x1aaaaa0c3174718b5df8bc7899384de7a450c01286a6bd98af72959a42e023e5fb7590a0f3441a51788d3952be34a3ae28eb0dff986d95167f815e8761326405" + } + } + }, + { + "caseId": "invalid_swap_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xc651a70810a35b170cbc851580fbc39ed1d1eed3f6ba5a7aac9837640c2e6116", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "1", + "nonceDomain": "0x8a6124844f49d9390c78a1dfd812c43c1963edf9be78b4154bc50fabf0e12f9a", + "signer": { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "publicKey": "0x02bd133d4df63458ed49a0d7acde36d546b80c735f04d9a37eb428f1d92505b6be", + "address": "0xc8d2f10666e1216121f6449f0fc5726f63590aa7", + "role": "user" + }, + "payloadType": "swap", + "payloadHash": "0xcb6bc1a569412a08d52ef59b17463ddb63fb82f6396f3fff3cdf813c2707d4a0", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "swap", + "payloadId": "0x15fa2e1e2c305a0d29bd6c674a1fec00b18346d9d60e31f7a7677bd18cb3aac9", + "actorAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "accountNonce": "1", + "details": { + "swapId": "0x671be20c2cae4a8f2b5cf9ed4de1dbe64528fdb50c5f6c052f56883f8be994d7", + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "traderAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetInId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "assetOutId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "amountIn": "1000", + "minAmountOut": "40000", + "routeHash": "0x71a523049c4579ce011a78a263713e5a2d32ae7150158aa8015fc9cb8e4871f4" + }, + "preconditions": [ + "payload_type:swap", + "account_nonce:1" + ], + "stateWrites": [ + "swap:state_write:0x15fa2e1e2c305a0d29bd6c674a1fec00b18346d9d60e31f7a7677bd18cb3aac9" + ], + "balanceChanges": [ + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "-1000" + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "49000" + } + ], + "nonceChange": { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "before": "1", + "after": "2" + }, + "emittedEventTypes": [ + "SwapExecuted" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "swap" + }, + { + "key": "actorAccountId", + "value": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x201504789fb3e32c01d8496c915ab1e448d048f49a20d9d9c0969e8b0ebe14bc", + "value": "0x201504789fb3e32c01d8496c915ab1e448d048f49a20d9d9c0969e8b0ebe14bc7d9349c8cdb4657fa66eb3aa7db3b8284401547b238bc98e92ff5920cc763b7f" + } + } + }, + { + "caseId": "invalid_withdrawal_intent_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xb0db1c922d7bbfa58759dfde491317d41c9aee638b442df4dfe1985b73e34c48", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "2", + "nonceDomain": "0x8a6124844f49d9390c78a1dfd812c43c1963edf9be78b4154bc50fabf0e12f9a", + "signer": { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "publicKey": "0x02bd133d4df63458ed49a0d7acde36d546b80c735f04d9a37eb428f1d92505b6be", + "address": "0xc8d2f10666e1216121f6449f0fc5726f63590aa7", + "role": "user" + }, + "payloadType": "withdrawal_intent", + "payloadHash": "0xe638c78e1bc9a52ac1243b1da3f8d5f22707ad968d50d7a3fef03041bbf251c0", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "withdrawal_intent", + "payloadId": "0x8c8be8335d98fc6337cbef75b34ef228d11a4cacabf0b8da0d93282785d4efcb", + "actorAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "accountNonce": "2", + "details": { + "withdrawalIntentId": "0xa3bd91f938d573c2e58bb34f4842a3f9acb85df7d2b4086a5949a65b95c55ee6", + "sourceAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "destinationChainId": 8453, + "destinationAddress": "0xb8eed8a8ec1ba09a1b46e79042399df3984f36df", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "100000", + "releasePolicyHash": "0x5a1af4db0125b5c9be8ae5c2ca236108de242dc1e259d6f89e2e931c80e601c1" + }, + "preconditions": [ + "payload_type:withdrawal_intent", + "account_nonce:2" + ], + "stateWrites": [ + "withdrawal_intent:state_write:0x8c8be8335d98fc6337cbef75b34ef228d11a4cacabf0b8da0d93282785d4efcb" + ], + "balanceChanges": [ + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "-100000" + } + ], + "nonceChange": { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "before": "2", + "after": "3" + }, + "emittedEventTypes": [ + "WithdrawalIntentRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "withdrawal_intent" + }, + { + "key": "actorAccountId", + "value": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x957fb4572398a908af8493a77464a05e1271c2806f1e33c6a3ead9357941d32f", + "value": "0x957fb4572398a908af8493a77464a05e1271c2806f1e33c6a3ead9357941d32f47918c7a7829133695cd334ba1efdcf68644b5ff423fcfd80526622ef40fb1d1" + } + } + }, + { + "caseId": "invalid_validator_authority_config_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xd63772799f7ca1d3eddfcf9ba2ef9bf77444e46d8222d5721e5c38f4f86656c3", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "1", + "nonceDomain": "0x8aca75dd306f43261a9c58812a426a62ddf72e5a0823fe7ef6c4e0aff78b42d9", + "signer": { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "role": "validator" + }, + "payloadType": "validator_authority_config", + "payloadHash": "0xa9f7a299f1a986b88b7a73990c45a3d2e4bc607ffade4a73e24ac85137887b21", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "validator_authority_config", + "payloadId": "0x7536fd5ee06a6afa22228e339c896fa95e3a17c0b501c3556d8d88f07be5f908", + "actorAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "accountNonce": "1", + "details": { + "authorityConfigId": "0x1ef8f8fa3707b0f16f98ed88c79e0c7d5465b55a6c14b0236b1949fa5ffc1fb8", + "authorityId": "0x4e7ad43d8db36ddde419d64fac4768a38167efd7b9e7abc503036f2ba22c92ba", + "validatorAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "action": "update", + "authorityType": "validator", + "votingPower": "1", + "metadataHash": "0x2bf51245a695e6afc8cad010f197129cba1bca7f1ff689caccaaea01f77935c8" + }, + "preconditions": [ + "payload_type:validator_authority_config", + "account_nonce:1" + ], + "stateWrites": [ + "validator_authority_config:state_write:0x7536fd5ee06a6afa22228e339c896fa95e3a17c0b501c3556d8d88f07be5f908" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "before": "1", + "after": "2" + }, + "emittedEventTypes": [ + "ValidatorAuthorityConfigured" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "validator_authority_config" + }, + { + "key": "actorAccountId", + "value": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x30db85e4b20d362f057d21535de016ec43d9eb813821e072e4afbea9cc78e409", + "value": "0x30db85e4b20d362f057d21535de016ec43d9eb813821e072e4afbea9cc78e409b7bf7ec3e75551273d274db995655d1fbdfa863414a060d41a57040bf8234a7d" + } + } + }, + { + "caseId": "invalid_finality_vote_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x10f8e2a10f9e7eeb66b7958c59cca95443c84504deeee7b45b3cd695ccd74c8a", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "2", + "nonceDomain": "0x8aca75dd306f43261a9c58812a426a62ddf72e5a0823fe7ef6c4e0aff78b42d9", + "signer": { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "role": "validator" + }, + "payloadType": "finality_vote", + "payloadHash": "0x4488eab003da8fd001e2d3411f9830140e816d72a580d1f00138c90ffe28ab70", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "finality_vote", + "payloadId": "0x680c40512bd8a86c0610e4787d5a346ed11ce7d487f37e51b49d8f347cbf4901", + "actorAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "accountNonce": "2", + "details": { + "voteId": "0x5bf522270da05b7f92d03344e49c7b9f3d82d825d4303b2bed722375e822fdce", + "validatorAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "height": "1", + "blockHash": "0x3746b76bda4221999bf94bc0b1a144002dcb08769da1878ae6e690bfaf3205c1", + "stateRoot": "0x6fb8606dcd290285bf0fa89dc40bf6ee98a766e9858cb0b18a85dd288848c4ab", + "voteRound": "1" + }, + "preconditions": [ + "payload_type:finality_vote", + "account_nonce:2" + ], + "stateWrites": [ + "finality_vote:state_write:0x680c40512bd8a86c0610e4787d5a346ed11ce7d487f37e51b49d8f347cbf4901" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "before": "2", + "after": "3" + }, + "emittedEventTypes": [ + "FinalityVoteRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "finality_vote" + }, + { + "key": "actorAccountId", + "value": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0xf8147b67f890077cebf74db5185632bb08e8128c45ae5b89569d5b9dd87aafd9", + "value": "0xf8147b67f890077cebf74db5185632bb08e8128c45ae5b89569d5b9dd87aafd9f5885301664a67492d1c64816684914d11ae78e9871877eebb8c34734006018c" + } + } + }, + { + "caseId": "invalid_finality_certificate_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x2bf8ab2f47a541f7c2808c8bf9decec6a8f60d4d026c5ce1e43be10af156ee6c", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "3", + "nonceDomain": "0x8aca75dd306f43261a9c58812a426a62ddf72e5a0823fe7ef6c4e0aff78b42d9", + "signer": { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "role": "validator" + }, + "payloadType": "finality_certificate", + "payloadHash": "0x82e2a8a031b079adac6e41851df9cb44f05722eee933d7526765f4487e151ca0", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "finality_certificate", + "payloadId": "0x527697a531538b1617cec46d668a01a8d6b0d8210adb42b1506c0210b2df8a80", + "actorAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "accountNonce": "3", + "details": { + "certificateId": "0x4b525f224cd71929a613f6235ffb03a641916851c2fc90843feec3bbad90a3b3", + "height": "1", + "blockHash": "0x3746b76bda4221999bf94bc0b1a144002dcb08769da1878ae6e690bfaf3205c1", + "stateRoot": "0x6fb8606dcd290285bf0fa89dc40bf6ee98a766e9858cb0b18a85dd288848c4ab", + "signerSetRoot": "0x65217700c09f22aa4d3a0da9b5ee0955e2e7a196106ae6a93982d607b33d4ea3", + "voteIds": [ + "0x5bf522270da05b7f92d03344e49c7b9f3d82d825d4303b2bed722375e822fdce" + ], + "quorumNumerator": 1, + "quorumDenominator": 1 + }, + "preconditions": [ + "payload_type:finality_certificate", + "account_nonce:3" + ], + "stateWrites": [ + "finality_certificate:state_write:0x527697a531538b1617cec46d668a01a8d6b0d8210adb42b1506c0210b2df8a80" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "before": "3", + "after": "4" + }, + "emittedEventTypes": [ + "FinalityCertificateRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "finality_certificate" + }, + { + "key": "actorAccountId", + "value": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x33bf4f0d795235b556ca8e4ad33226cf6bd41f78acfdf4519b32c9a94d074637", + "value": "0x33bf4f0d795235b556ca8e4ad33226cf6bd41f78acfdf4519b32c9a94d074637a202d048be2c634cf410b35ee519b9c00c371d08950416c4d96e4ccc5a0c5bff" + } + } + }, + { + "caseId": "invalid_agent_account_update_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xd1a8d36d371779c09ecf2a627e27ceb85854fb3797d8a4b70ad7aa2fdc0baa83", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "9", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "agent_account_update", + "payloadHash": "0xac1359e1af6c3632d5d7a2ea0b78f75beead7733d2268bd4a645e740ce358da0", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "agent_account_update", + "payloadId": "0x00159178ecb25498ba211866e664bf321b41140d3283ffdf22adf5ff1afea75e", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "9", + "details": { + "lifecycleUpdateId": "0x6e36f280f28b502261bddc5928c67c7f7801575211f4109a4dfb0531a6257a5b", + "objectType": "AgentAccount", + "operation": "create", + "objectId": "0x79587bf5b81d6b566fe12453bc30803a773997e1f85371b4ba399d761758004d", + "objectHash": "0x24ad98a6c242b0b361aa0c48f6331202eb55002dd43e0db3bcbab52b30ac8018", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0xae4c481a9422d17fe8e2b45dfbc0ff9386850a6d5cfa9067c35d14857882143d", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:agent_account_update", + "account_nonce:9" + ], + "stateWrites": [ + "agent_account_update:state_write:0x00159178ecb25498ba211866e664bf321b41140d3283ffdf22adf5ff1afea75e" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "9", + "after": "10" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "agent_account_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x203c268461b8f2a65bfcf75ec7e0c7d73e66cfe8f10d967304ecbaa1fa7211d6", + "value": "0x203c268461b8f2a65bfcf75ec7e0c7d73e66cfe8f10d967304ecbaa1fa7211d641f0bb70c6bc1acbb4949c9926fc4026d837be1e08434de9a186b46415d4421c" + } + } + }, + { + "caseId": "invalid_model_passport_update_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xb539c517573818f12fa8d1a3604ec24296225a26ef76fb9badeaabed55b4f3dd", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "10", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "model_passport_update", + "payloadHash": "0x1441fc64083c7cef50ff08f8e469ca59f0c09b80dc15e811b52700a7b87968f0", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "model_passport_update", + "payloadId": "0xe3cab3f31196df112aea6f29a374fb337acdab4b06e38b4af4d7c791a7651c59", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "10", + "details": { + "lifecycleUpdateId": "0xf5a85105d2d5754e0c1b65b0007f87d468d2bd8213b8eb95ef1d384d61cd34d6", + "objectType": "ModelPassport", + "operation": "create", + "objectId": "0xa73adb911f58e33dcd820471675d7a3d2b242be0574e217b144f4873135a4085", + "objectHash": "0xd5de49d30e0ff04ff2de2141d119bbfb46f3b741ce529f0594936a1cfba296d3", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0xdea6e290610e42576dc9fa8855c1d8e4cbedb6106cff9976ff36ddb79b6ccbcb", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:model_passport_update", + "account_nonce:10" + ], + "stateWrites": [ + "model_passport_update:state_write:0xe3cab3f31196df112aea6f29a374fb337acdab4b06e38b4af4d7c791a7651c59" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "10", + "after": "11" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "model_passport_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x374db9766c01ee8756caf4dc7d9c18b0c82b366a481aedbaf231c787472d761f", + "value": "0x374db9766c01ee8756caf4dc7d9c18b0c82b366a481aedbaf231c787472d761f1e31e11444a086edf6e2e1c946256dbbd6ece936f179408b30709a5db93599d4" + } + } + }, + { + "caseId": "invalid_work_receipt_update_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x81650a8cda675785e199f8259b80fee11abadc43fffbf619ed694920c2b20fea", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "11", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "work_receipt_update", + "payloadHash": "0xb808fb23de2a4c5931df1bd0793a50e300e384056191bf8ec43c40a63f72cd60", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "work_receipt_update", + "payloadId": "0x0f20ce102d27fae1dcd6e39ede8549a9ce20ea089bf7e850bd78bfbae1b3c904", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "11", + "details": { + "lifecycleUpdateId": "0x44a1288ac877ce018ed5e155c43be6131a3f861a2733bb964f60ee66eee4b9cd", + "objectType": "WorkReceipt", + "operation": "create", + "objectId": "0xa96483b49a3d6005d748a512e00ab0bf1feb77d2bad4dec4f7842310bfe401f7", + "objectHash": "0xeb0475e34e1b2818d882210c44d3a3d8c6f30b1e551b827c48d9b0619ad238d9", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0x9dd038e0ce4935319fda5f8a95674362d8b33b1d3ee787820e6c343b788cd58d", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:work_receipt_update", + "account_nonce:11" + ], + "stateWrites": [ + "work_receipt_update:state_write:0x0f20ce102d27fae1dcd6e39ede8549a9ce20ea089bf7e850bd78bfbae1b3c904" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "11", + "after": "12" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "work_receipt_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x567bc1def071888630c1b448279a6d4a44e9d00e87f4258c49a5f2bd3eac7bbf", + "value": "0x567bc1def071888630c1b448279a6d4a44e9d00e87f4258c49a5f2bd3eac7bbfd31a9c86dfc12050deb8f11fd8b8b368016aefa60ebcac8ba5262ec4243cfff4" + } + } + }, + { + "caseId": "invalid_artifact_availability_proof_update_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xf2755e509ad9a58d6c4d969ada79f08d7bfa7ceeef4d0b439959f8108ee8d026", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "12", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "artifact_availability_proof_update", + "payloadHash": "0x12875a7d20ac4115fd8b73a789a08659c80b62fa43eb61ae307c918449665590", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "artifact_availability_proof_update", + "payloadId": "0x368dde5881c4ace9e3f79d3c0c0544a33c5f397138b566019a4582b334f91d5b", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "12", + "details": { + "lifecycleUpdateId": "0x60734dd1226e4077c9e65ca13677b93fa7ffa60f82842b5091bf78afb81e8a47", + "objectType": "ArtifactAvailabilityProof", + "operation": "create", + "objectId": "0x7458f4ac71bc9008bc012e2a8cec5b529772b58f6fc86ab44bcd339a7070e069", + "objectHash": "0x67aed44d292f94b1bd141ec1f355955f96283783e08152a7237e2d37810fd49a", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0x86d33924cdab0b02f52329c23c47a17fc366aaa1f25ffe86cb043d45dce2645e", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:artifact_availability_proof_update", + "account_nonce:12" + ], + "stateWrites": [ + "artifact_availability_proof_update:state_write:0x368dde5881c4ace9e3f79d3c0c0544a33c5f397138b566019a4582b334f91d5b" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "12", + "after": "13" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "artifact_availability_proof_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x712e542a9bac78e3eaaf053ea5aa79579c48d11598be10b4ca1ff3464e66fbbd", + "value": "0x712e542a9bac78e3eaaf053ea5aa79579c48d11598be10b4ca1ff3464e66fbbddc65ca3fc5efda2596a2f0228be45b73b3bbc85552f8a65f29cf6721ad63b967" + } + } + }, + { + "caseId": "invalid_verifier_module_update_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x14c854dedf7535dc4b6d7aebf6891905d35889f95341e72df121c31d82bc2717", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "13", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "verifier_module_update", + "payloadHash": "0x0aca3f36b89204ac92eda6e6f868fc0b3ea6025c09c4ae96e7fb50ad81705fc0", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "verifier_module_update", + "payloadId": "0x995dde6d97ac1eb6929e4bd4e039cf288b5be4d092c79f62701babcbeae04829", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "13", + "details": { + "lifecycleUpdateId": "0xc92d8a917522ff573364e22a1794e254f09dd825645397bb02657eb883e82eb5", + "objectType": "VerifierModule", + "operation": "create", + "objectId": "0x5194f738c5e5d252e0ae82f28883d732b762b9944f20181b854841875c45c54b", + "objectHash": "0xfef87b4fe768283b6e0e741bde3c43e635ce3f89f769285e356027c813877895", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0xa02d1408d6f854615536af9e3fcc3c691eb8c6fad87ef68a6401fe6618618c5c", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:verifier_module_update", + "account_nonce:13" + ], + "stateWrites": [ + "verifier_module_update:state_write:0x995dde6d97ac1eb6929e4bd4e039cf288b5be4d092c79f62701babcbeae04829" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "13", + "after": "14" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "verifier_module_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x178b1397398ff39f53ede827aa50a384566c48f380f6ff70bbd2e30c17918745", + "value": "0x178b1397398ff39f53ede827aa50a384566c48f380f6ff70bbd2e30c179187456f7b1343945a7e3cafd48063b5029c6f4a7f64bdb2ba6425ceccf515cd201e1f" + } + } + }, + { + "caseId": "invalid_verifier_report_update_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xc86669294104fea26444eb412d85a6b4c940d0d05c3fdccef2c26bc7753ca0af", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "14", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "verifier_report_update", + "payloadHash": "0x9073c274dd94bfb13fbf1c40965935b5183f8f3151b09acbb020d9d94a9385f0", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "verifier_report_update", + "payloadId": "0xb32efbce075e1cb579dd1f336f3e3f19f0376bb97a73d4e9c3a42908551aee40", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "14", + "details": { + "lifecycleUpdateId": "0x2908295b327e718d264dabc5f5498f56890e28243d77aee467b194f05dcdf86e", + "objectType": "VerifierReport", + "operation": "create", + "objectId": "0x5d0ad9b32f26abc0cd7be3b8869c51aefbc3cdd5d3f01735a8820fb7ff0910e1", + "objectHash": "0xa8d1865f5910ec6a9b615c48d7768e6a6ad3d3647495ffd5e5f6e9a8870a9489", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0xb5679c8d1628adadf665abcd5c9ba0654a9cddb98de4d2fad83da2e561a17d13", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:verifier_report_update", + "account_nonce:14" + ], + "stateWrites": [ + "verifier_report_update:state_write:0xb32efbce075e1cb579dd1f336f3e3f19f0376bb97a73d4e9c3a42908551aee40" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "14", + "after": "15" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "verifier_report_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x34afe42f2c19ff474384a3fae65c8adca908053d4c74c6a52456954cdaa4ba3e", + "value": "0x34afe42f2c19ff474384a3fae65c8adca908053d4c74c6a52456954cdaa4ba3ec4829eee2eb535113d2a6c1f1713ce7e5fd15ffdfb34942478601ba4f92746b1" + } + } + }, + { + "caseId": "invalid_memory_cell_update_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x09b13bb36deeecd2f862620273e0c13b1c0c02e4545553117dc8eab61082a546", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "15", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "memory_cell_update", + "payloadHash": "0x95975da8734fca016e8c2f93ec5828fa0f19d6e571d871a2d0fe97f797b75d60", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "memory_cell_update", + "payloadId": "0x119ce8e2b8bff44f6dd3e58c5f55142f4b91192bd88dc4b342beb1dda2e4ec2b", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "15", + "details": { + "lifecycleUpdateId": "0x8dcd30dfa2af2149622159d554cfd4b406e3b957d33c20f2d24d5e93f062807f", + "objectType": "MemoryCell", + "operation": "create", + "objectId": "0xbcd05714eabfa7babbe32888041eaca0f715073f92e8c8cbd1f81922eeab5b16", + "objectHash": "0x86eeee0b28fa6533fd4220fb4953e78c29e1d545d3cffea2d985053157923619", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0x58bd17bc953ceac0890366bbcb897f36926712b1f5b14b648e2fec47c8833281", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:memory_cell_update", + "account_nonce:15" + ], + "stateWrites": [ + "memory_cell_update:state_write:0x119ce8e2b8bff44f6dd3e58c5f55142f4b91192bd88dc4b342beb1dda2e4ec2b" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "15", + "after": "16" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "memory_cell_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x02c6d16114becab27062bec4294a991a44cfad1a85c9c4203c852e442ee9423a", + "value": "0x02c6d16114becab27062bec4294a991a44cfad1a85c9c4203c852e442ee9423a88307792b4fa2188839c0c5075254977a8bb73f1ce79e3b5de1e741e122ff712" + } + } + }, + { + "caseId": "invalid_challenge_update_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xc20e5b49cac7f27690643613dac7e35f00452e826cbc22b4ddd7107d224a4b4a", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "16", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "challenge_update", + "payloadHash": "0x098203b68b7bfa8eb206ba3e10aa3dcc86d203edffc05ffa01de503641f73a61", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "challenge_update", + "payloadId": "0x3b5f3c39e177cbe3f68b3e17c3386c42bc9bd233bc1481d53eac73751d910b38", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "16", + "details": { + "lifecycleUpdateId": "0xf83daf6567077f2d934cecbba620031985e36727c891e81311552640ef930ef3", + "objectType": "Challenge", + "operation": "create", + "objectId": "0x927bb5cb7a259e9ef7a3ca9ed94f4f536928f87ecec25ef8e04eb3dd16884ad9", + "objectHash": "0xa73c3472a504f9dd8d98b3851f88a1fbaf9914524c0a7879172268bcc3225acf", + "status": "resolved", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0xa148aa4f0555533c2cb50a4b7a6c705ea1952ed7622cd4f8f978868b66277863", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:challenge_update", + "account_nonce:16" + ], + "stateWrites": [ + "challenge_update:state_write:0x3b5f3c39e177cbe3f68b3e17c3386c42bc9bd233bc1481d53eac73751d910b38" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "16", + "after": "17" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "challenge_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0xaea8ccac2f425c2e879919a426d2f0134490645480109e1ec4ab3989d6ee877a", + "value": "0xaea8ccac2f425c2e879919a426d2f0134490645480109e1ec4ab3989d6ee877a3225d734144d1cb416db73c545216ac6ab28fae4014816a910bc54aefd61d8db" + } + } + }, + { + "caseId": "invalid_finality_receipt_update_malformed_payload_hash", + "fixtureKind": "transaction", + "expectedErrorCode": "FC_PROTO_MALFORMED_PAYLOAD_HASH", + "transaction": { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x39cfb18c324d443d4096ea96c5f5a6f307558025a7bf1df7286df3d5811fe37d", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "17", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "finality_receipt_update", + "payloadHash": "0xd604885b817860cb2b3456884d3399d65b42386ff4651625542bfc73426aa9d0", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "finality_receipt_update", + "payloadId": "0x696e3e7a10a04d7d980be69b0c29c7c92de93b98c829b33a33626bc7f6a51ddd", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "17", + "details": { + "lifecycleUpdateId": "0x8a5eaff64212d4663055accac2c71d212eb8c09fa387872c263357be1bb8fab9", + "objectType": "FinalityReceipt", + "operation": "finalize", + "objectId": "0xd0017f1d9ab4a827a296feed92d8427582bb2eeac7bc1d006ecb843d2a2022fa", + "objectHash": "0xe8331685281b5709bcff0d968bff6a796d9e78057156c9ad4662bcc6bb8ef1ac", + "status": "finalized", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0x055948ea197b6ddb3b4b24fa76231e753eed6326db549f88ac3026beb2d5ab94", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:finality_receipt_update", + "account_nonce:17" + ], + "stateWrites": [ + "finality_receipt_update:state_write:0x696e3e7a10a04d7d980be69b0c29c7c92de93b98c829b33a33626bc7f6a51ddd" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "17", + "after": "18" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "finality_receipt_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x14257ecfda35adc39a8373793133bd06935417159dc31980cd783db8cb124442", + "value": "0x14257ecfda35adc39a8373793133bd06935417159dc31980cd783db8cb12444226fe91f37110b380180f5549df1f929e714381dbb733f6020980717aff33ec3e" + } + } + } + ] +} diff --git a/fixtures/production-l1/production-l1-tools.mjs b/fixtures/production-l1/production-l1-tools.mjs new file mode 100644 index 00000000..8aebbeef --- /dev/null +++ b/fixtures/production-l1/production-l1-tools.mjs @@ -0,0 +1,2484 @@ +#!/usr/bin/env node +import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs"; +import { dirname, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; + +const here = dirname(fileURLToPath(import.meta.url)); +const repoRoot = resolve(here, "../.."); +const schemasDir = resolve(repoRoot, "schemas", "flowmemory"); +const fixturesDir = here; + +const ZERO_HASH = `0x${"0".repeat(64)}`; +const PROTOCOL_VERSION = "flowchain.private_local_l1.protocol.v0"; +const GENESIS_INPUT_SCHEMA = "flowchain.production_l1.genesis_input.v0"; +const GENESIS_SCHEMA = "flowchain.production_l1.genesis.v0"; +const PROFILE_SCHEMA = "flowchain.production_l1.network_profile.v0"; +const ACCOUNT_SCHEMA = "flowchain.production_l1.account_public_metadata.v0"; +const AUTHORITY_SCHEMA = "flowchain.production_l1.validator_authority.v0"; +const PAYLOAD_SCHEMA = "flowchain.production_l1.transaction_payload.v0"; +const ENVELOPE_SCHEMA = "flowchain.production_l1.transaction_envelope.v0"; +const BLOCK_HEADER_SCHEMA = "flowchain.production_l1.block_header.v0"; +const BLOCK_BODY_SCHEMA = "flowchain.production_l1.block_body.v0"; +const RECEIPT_SCHEMA = "flowchain.production_l1.receipt.v0"; +const EVENT_SCHEMA = "flowchain.production_l1.event.v0"; +const STATE_ROOT_SCHEMA = "flowchain.production_l1.state_root_manifest.v0"; +const BRIDGE_EVIDENCE_SCHEMA = "flowchain.production_l1.bridge_evidence.v0"; +const FINALITY_SCHEMA = "flowchain.production_l1.finality_receipt.v0"; +const EXPORT_SNAPSHOT_SCHEMA = "flowchain.production_l1.export_snapshot.v0"; + +const PROFILE_IDS = [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" +]; + +const PAYLOAD_TYPES = [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" +]; + +const OBJECT_PAYLOAD_TYPES = [ + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" +]; + +const OBJECT_TYPES = [ + "AgentAccount", + "ModelPassport", + "WorkReceipt", + "ArtifactAvailabilityProof", + "VerifierModule", + "VerifierReport", + "MemoryCell", + "Challenge", + "FinalityReceipt" +]; + +const STATE_COMPONENTS = [ + "accounts", + "balances", + "tokens", + "pools", + "lp_positions", + "bridge_credits", + "withdrawals", + "object_store", + "finality", + "validator_state" +]; + +const EVENT_TYPES = [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" +]; + +const ERROR_CODES = { + WRONG_CHAIN: "FC_PROTO_WRONG_CHAIN_ID", + WRONG_PROFILE: "FC_PROTO_WRONG_NETWORK_PROFILE", + WRONG_GENESIS: "FC_PROTO_WRONG_GENESIS_HASH", + STALE_NONCE: "FC_PROTO_STALE_NONCE", + DUPLICATE_TX: "FC_PROTO_DUPLICATE_TX", + MALFORMED_PAYLOAD_HASH: "FC_PROTO_MALFORMED_PAYLOAD_HASH", + MALFORMED_TX_ID: "FC_PROTO_MALFORMED_TX_ID", + MALFORMED_STATE_ROOT: "FC_PROTO_MALFORMED_STATE_ROOT", + INVALID_BRIDGE_SOURCE_CHAIN: "FC_PROTO_INVALID_BRIDGE_SOURCE_CHAIN", + DUPLICATE_BRIDGE_EVENT: "FC_PROTO_DUPLICATE_BRIDGE_EVENT", + SCHEMA: "FC_PROTO_SCHEMA_VALIDATION" +}; + +const MASK_64 = (1n << 64n) - 1n; +const KECCAK_ROT = [ + 0, 1, 62, 28, 27, + 36, 44, 6, 55, 20, + 3, 10, 43, 25, 39, + 41, 45, 15, 21, 8, + 18, 2, 61, 56, 14 +]; +const KECCAK_RC = [ + 0x0000000000000001n, 0x0000000000008082n, 0x800000000000808an, + 0x8000000080008000n, 0x000000000000808bn, 0x0000000080000001n, + 0x8000000080008081n, 0x8000000000008009n, 0x000000000000008an, + 0x0000000000000088n, 0x0000000080008009n, 0x000000008000000an, + 0x000000008000808bn, 0x800000000000008bn, 0x8000000000008089n, + 0x8000000000008003n, 0x8000000000008002n, 0x8000000000000080n, + 0x000000000000800an, 0x800000008000000an, 0x8000000080008081n, + 0x8000000000008080n, 0x0000000080000001n, 0x8000000080008008n +]; + +function rot64(value, shift) { + const n = BigInt(shift); + if (n === 0n) return value & MASK_64; + return ((value << n) | (value >> (64n - n))) & MASK_64; +} + +function keccakF(state) { + for (const rc of KECCAK_RC) { + const c = new Array(5).fill(0n); + const d = new Array(5).fill(0n); + for (let x = 0; x < 5; x += 1) { + c[x] = state[x] ^ state[x + 5] ^ state[x + 10] ^ state[x + 15] ^ state[x + 20]; + } + for (let x = 0; x < 5; x += 1) { + d[x] = c[(x + 4) % 5] ^ rot64(c[(x + 1) % 5], 1); + } + for (let y = 0; y < 5; y += 1) { + for (let x = 0; x < 5; x += 1) { + state[x + 5 * y] = (state[x + 5 * y] ^ d[x]) & MASK_64; + } + } + + const b = new Array(25).fill(0n); + for (let y = 0; y < 5; y += 1) { + for (let x = 0; x < 5; x += 1) { + b[y + 5 * ((2 * x + 3 * y) % 5)] = rot64(state[x + 5 * y], KECCAK_ROT[x + 5 * y]); + } + } + for (let y = 0; y < 5; y += 1) { + for (let x = 0; x < 5; x += 1) { + state[x + 5 * y] = (b[x + 5 * y] ^ ((~b[((x + 1) % 5) + 5 * y]) & b[((x + 2) % 5) + 5 * y])) & MASK_64; + } + } + state[0] = (state[0] ^ rc) & MASK_64; + } +} + +function keccak256(bytes) { + const rate = 136; + const state = new Array(25).fill(0n); + let offset = 0; + while (bytes.length - offset >= rate) { + absorbBlock(state, bytes.subarray(offset, offset + rate)); + keccakF(state); + offset += rate; + } + const block = new Uint8Array(rate); + block.set(bytes.subarray(offset)); + block[bytes.length - offset] ^= 0x01; + block[rate - 1] ^= 0x80; + absorbBlock(state, block); + keccakF(state); + + const out = new Uint8Array(32); + for (let i = 0; i < out.length; i += 1) { + out[i] = Number((state[Math.floor(i / 8)] >> BigInt(8 * (i % 8))) & 0xffn); + } + return out; +} + +function absorbBlock(state, block) { + for (let lane = 0; lane < block.length / 8; lane += 1) { + let value = 0n; + for (let i = 0; i < 8; i += 1) { + value |= BigInt(block[lane * 8 + i]) << BigInt(8 * i); + } + state[lane] = (state[lane] ^ value) & MASK_64; + } +} + +function bytesToHex(bytes) { + return `0x${Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("")}`; +} + +function utf8(value) { + return new TextEncoder().encode(value); +} + +function keccakHex(value) { + return bytesToHex(keccak256(typeof value === "string" ? utf8(value) : value)); +} + +function canonicalJson(value) { + return JSON.stringify(normalize(value)); +} + +function normalize(value) { + if (Array.isArray(value)) { + return value.map((entry) => normalize(entry)); + } + if (value && typeof value === "object") { + return Object.fromEntries(Object.keys(value).sort().map((key) => [key, normalize(value[key])])); + } + return value; +} + +function hashJson(domain, value) { + return keccakHex(`${domain}:${canonicalJson(value)}`); +} + +function writeJson(path, value) { + mkdirSync(dirname(path), { recursive: true }); + writeFileSync(path, `${JSON.stringify(value, null, 2)}\n`); +} + +function readJson(path) { + return JSON.parse(readFileSync(path, "utf8")); +} + +function prop(owner, value) { + return { ...value, "x-owner": owner }; +} + +function ref(name) { + return { "$ref": `https://flowmemory.local/schemas/flowmemory/${name}` }; +} + +function defs() { + return { + hex32: { type: "string", pattern: "^0x[0-9a-fA-F]{64}$" }, + address: { type: "string", pattern: "^0x[0-9a-fA-F]{40}$" }, + publicKey: { type: "string", pattern: "^0x(02|03)[0-9a-fA-F]{64}$" }, + uintString: { type: "string", pattern: "^(0|[1-9][0-9]*)$" }, + isoTime: { type: "string", format: "date-time" }, + networkProfile: { type: "string", enum: PROFILE_IDS }, + payloadType: { type: "string", enum: PAYLOAD_TYPES }, + eventType: { type: "string", enum: EVENT_TYPES }, + stateComponent: { type: "string", enum: STATE_COMPONENTS } + }; +} + +function schemaDoc(fileName, title, body) { + return { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": `https://flowmemory.local/schemas/flowmemory/${fileName}`, + title, + ...body + }; +} + +function buildSchemas() { + const commonDefs = defs(); + const schemas = {}; + + schemas["production-network-profile.schema.json"] = schemaDoc("production-network-profile.schema.json", "FlowChain Private/Local Network Profile V0", { + type: "object", + additionalProperties: false, + required: [ + "schema", + "profileId", + "legacyAliases", + "chainId", + "networkName", + "destinationScope", + "genesisHashRules", + "allowedBridgeSourceChainIds", + "finalityRule", + "blockTimeTargetMs", + "defaultDataDirectory", + "allowedTransactionFamilies", + "productionReady", + "publicMainnetReady" + ], + properties: { + schema: prop("protocol", { const: PROFILE_SCHEMA }), + profileId: prop("protocol", commonDefs.networkProfile), + legacyAliases: prop("protocol", { type: "array", items: { enum: ["flowchain-local", "flowchain-private-lan"] }, uniqueItems: true }), + chainId: prop("runtime", commonDefs.uintString), + networkName: prop("runtime", { type: "string", minLength: 1 }), + destinationScope: prop("runtime", { enum: ["local_private"] }), + genesisHashRules: prop("crypto", { + type: "object", + additionalProperties: false, + required: ["hashAlgorithm", "canonicalization", "domain", "inputFields"], + properties: { + hashAlgorithm: prop("crypto", { const: "keccak256" }), + canonicalization: prop("crypto", { const: "canonical-json-sorted-keys-v0" }), + domain: prop("crypto", { const: "flowchain.production_l1.genesis_hash.v0" }), + inputFields: prop("crypto", { + type: "array", + minItems: 8, + items: { type: "string" } + }) + } + }), + allowedBridgeSourceChainIds: prop("bridge", { type: "array", items: { type: "integer", enum: [31337, 84532, 8453] }, uniqueItems: true }), + finalityRule: prop("consensus", { + type: "object", + additionalProperties: false, + required: ["rule", "requiredConfirmations", "quorum"], + properties: { + rule: prop("consensus", { enum: ["single_authority_instant", "quorum_2f_plus_1_checkpoint", "source_base_confirmed_destination_local_finalized"] }), + requiredConfirmations: prop("consensus", { type: "integer", minimum: 0 }), + quorum: prop("consensus", { type: "string", pattern: "^[0-9]+/[0-9]+$" }) + } + }), + blockTimeTargetMs: prop("runtime", { type: "integer", minimum: 0 }), + defaultDataDirectory: prop("runtime", { type: "string", minLength: 1 }), + allowedTransactionFamilies: prop("runtime", { type: "array", items: commonDefs.payloadType, minItems: 1, uniqueItems: true }), + productionReady: prop("hq-review", { const: false }), + publicMainnetReady: prop("hq-review", { const: false }) + }, + "$defs": commonDefs + }); + + schemas["production-account-public-metadata.schema.json"] = schemaDoc("production-account-public-metadata.schema.json", "FlowChain Account Public Metadata V0", { + type: "object", + additionalProperties: false, + required: [ + "schema", + "accountId", + "label", + "publicKey", + "address", + "addressDerivation", + "nonceDomain", + "roleFlags", + "metadataHash", + "status", + "productionReady" + ], + properties: { + schema: prop("wallet", { const: ACCOUNT_SCHEMA }), + accountId: prop("wallet", commonDefs.hex32), + label: prop("wallet", { type: "string", minLength: 1 }), + publicKey: prop("wallet", commonDefs.publicKey), + address: prop("wallet", commonDefs.address), + addressDerivation: prop("wallet", { + type: "object", + additionalProperties: false, + required: ["algorithm", "preimageFields", "chainIdBinding"], + properties: { + algorithm: prop("wallet", { const: "keccak256(compressedSecp256k1PublicKey)[12:32]" }), + preimageFields: prop("wallet", { type: "array", items: { enum: ["publicKey", "chainId", "networkProfile"] }, minItems: 3, uniqueItems: true }), + chainIdBinding: prop("wallet", { const: true }) + } + }), + nonceDomain: prop("runtime", { + type: "object", + additionalProperties: false, + required: ["domainId", "nextNonce", "replayScope"], + properties: { + domainId: prop("runtime", commonDefs.hex32), + nextNonce: prop("runtime", commonDefs.uintString), + replayScope: prop("runtime", { const: "chainId+networkProfile+genesisHash+accountId" }) + } + }), + roleFlags: prop("wallet", { + type: "object", + additionalProperties: false, + required: ["user", "validator", "bridgeOperator", "deployer", "relayer", "emergencyOperator"], + properties: { + user: prop("wallet", { type: "boolean" }), + validator: prop("wallet", { type: "boolean" }), + bridgeOperator: prop("wallet", { type: "boolean" }), + deployer: prop("wallet", { type: "boolean" }), + relayer: prop("wallet", { type: "boolean" }), + emergencyOperator: prop("wallet", { type: "boolean" }) + } + }), + metadataHash: prop("wallet", commonDefs.hex32), + status: prop("runtime", { enum: ["active", "inactive"] }), + productionReady: prop("hq-review", { const: false }) + }, + "$defs": commonDefs + }); + + schemas["production-validator-authority.schema.json"] = schemaDoc("production-validator-authority.schema.json", "FlowChain Validator Authority V0", { + type: "object", + additionalProperties: false, + required: [ + "schema", + "authorityId", + "accountId", + "publicKey", + "address", + "authorityType", + "votingPower", + "finalityWeight", + "metadataHash", + "status", + "productionReady" + ], + properties: { + schema: prop("consensus", { const: AUTHORITY_SCHEMA }), + authorityId: prop("consensus", commonDefs.hex32), + accountId: prop("consensus", commonDefs.hex32), + publicKey: prop("consensus", commonDefs.publicKey), + address: prop("consensus", commonDefs.address), + authorityType: prop("consensus", { enum: ["validator", "sequencer", "local-authority", "finality-voter", "bridge-release-authority"] }), + votingPower: prop("consensus", commonDefs.uintString), + finalityWeight: prop("consensus", commonDefs.uintString), + metadataHash: prop("consensus", commonDefs.hex32), + status: prop("consensus", { enum: ["active", "inactive"] }), + productionReady: prop("hq-review", { const: false }) + }, + "$defs": commonDefs + }); + + schemas["production-genesis.schema.json"] = schemaDoc("production-genesis.schema.json", "FlowChain Genesis V0", { + type: "object", + additionalProperties: false, + required: [ + "schema", + "protocolVersion", + "networkProfile", + "chainId", + "networkName", + "genesisTimestamp", + "genesisUnixMs", + "stateRootSeed", + "initialAccounts", + "initialBalances", + "validatorSet", + "bridgePilotConfig", + "tokenDexBootstrapConfig", + "genesisHashInput", + "genesisHash", + "productionReady" + ], + properties: { + schema: prop("runtime", { const: GENESIS_SCHEMA }), + protocolVersion: prop("protocol", { const: PROTOCOL_VERSION }), + networkProfile: prop("runtime", commonDefs.networkProfile), + chainId: prop("runtime", commonDefs.uintString), + networkName: prop("runtime", { type: "string", minLength: 1 }), + genesisTimestamp: prop("runtime", commonDefs.isoTime), + genesisUnixMs: prop("runtime", commonDefs.uintString), + stateRootSeed: prop("crypto", commonDefs.hex32), + initialAccounts: prop("wallet", { type: "array", minItems: 1, items: ref("production-account-public-metadata.schema.json") }), + initialBalances: prop("runtime", { + type: "array", + items: { + type: "object", + additionalProperties: false, + required: ["accountId", "assetId", "amount", "balanceType", "noValue"], + properties: { + accountId: prop("runtime", commonDefs.hex32), + assetId: prop("runtime", commonDefs.hex32), + amount: prop("runtime", commonDefs.uintString), + balanceType: prop("runtime", { enum: ["native_local_unit", "test_token"] }), + noValue: prop("hq-review", { const: true }) + } + } + }), + validatorSet: prop("consensus", { type: "array", minItems: 1, items: ref("production-validator-authority.schema.json") }), + bridgePilotConfig: prop("bridge", { + type: "object", + additionalProperties: false, + required: ["enabled", "sourceChainId", "sourceNetwork", "destinationProfile", "lockboxAddress", "releaseAuthorityAccountId", "relayerAccountId", "duplicatePolicy", "productionReady"], + properties: { + enabled: prop("bridge", { type: "boolean" }), + sourceChainId: prop("bridge", { type: "integer", enum: [8453] }), + sourceNetwork: prop("bridge", { const: "base-mainnet-source-for-local-private-pilot" }), + destinationProfile: prop("bridge", { const: "flowchain-base8453-pilot" }), + lockboxAddress: prop("bridge", commonDefs.address), + releaseAuthorityAccountId: prop("bridge", commonDefs.hex32), + relayerAccountId: prop("bridge", commonDefs.hex32), + duplicatePolicy: prop("bridge", { const: "reject_same_source_chain_lockbox_tx_hash_log_index" }), + productionReady: prop("hq-review", { const: false }) + } + }), + tokenDexBootstrapConfig: prop("runtime", { + type: "object", + additionalProperties: false, + required: ["nativeAssetId", "localTokenLaunchAllowed", "localTokenMintAllowed", "dexBootstrapAllowed", "defaultFeeBps", "productionReady"], + properties: { + nativeAssetId: prop("runtime", commonDefs.hex32), + localTokenLaunchAllowed: prop("runtime", { const: true }), + localTokenMintAllowed: prop("runtime", { const: true }), + dexBootstrapAllowed: prop("runtime", { const: true }), + defaultFeeBps: prop("runtime", { type: "integer", minimum: 0, maximum: 10000 }), + productionReady: prop("hq-review", { const: false }) + } + }), + genesisHashInput: prop("crypto", { + type: "object", + additionalProperties: false, + required: ["schema", "protocolVersion", "networkProfile", "chainId", "genesisTimestamp", "stateRootSeed", "initialAccountsRoot", "initialBalancesRoot", "validatorSetRoot", "bridgePilotConfigHash", "tokenDexBootstrapConfigHash"], + properties: { + schema: prop("crypto", { const: "flowchain.production_l1.genesis_hash_input.v0" }), + protocolVersion: prop("crypto", { const: PROTOCOL_VERSION }), + networkProfile: prop("crypto", commonDefs.networkProfile), + chainId: prop("crypto", commonDefs.uintString), + genesisTimestamp: prop("crypto", commonDefs.isoTime), + stateRootSeed: prop("crypto", commonDefs.hex32), + initialAccountsRoot: prop("crypto", commonDefs.hex32), + initialBalancesRoot: prop("crypto", commonDefs.hex32), + validatorSetRoot: prop("crypto", commonDefs.hex32), + bridgePilotConfigHash: prop("crypto", commonDefs.hex32), + tokenDexBootstrapConfigHash: prop("crypto", commonDefs.hex32) + } + }), + genesisHash: prop("crypto", commonDefs.hex32), + productionReady: prop("hq-review", { const: false }) + }, + "$defs": commonDefs + }); + + schemas["production-transaction-payload.schema.json"] = buildPayloadSchema(commonDefs); + schemas["production-transaction-envelope.schema.json"] = buildEnvelopeSchema(commonDefs); + schemas["production-event.schema.json"] = buildEventSchema(commonDefs); + schemas["production-receipt.schema.json"] = buildReceiptSchema(commonDefs); + schemas["production-block-header.schema.json"] = buildBlockHeaderSchema(commonDefs); + schemas["production-bridge-evidence.schema.json"] = buildBridgeEvidenceSchema(commonDefs); + schemas["production-state-root-manifest.schema.json"] = buildStateRootSchema(commonDefs); + schemas["production-finality-receipt.schema.json"] = buildFinalitySchema(commonDefs); + schemas["production-block-body.schema.json"] = buildBlockBodySchema(commonDefs); + schemas["production-export-snapshot.schema.json"] = buildExportSnapshotSchema(commonDefs); + + return schemas; +} + +function buildPayloadSchema(commonDefs) { + const hex = commonDefs.hex32; + const uint = commonDefs.uintString; + const details = { + native_transfer: { + required: ["fromAccountId", "toAccountId", "assetId", "amount", "memoHash"], + properties: { fromAccountId: prop("runtime", hex), toAccountId: prop("runtime", hex), assetId: prop("runtime", hex), amount: prop("runtime", uint), memoHash: prop("wallet", hex) } + }, + faucet_funding: { + required: ["faucetId", "toAccountId", "assetId", "amount", "reasonHash", "localOnly"], + properties: { faucetId: prop("runtime", hex), toAccountId: prop("runtime", hex), assetId: prop("runtime", hex), amount: prop("runtime", uint), reasonHash: prop("runtime", hex), localOnly: prop("hq-review", { const: true }) } + }, + bridge_credit: { + required: ["bridgeEvidenceId", "observationId", "creditId", "sourceChainId", "assetId", "amount", "recipientAccountId"], + properties: { bridgeEvidenceId: prop("bridge", hex), observationId: prop("bridge", hex), creditId: prop("bridge", hex), sourceChainId: prop("bridge", { type: "integer", enum: [31337, 84532, 8453] }), assetId: prop("bridge", hex), amount: prop("bridge", uint), recipientAccountId: prop("bridge", hex) } + }, + token_launch: { + required: ["tokenLaunchId", "issuerAccountId", "tokenId", "symbol", "name", "decimals", "metadataHash", "initialSupply", "recipientAccountId"], + properties: { tokenLaunchId: prop("runtime", hex), issuerAccountId: prop("runtime", hex), tokenId: prop("runtime", hex), symbol: prop("wallet", { type: "string", pattern: "^[A-Z0-9]{2,12}$" }), name: prop("wallet", { type: "string", minLength: 1 }), decimals: prop("runtime", { type: "integer", minimum: 0, maximum: 18 }), metadataHash: prop("runtime", hex), initialSupply: prop("runtime", uint), recipientAccountId: prop("runtime", hex) } + }, + token_mint: { + required: ["mintId", "tokenId", "toAccountId", "amount", "reasonHash", "localOrTestMode"], + properties: { mintId: prop("runtime", hex), tokenId: prop("runtime", hex), toAccountId: prop("runtime", hex), amount: prop("runtime", uint), reasonHash: prop("runtime", hex), localOrTestMode: prop("hq-review", { const: true }) } + }, + token_transfer: { + required: ["tokenTransferId", "tokenId", "fromAccountId", "toAccountId", "amount", "memoHash"], + properties: { tokenTransferId: prop("runtime", hex), tokenId: prop("runtime", hex), fromAccountId: prop("runtime", hex), toAccountId: prop("runtime", hex), amount: prop("runtime", uint), memoHash: prop("wallet", hex) } + }, + pool_create: { + required: ["poolCreateId", "creatorAccountId", "poolId", "baseAssetId", "quoteAssetId", "feeBps", "tickSpacing", "metadataHash"], + properties: { poolCreateId: prop("runtime", hex), creatorAccountId: prop("runtime", hex), poolId: prop("runtime", hex), baseAssetId: prop("runtime", hex), quoteAssetId: prop("runtime", hex), feeBps: prop("runtime", { type: "integer", minimum: 0, maximum: 10000 }), tickSpacing: prop("runtime", { type: "integer", minimum: 1 }), metadataHash: prop("runtime", hex) } + }, + add_liquidity: { + required: ["liquidityId", "poolId", "providerAccountId", "baseAmount", "quoteAmount", "minLpUnits"], + properties: { liquidityId: prop("runtime", hex), poolId: prop("runtime", hex), providerAccountId: prop("runtime", hex), baseAmount: prop("runtime", uint), quoteAmount: prop("runtime", uint), minLpUnits: prop("runtime", uint) } + }, + remove_liquidity: { + required: ["liquidityId", "poolId", "providerAccountId", "lpUnits", "minBaseAmount", "minQuoteAmount"], + properties: { liquidityId: prop("runtime", hex), poolId: prop("runtime", hex), providerAccountId: prop("runtime", hex), lpUnits: prop("runtime", uint), minBaseAmount: prop("runtime", uint), minQuoteAmount: prop("runtime", uint) } + }, + swap: { + required: ["swapId", "poolId", "traderAccountId", "assetInId", "assetOutId", "amountIn", "minAmountOut", "routeHash"], + properties: { swapId: prop("runtime", hex), poolId: prop("runtime", hex), traderAccountId: prop("runtime", hex), assetInId: prop("runtime", hex), assetOutId: prop("runtime", hex), amountIn: prop("runtime", uint), minAmountOut: prop("runtime", uint), routeHash: prop("runtime", hex) } + }, + withdrawal_intent: { + required: ["withdrawalIntentId", "sourceAccountId", "destinationChainId", "destinationAddress", "assetId", "amount", "releasePolicyHash"], + properties: { withdrawalIntentId: prop("bridge", hex), sourceAccountId: prop("bridge", hex), destinationChainId: prop("bridge", { type: "integer", enum: [8453] }), destinationAddress: prop("bridge", commonDefs.address), assetId: prop("bridge", hex), amount: prop("bridge", uint), releasePolicyHash: prop("bridge", hex) } + }, + validator_authority_config: { + required: ["authorityConfigId", "authorityId", "validatorAccountId", "action", "authorityType", "votingPower", "metadataHash"], + properties: { authorityConfigId: prop("consensus", hex), authorityId: prop("consensus", hex), validatorAccountId: prop("consensus", hex), action: prop("consensus", { enum: ["register", "update"] }), authorityType: prop("consensus", { enum: ["validator", "sequencer", "local-authority", "finality-voter"] }), votingPower: prop("consensus", uint), metadataHash: prop("consensus", hex) } + }, + finality_vote: { + required: ["voteId", "validatorAccountId", "height", "blockHash", "stateRoot", "voteRound"], + properties: { voteId: prop("consensus", hex), validatorAccountId: prop("consensus", hex), height: prop("consensus", uint), blockHash: prop("consensus", hex), stateRoot: prop("consensus", hex), voteRound: prop("consensus", uint) } + }, + finality_certificate: { + required: ["certificateId", "height", "blockHash", "stateRoot", "signerSetRoot", "voteIds", "quorumNumerator", "quorumDenominator"], + properties: { certificateId: prop("consensus", hex), height: prop("consensus", uint), blockHash: prop("consensus", hex), stateRoot: prop("consensus", hex), signerSetRoot: prop("consensus", hex), voteIds: prop("consensus", { type: "array", items: hex, minItems: 1 }), quorumNumerator: prop("consensus", { type: "integer", minimum: 1 }), quorumDenominator: prop("consensus", { type: "integer", minimum: 1 }) } + } + }; + + for (const payloadType of OBJECT_PAYLOAD_TYPES) { + const objectType = objectTypeForPayload(payloadType); + details[payloadType] = { + required: ["lifecycleUpdateId", "objectType", "operation", "objectId", "objectHash", "status", "rootfieldId"], + properties: { + lifecycleUpdateId: prop("runtime", hex), + objectType: prop("runtime", { const: objectType }), + operation: prop("runtime", { enum: ["create", "update", "status_change", "finalize"] }), + objectId: prop("runtime", hex), + objectHash: prop("crypto", hex), + status: prop("runtime", { enum: ["active", "pending", "verified", "failed", "resolved", "finalized", "superseded"] }), + rootfieldId: prop("runtime", hex), + sourceReceiptId: prop("runtime", { anyOf: [hex, { type: "null" }] }), + parentObjectId: prop("runtime", { anyOf: [hex, { type: "null" }] }) + } + }; + } + + return schemaDoc("production-transaction-payload.schema.json", "FlowChain Transaction Payload Union V0", { + oneOf: PAYLOAD_TYPES.map((payloadType) => payloadVariant(payloadType, details[payloadType], commonDefs)), + "$defs": commonDefs + }); +} + +function payloadVariant(payloadType, detail, commonDefs) { + return { + type: "object", + additionalProperties: false, + required: [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + properties: { + schema: prop("runtime", { const: PAYLOAD_SCHEMA }), + payloadType: prop("runtime", { const: payloadType }), + payloadId: prop("runtime", commonDefs.hex32), + actorAccountId: prop("wallet", commonDefs.hex32), + accountNonce: prop("runtime", commonDefs.uintString), + details: prop(payloadOwner(payloadType), { + type: "object", + additionalProperties: false, + required: detail.required, + properties: detail.properties + }), + preconditions: prop("runtime", { type: "array", items: { type: "string", minLength: 1 }, minItems: 1 }), + stateWrites: prop("runtime", { type: "array", items: { type: "string", minLength: 1 }, minItems: 1 }), + balanceChanges: prop("runtime", { + type: "array", + items: { + type: "object", + additionalProperties: false, + required: ["accountId", "assetId", "delta"], + properties: { + accountId: prop("runtime", commonDefs.hex32), + assetId: prop("runtime", commonDefs.hex32), + delta: prop("runtime", { type: "string", pattern: "^-?(0|[1-9][0-9]*)$" }) + } + } + }), + nonceChange: prop("runtime", { + type: "object", + additionalProperties: false, + required: ["accountId", "before", "after"], + properties: { + accountId: prop("runtime", commonDefs.hex32), + before: prop("runtime", commonDefs.uintString), + after: prop("runtime", commonDefs.uintString) + } + }), + emittedEventTypes: prop("indexer", { type: "array", minItems: 1, items: commonDefs.eventType }), + indexKeys: prop("indexer", { + type: "array", + minItems: 1, + items: { + type: "object", + additionalProperties: false, + required: ["key", "value"], + properties: { + key: prop("indexer", { type: "string", minLength: 1 }), + value: prop("indexer", { type: "string", minLength: 1 }) + } + } + }), + localOnly: prop("hq-review", { const: true }), + productionReady: prop("hq-review", { const: false }) + } + }; +} + +function buildEnvelopeSchema(commonDefs) { + return schemaDoc("production-transaction-envelope.schema.json", "FlowChain Transaction Envelope V0", { + type: "object", + additionalProperties: false, + required: [ + "schema", + "txId", + "protocolVersion", + "chainId", + "networkProfile", + "genesisHash", + "nonce", + "nonceDomain", + "signer", + "payloadType", + "payloadHash", + "payload", + "fee", + "expiration", + "signature" + ], + properties: { + schema: prop("crypto", { const: ENVELOPE_SCHEMA }), + txId: prop("crypto", commonDefs.hex32), + protocolVersion: prop("protocol", { const: PROTOCOL_VERSION }), + chainId: prop("runtime", commonDefs.uintString), + networkProfile: prop("runtime", commonDefs.networkProfile), + genesisHash: prop("crypto", commonDefs.hex32), + nonce: prop("runtime", commonDefs.uintString), + nonceDomain: prop("runtime", commonDefs.hex32), + signer: prop("wallet", { + type: "object", + additionalProperties: false, + required: ["accountId", "publicKey", "address", "role"], + properties: { + accountId: prop("wallet", commonDefs.hex32), + publicKey: prop("wallet", commonDefs.publicKey), + address: prop("wallet", commonDefs.address), + role: prop("wallet", { enum: ["user", "validator", "bridge_operator", "deployer", "relayer", "emergency_operator"] }) + } + }), + payloadType: prop("runtime", commonDefs.payloadType), + payloadHash: prop("crypto", commonDefs.hex32), + payload: prop("runtime", ref("production-transaction-payload.schema.json")), + fee: prop("runtime", { + type: "object", + additionalProperties: false, + required: ["mode", "gasLimit", "maxFeePerGas", "localExecutionCostLimit"], + properties: { + mode: prop("runtime", { enum: ["no_fee_local", "local_gas_units"] }), + gasLimit: prop("runtime", commonDefs.uintString), + maxFeePerGas: prop("runtime", commonDefs.uintString), + localExecutionCostLimit: prop("runtime", commonDefs.uintString) + } + }), + expiration: prop("runtime", { + type: "object", + additionalProperties: false, + required: ["validAfterBlock", "validUntilBlock", "expiresAtUnixMs"], + properties: { + validAfterBlock: prop("runtime", commonDefs.uintString), + validUntilBlock: prop("runtime", commonDefs.uintString), + expiresAtUnixMs: prop("runtime", commonDefs.uintString) + } + }), + signature: prop("crypto", { + type: "object", + additionalProperties: false, + required: ["scheme", "signingDigest", "value"], + properties: { + scheme: prop("crypto", { const: "fixture-secp256k1-digest-only" }), + signingDigest: prop("crypto", commonDefs.hex32), + value: prop("crypto", { type: "string", pattern: "^0x[0-9a-fA-F]{128}$" }) + } + }) + }, + "$defs": commonDefs + }); +} + +function buildEventSchema(commonDefs) { + return schemaDoc("production-event.schema.json", "FlowChain Event V0", { + type: "object", + additionalProperties: false, + required: ["schema", "eventId", "eventType", "payloadType", "txId", "receiptId", "blockHeight", "eventIndex", "emitterAccountId", "subjectId", "attributes", "deterministicIdInput"], + properties: { + schema: prop("indexer", { const: EVENT_SCHEMA }), + eventId: prop("indexer", commonDefs.hex32), + eventType: prop("indexer", commonDefs.eventType), + payloadType: prop("indexer", commonDefs.payloadType), + txId: prop("indexer", commonDefs.hex32), + receiptId: prop("indexer", commonDefs.hex32), + blockHeight: prop("runtime", commonDefs.uintString), + eventIndex: prop("indexer", { type: "integer", minimum: 0 }), + emitterAccountId: prop("indexer", commonDefs.hex32), + subjectId: prop("indexer", commonDefs.hex32), + attributes: prop("indexer", { + type: "array", + items: { + type: "object", + additionalProperties: false, + required: ["key", "value", "valueType"], + properties: { + key: prop("indexer", { type: "string", minLength: 1 }), + value: prop("indexer", { type: "string" }), + valueType: prop("indexer", { enum: ["hex32", "address", "uint", "string", "bool"] }) + } + } + }), + deterministicIdInput: prop("crypto", commonDefs.hex32) + }, + "$defs": commonDefs + }); +} + +function buildReceiptSchema(commonDefs) { + return schemaDoc("production-receipt.schema.json", "FlowChain Receipt V0", { + type: "object", + additionalProperties: false, + required: ["schema", "receiptId", "txId", "payloadType", "status", "executionCost", "stateDeltaRef", "emittedEvents", "bridgeEvidenceRefs", "errorCode", "failureReason", "deterministicIdInput"], + properties: { + schema: prop("runtime", { const: RECEIPT_SCHEMA }), + receiptId: prop("runtime", commonDefs.hex32), + txId: prop("runtime", commonDefs.hex32), + payloadType: prop("runtime", commonDefs.payloadType), + status: prop("runtime", { enum: ["succeeded", "failed"] }), + executionCost: prop("runtime", { + type: "object", + additionalProperties: false, + required: ["costUnits", "meter"], + properties: { + costUnits: prop("runtime", commonDefs.uintString), + meter: prop("runtime", { enum: ["local_execution_units", "local_gas_units"] }) + } + }), + stateDeltaRef: prop("runtime", commonDefs.hex32), + emittedEvents: prop("indexer", { type: "array", items: commonDefs.hex32 }), + bridgeEvidenceRefs: prop("bridge", { type: "array", items: commonDefs.hex32 }), + errorCode: prop("rpc", { anyOf: [{ type: "string", pattern: "^FC_[A-Z0-9_]+$" }, { type: "null" }] }), + failureReason: prop("rpc", { + anyOf: [ + { + type: "object", + additionalProperties: false, + required: ["reasonCode", "displayMessage", "retryable"], + properties: { + reasonCode: prop("rpc", { type: "string", pattern: "^FC_[A-Z0-9_]+$" }), + displayMessage: prop("dashboard", { type: "string", minLength: 1 }), + retryable: prop("rpc", { type: "boolean" }) + } + }, + { type: "null" } + ] + }), + deterministicIdInput: prop("crypto", commonDefs.hex32) + }, + "$defs": commonDefs + }); +} + +function buildBlockHeaderSchema(commonDefs) { + return schemaDoc("production-block-header.schema.json", "FlowChain Block Header V0", { + type: "object", + additionalProperties: false, + required: ["schema", "chainId", "networkProfile", "genesisHash", "height", "parentHash", "timestamp", "proposer", "txRoot", "receiptRoot", "eventRoot", "stateRoot", "evidenceRoot", "finalizedHeight", "protocolVersion", "blockHash"], + properties: { + schema: prop("runtime", { const: BLOCK_HEADER_SCHEMA }), + chainId: prop("runtime", commonDefs.uintString), + networkProfile: prop("runtime", commonDefs.networkProfile), + genesisHash: prop("runtime", commonDefs.hex32), + height: prop("runtime", commonDefs.uintString), + parentHash: prop("runtime", commonDefs.hex32), + timestamp: prop("runtime", commonDefs.isoTime), + proposer: prop("consensus", commonDefs.hex32), + txRoot: prop("runtime", commonDefs.hex32), + receiptRoot: prop("runtime", commonDefs.hex32), + eventRoot: prop("runtime", commonDefs.hex32), + stateRoot: prop("runtime", commonDefs.hex32), + evidenceRoot: prop("runtime", commonDefs.hex32), + finalizedHeight: prop("consensus", commonDefs.uintString), + protocolVersion: prop("protocol", { const: PROTOCOL_VERSION }), + blockHash: prop("crypto", commonDefs.hex32) + }, + "$defs": commonDefs + }); +} + +function buildBridgeEvidenceSchema(commonDefs) { + return schemaDoc("production-bridge-evidence.schema.json", "FlowChain Bridge Evidence V0", { + type: "object", + additionalProperties: false, + required: ["schema", "evidenceId", "evidenceType", "sourceChainId", "sourceNetwork", "lockboxAddress", "sourceTxHash", "sourceBlockNumber", "sourceLogIndex", "tokenAddress", "assetId", "depositorAddress", "localRecipientAccountId", "amount", "observationId", "creditId", "duplicateKey", "evidenceHash", "observedByRelayerAccountId", "finalityStatus", "release", "localOnly", "productionReady"], + properties: { + schema: prop("bridge", { const: BRIDGE_EVIDENCE_SCHEMA }), + evidenceId: prop("bridge", commonDefs.hex32), + evidenceType: prop("bridge", { enum: ["deposit_observation", "withdrawal_release"] }), + sourceChainId: prop("bridge", { type: "integer", enum: [31337, 84532, 8453] }), + sourceNetwork: prop("bridge", { enum: ["base-mainnet-source-for-local-private-pilot", "base-sepolia-test-source", "local-anvil-test-source"] }), + lockboxAddress: prop("bridge", commonDefs.address), + sourceTxHash: prop("bridge", commonDefs.hex32), + sourceBlockNumber: prop("bridge", commonDefs.uintString), + sourceLogIndex: prop("bridge", { type: "integer", minimum: 0 }), + tokenAddress: prop("bridge", commonDefs.address), + assetId: prop("bridge", commonDefs.hex32), + depositorAddress: prop("bridge", commonDefs.address), + localRecipientAccountId: prop("bridge", commonDefs.hex32), + amount: prop("bridge", commonDefs.uintString), + observationId: prop("bridge", commonDefs.hex32), + creditId: prop("bridge", commonDefs.hex32), + duplicateKey: prop("bridge", commonDefs.hex32), + evidenceHash: prop("bridge", commonDefs.hex32), + observedByRelayerAccountId: prop("bridge", commonDefs.hex32), + finalityStatus: prop("bridge", { enum: ["source_finalized", "source_pending", "source_rejected"] }), + release: prop("bridge", { + anyOf: [ + { + type: "object", + additionalProperties: false, + required: ["withdrawalIntentId", "releaseTxHash", "releaseBlockNumber", "releaseLogIndex", "releasedToAddress", "releaseAuthorityAccountId"], + properties: { + withdrawalIntentId: prop("bridge", commonDefs.hex32), + releaseTxHash: prop("bridge", commonDefs.hex32), + releaseBlockNumber: prop("bridge", commonDefs.uintString), + releaseLogIndex: prop("bridge", { type: "integer", minimum: 0 }), + releasedToAddress: prop("bridge", commonDefs.address), + releaseAuthorityAccountId: prop("bridge", commonDefs.hex32) + } + }, + { type: "null" } + ] + }), + localOnly: prop("hq-review", { const: true }), + productionReady: prop("hq-review", { const: false }) + }, + allOf: [ + { + if: { properties: { evidenceType: { const: "withdrawal_release" } } }, + then: { properties: { release: { type: "object" } } } + }, + { + if: { properties: { evidenceType: { const: "deposit_observation" } } }, + then: { properties: { release: { type: "null" } } } + } + ], + "$defs": commonDefs + }); +} + +function buildStateRootSchema(commonDefs) { + return schemaDoc("production-state-root-manifest.schema.json", "FlowChain State Root Manifest V0", { + type: "object", + additionalProperties: false, + required: ["schema", "chainId", "networkProfile", "genesisHash", "stateRoot", "stateRootAlgorithm", "components", "stateComponents", "deterministicReplay"], + properties: { + schema: prop("runtime", { const: STATE_ROOT_SCHEMA }), + chainId: prop("runtime", commonDefs.uintString), + networkProfile: prop("runtime", commonDefs.networkProfile), + genesisHash: prop("runtime", commonDefs.hex32), + stateRoot: prop("crypto", commonDefs.hex32), + stateRootAlgorithm: prop("crypto", { const: "keccak256(canonical-json-sorted-keys-v0)" }), + components: prop("runtime", { + type: "array", + minItems: STATE_COMPONENTS.length, + items: { + type: "object", + additionalProperties: false, + required: ["component", "root", "count", "ownerAgent", "inputs"], + properties: { + component: prop("runtime", commonDefs.stateComponent), + root: prop("crypto", commonDefs.hex32), + count: prop("runtime", { type: "integer", minimum: 0 }), + ownerAgent: prop("protocol", { enum: ["runtime", "wallet", "bridge", "consensus", "indexer"] }), + inputs: prop("runtime", { type: "array", items: { type: "string", minLength: 1 }, minItems: 1 }) + } + } + }), + stateComponents: prop("runtime", { + type: "object", + additionalProperties: true, + required: STATE_COMPONENTS + }), + deterministicReplay: prop("runtime", { + type: "object", + additionalProperties: false, + required: ["sameLogicalStateRoot", "replayCommand"], + properties: { + sameLogicalStateRoot: prop("runtime", commonDefs.hex32), + replayCommand: prop("runtime", { type: "string", minLength: 1 }) + } + }) + }, + "$defs": commonDefs + }); +} + +function buildFinalitySchema(commonDefs) { + return schemaDoc("production-finality-receipt.schema.json", "FlowChain Finality Receipt V0", { + type: "object", + additionalProperties: false, + required: ["schema", "finalityReceiptId", "chainId", "networkProfile", "height", "blockHash", "stateRoot", "finalizedHeight", "finalityRule", "status", "validatorSetHash", "certificateHash", "evidenceRoot", "producedAt", "productionReady"], + properties: { + schema: prop("consensus", { const: FINALITY_SCHEMA }), + finalityReceiptId: prop("consensus", commonDefs.hex32), + chainId: prop("consensus", commonDefs.uintString), + networkProfile: prop("consensus", commonDefs.networkProfile), + height: prop("consensus", commonDefs.uintString), + blockHash: prop("consensus", commonDefs.hex32), + stateRoot: prop("consensus", commonDefs.hex32), + finalizedHeight: prop("consensus", commonDefs.uintString), + finalityRule: prop("consensus", { enum: ["single_authority_instant", "quorum_2f_plus_1_checkpoint", "source_base_confirmed_destination_local_finalized"] }), + status: prop("consensus", { enum: ["pending", "accepted", "rejected", "superseded", "downgraded"] }), + validatorSetHash: prop("consensus", commonDefs.hex32), + certificateHash: prop("consensus", commonDefs.hex32), + evidenceRoot: prop("consensus", commonDefs.hex32), + producedAt: prop("consensus", commonDefs.isoTime), + productionReady: prop("hq-review", { const: false }) + }, + "$defs": commonDefs + }); +} + +function buildBlockBodySchema(commonDefs) { + return schemaDoc("production-block-body.schema.json", "FlowChain Block Body V0", { + type: "object", + additionalProperties: false, + required: ["schema", "header", "transactions", "receipts", "events", "bridgeEvidence", "stateRootManifest"], + properties: { + schema: prop("runtime", { const: BLOCK_BODY_SCHEMA }), + header: prop("runtime", ref("production-block-header.schema.json")), + transactions: prop("runtime", { type: "array", minItems: 1, items: ref("production-transaction-envelope.schema.json") }), + receipts: prop("runtime", { type: "array", minItems: 1, items: ref("production-receipt.schema.json") }), + events: prop("indexer", { type: "array", minItems: 1, items: ref("production-event.schema.json") }), + bridgeEvidence: prop("bridge", { type: "array", items: ref("production-bridge-evidence.schema.json") }), + stateRootManifest: prop("runtime", ref("production-state-root-manifest.schema.json")) + }, + "$defs": commonDefs + }); +} + +function buildExportSnapshotSchema(commonDefs) { + return schemaDoc("production-export-snapshot.schema.json", "FlowChain Export Snapshot V0", { + type: "object", + additionalProperties: false, + required: ["schema", "chainId", "networkProfile", "genesisHash", "blockHeight", "blockHash", "stateRoot", "stateRootManifest", "accounts", "balances", "tokens", "pools", "bridgeCredits", "withdrawals", "objectStoreRefs", "finalityReceipts", "provenance", "productionReady"], + properties: { + schema: prop("runtime", { const: EXPORT_SNAPSHOT_SCHEMA }), + chainId: prop("runtime", commonDefs.uintString), + networkProfile: prop("runtime", commonDefs.networkProfile), + genesisHash: prop("runtime", commonDefs.hex32), + blockHeight: prop("runtime", commonDefs.uintString), + blockHash: prop("runtime", commonDefs.hex32), + stateRoot: prop("runtime", commonDefs.hex32), + stateRootManifest: prop("runtime", ref("production-state-root-manifest.schema.json")), + accounts: prop("wallet", { type: "array", items: ref("production-account-public-metadata.schema.json") }), + balances: prop("runtime", { type: "array" }), + tokens: prop("runtime", { type: "array" }), + pools: prop("runtime", { type: "array" }), + bridgeCredits: prop("bridge", { type: "array" }), + withdrawals: prop("bridge", { type: "array" }), + objectStoreRefs: prop("runtime", { type: "array" }), + finalityReceipts: prop("consensus", { type: "array", items: ref("production-finality-receipt.schema.json") }), + provenance: prop("rpc", { + type: "object", + additionalProperties: false, + required: ["generatedBy", "schemaNames", "fixturePaths", "validationCommands"], + properties: { + generatedBy: prop("rpc", { type: "string", minLength: 1 }), + schemaNames: prop("rpc", { type: "array", items: { type: "string" }, minItems: 1 }), + fixturePaths: prop("rpc", { type: "array", items: { type: "string" }, minItems: 1 }), + validationCommands: prop("rpc", { type: "array", items: { type: "string" }, minItems: 1 }) + } + }), + productionReady: prop("hq-review", { const: false }) + }, + "$defs": commonDefs + }); +} + +function buildProfiles() { + const genesisInputFields = [ + "protocolVersion", + "networkProfile", + "chainId", + "genesisTimestamp", + "stateRootSeed", + "initialAccountsRoot", + "initialBalancesRoot", + "validatorSetRoot", + "bridgePilotConfigHash", + "tokenDexBootstrapConfigHash" + ]; + const base = { + schema: PROFILE_SCHEMA, + destinationScope: "local_private", + genesisHashRules: { + hashAlgorithm: "keccak256", + canonicalization: "canonical-json-sorted-keys-v0", + domain: "flowchain.production_l1.genesis_hash.v0", + inputFields: genesisInputFields + }, + allowedTransactionFamilies: PAYLOAD_TYPES, + productionReady: false, + publicMainnetReady: false + }; + return [ + { + ...base, + profileId: "flowchain-local-private", + legacyAliases: ["flowchain-local"], + chainId: "742001", + networkName: "FlowChain Local Private", + allowedBridgeSourceChainIds: [31337], + finalityRule: { rule: "single_authority_instant", requiredConfirmations: 0, quorum: "1/1" }, + blockTimeTargetMs: 1000, + defaultDataDirectory: "devnet/local/flowchain-local-private" + }, + { + ...base, + profileId: "flowchain-local-multinode", + legacyAliases: ["flowchain-private-lan"], + chainId: "742002", + networkName: "FlowChain Local Multinode", + allowedBridgeSourceChainIds: [31337, 84532], + finalityRule: { rule: "quorum_2f_plus_1_checkpoint", requiredConfirmations: 1, quorum: "2/3" }, + blockTimeTargetMs: 2000, + defaultDataDirectory: "devnet/local/flowchain-local-multinode" + }, + { + ...base, + profileId: "flowchain-base8453-pilot", + legacyAliases: [], + chainId: "7428453", + networkName: "FlowChain Base 8453 Pilot Destination", + allowedBridgeSourceChainIds: [8453], + finalityRule: { rule: "source_base_confirmed_destination_local_finalized", requiredConfirmations: 12, quorum: "1/1" }, + blockTimeTargetMs: 2000, + defaultDataDirectory: "devnet/local/flowchain-base8453-pilot" + } + ]; +} + +function buildAll() { + const profiles = buildProfiles(); + const profile = profiles.find((entry) => entry.profileId === "flowchain-base8453-pilot"); + const accounts = buildAccounts(profile); + const accountByLabel = Object.fromEntries(accounts.map((account) => [account.label, account])); + const nativeAssetId = hashJson("flowchain.production_l1.asset_id.v0", { symbol: "FLOW-LOCAL", profileId: profile.profileId }); + const tokenId = hashJson("flowchain.production_l1.token_id.v0", { symbol: "FLOWT", profileId: profile.profileId }); + const poolId = hashJson("flowchain.production_l1.pool_id.v0", { baseAssetId: nativeAssetId, quoteAssetId: tokenId }); + const initialBalances = [ + balance(accountByLabel["alice-user"].accountId, nativeAssetId, "1000000"), + balance(accountByLabel["bob-user"].accountId, nativeAssetId, "100000"), + balance(accountByLabel["validator-one"].accountId, nativeAssetId, "50000"), + balance(accountByLabel["bridge-relayer"].accountId, nativeAssetId, "25000") + ]; + const validatorSet = [ + authority(accountByLabel["validator-one"], "validator", "1", "1") + ]; + const bridgePilotConfig = { + enabled: true, + sourceChainId: 8453, + sourceNetwork: "base-mainnet-source-for-local-private-pilot", + destinationProfile: "flowchain-base8453-pilot", + lockboxAddress: addressFor("bridge-lockbox-base-8453"), + releaseAuthorityAccountId: accountByLabel["bridge-release-authority"].accountId, + relayerAccountId: accountByLabel["bridge-relayer"].accountId, + duplicatePolicy: "reject_same_source_chain_lockbox_tx_hash_log_index", + productionReady: false + }; + const tokenDexBootstrapConfig = { + nativeAssetId, + localTokenLaunchAllowed: true, + localTokenMintAllowed: true, + dexBootstrapAllowed: true, + defaultFeeBps: 30, + productionReady: false + }; + const genesisInput = { + schema: GENESIS_INPUT_SCHEMA, + protocolVersion: PROTOCOL_VERSION, + networkProfile: profile.profileId, + chainId: profile.chainId, + networkName: profile.networkName, + genesisTimestamp: "2026-05-13T15:00:00.000Z", + genesisUnixMs: "1778684400000", + stateRootSeed: hashJson("flowchain.production_l1.state_root_seed.v0", { profileId: profile.profileId, chainId: profile.chainId }), + initialAccounts: accounts, + initialBalances, + validatorSet, + bridgePilotConfig, + tokenDexBootstrapConfig, + productionReady: false + }; + const genesis = buildGenesisFromInput(genesisInput); + const bridgeEvidence = buildBridgeEvidence(genesis, accountByLabel, nativeAssetId); + const transactionSet = buildTransactions(genesis, profile, accountByLabel, { nativeAssetId, tokenId, poolId, bridgeEvidence }); + const receiptsAndEvents = buildReceiptsAndEvents(transactionSet.transactions, bridgeEvidence); + const stateRootManifest = buildStateRootManifest(genesis, transactionSet, receiptsAndEvents, bridgeEvidence, { nativeAssetId, tokenId, poolId }); + const block = buildBlock(genesis, profile, accountByLabel, transactionSet.transactions, receiptsAndEvents.receipts, receiptsAndEvents.events, bridgeEvidence, stateRootManifest); + const finalityReceipt = buildFinalityReceipt(genesis, profile, accountByLabel, block); + const exportSnapshot = buildExportSnapshot(genesis, block, stateRootManifest, finalityReceipt, { nativeAssetId, tokenId, poolId }); + const negativeFixtures = buildNegativeFixtures(genesis, profile, transactionSet.transactions, stateRootManifest, bridgeEvidence); + return { + profiles, + genesisInput, + genesis, + transactions: transactionSet.transactions, + receipts: receiptsAndEvents.receipts, + events: receiptsAndEvents.events, + bridgeEvidence, + stateRootManifest, + block, + finalityReceipt, + exportSnapshot, + negativeFixtures + }; +} + +function buildGenesisFromInput(input) { + const initialAccountsRoot = hashJson("flowchain.production_l1.genesis_accounts_root.v0", input.initialAccounts); + const initialBalancesRoot = hashJson("flowchain.production_l1.genesis_balances_root.v0", input.initialBalances); + const validatorSetRoot = hashJson("flowchain.production_l1.genesis_validator_set_root.v0", input.validatorSet); + const bridgePilotConfigHash = hashJson("flowchain.production_l1.bridge_pilot_config.v0", input.bridgePilotConfig); + const tokenDexBootstrapConfigHash = hashJson("flowchain.production_l1.token_dex_bootstrap_config.v0", input.tokenDexBootstrapConfig); + const genesisHashInput = { + schema: "flowchain.production_l1.genesis_hash_input.v0", + protocolVersion: input.protocolVersion, + networkProfile: input.networkProfile, + chainId: input.chainId, + genesisTimestamp: input.genesisTimestamp, + stateRootSeed: input.stateRootSeed, + initialAccountsRoot, + initialBalancesRoot, + validatorSetRoot, + bridgePilotConfigHash, + tokenDexBootstrapConfigHash + }; + return { + schema: GENESIS_SCHEMA, + protocolVersion: input.protocolVersion, + networkProfile: input.networkProfile, + chainId: input.chainId, + networkName: input.networkName, + genesisTimestamp: input.genesisTimestamp, + genesisUnixMs: input.genesisUnixMs, + stateRootSeed: input.stateRootSeed, + initialAccounts: input.initialAccounts, + initialBalances: input.initialBalances, + validatorSet: input.validatorSet, + bridgePilotConfig: input.bridgePilotConfig, + tokenDexBootstrapConfig: input.tokenDexBootstrapConfig, + genesisHashInput, + genesisHash: hashJson("flowchain.production_l1.genesis_hash.v0", genesisHashInput), + productionReady: false + }; +} + +function buildAccounts(profile) { + return [ + account("alice-user", profile, { user: true, validator: false, bridgeOperator: false, deployer: true, relayer: false, emergencyOperator: false }), + account("bob-user", profile, { user: true, validator: false, bridgeOperator: false, deployer: false, relayer: false, emergencyOperator: false }), + account("validator-one", profile, { user: false, validator: true, bridgeOperator: false, deployer: false, relayer: false, emergencyOperator: false }), + account("bridge-relayer", profile, { user: false, validator: false, bridgeOperator: true, deployer: false, relayer: true, emergencyOperator: false }), + account("bridge-release-authority", profile, { user: false, validator: false, bridgeOperator: true, deployer: false, relayer: false, emergencyOperator: false }), + account("emergency-operator", profile, { user: false, validator: false, bridgeOperator: false, deployer: false, relayer: false, emergencyOperator: true }) + ]; +} + +function account(label, profile, roleFlags) { + const publicKey = publicKeyFor(label); + const accountId = hashJson("flowchain.production_l1.account_id.v0", { label, publicKey, chainId: profile.chainId, networkProfile: profile.profileId }); + return { + schema: ACCOUNT_SCHEMA, + accountId, + label, + publicKey, + address: addressFor(`${label}:${profile.chainId}:${profile.profileId}`), + addressDerivation: { + algorithm: "keccak256(compressedSecp256k1PublicKey)[12:32]", + preimageFields: ["publicKey", "chainId", "networkProfile"], + chainIdBinding: true + }, + nonceDomain: { + domainId: hashJson("flowchain.production_l1.nonce_domain.v0", { accountId, chainId: profile.chainId, networkProfile: profile.profileId }), + nextNonce: "1", + replayScope: "chainId+networkProfile+genesisHash+accountId" + }, + roleFlags, + metadataHash: hashJson("flowchain.production_l1.account_metadata.v0", { label, roleFlags }), + status: "active", + productionReady: false + }; +} + +function publicKeyFor(label) { + return `0x02${hashJson("flowchain.production_l1.public_key_fixture.v0", { label }).slice(2)}`; +} + +function addressFor(label) { + return `0x${hashJson("flowchain.production_l1.address_fixture.v0", { label }).slice(-40)}`; +} + +function balance(accountId, assetId, amount) { + return { accountId, assetId, amount, balanceType: "native_local_unit", noValue: true }; +} + +function authority(account, authorityType, votingPower, finalityWeight) { + return { + schema: AUTHORITY_SCHEMA, + authorityId: hashJson("flowchain.production_l1.authority_id.v0", { accountId: account.accountId, authorityType }), + accountId: account.accountId, + publicKey: account.publicKey, + address: account.address, + authorityType, + votingPower, + finalityWeight, + metadataHash: hashJson("flowchain.production_l1.authority_metadata.v0", { accountId: account.accountId, authorityType }), + status: "active", + productionReady: false + }; +} + +function buildBridgeEvidence(genesis, accounts, nativeAssetId) { + const depositCore = { + evidenceType: "deposit_observation", + sourceChainId: 8453, + sourceNetwork: "base-mainnet-source-for-local-private-pilot", + lockboxAddress: genesis.bridgePilotConfig.lockboxAddress, + sourceTxHash: hashJson("flowchain.production_l1.source_tx_hash.v0", { name: "base-deposit-1" }), + sourceBlockNumber: "45960000", + sourceLogIndex: 7, + tokenAddress: addressFor("base-usdc-token"), + assetId: nativeAssetId, + depositorAddress: addressFor("base-depositor-alice"), + localRecipientAccountId: accounts["bob-user"].accountId, + amount: "2500000", + observedByRelayerAccountId: accounts["bridge-relayer"].accountId, + finalityStatus: "source_finalized" + }; + const observationId = hashJson("flowchain.production_l1.bridge_observation_id.v0", sourceEventKey(depositCore)); + const creditId = hashJson("flowchain.production_l1.bridge_credit_id.v0", { + observationId, + localRecipientAccountId: depositCore.localRecipientAccountId, + amount: depositCore.amount, + assetId: depositCore.assetId + }); + const deposit = finishBridgeEvidence({ + ...depositCore, + observationId, + creditId, + release: null + }); + + const releaseCore = { + evidenceType: "withdrawal_release", + sourceChainId: 8453, + sourceNetwork: "base-mainnet-source-for-local-private-pilot", + lockboxAddress: genesis.bridgePilotConfig.lockboxAddress, + sourceTxHash: hashJson("flowchain.production_l1.source_tx_hash.v0", { name: "base-release-1" }), + sourceBlockNumber: "45960120", + sourceLogIndex: 11, + tokenAddress: addressFor("base-usdc-token"), + assetId: nativeAssetId, + depositorAddress: addressFor("base-lockbox-release"), + localRecipientAccountId: accounts["bob-user"].accountId, + amount: "100000", + observedByRelayerAccountId: accounts["bridge-relayer"].accountId, + finalityStatus: "source_finalized", + release: { + withdrawalIntentId: hashJson("flowchain.production_l1.withdrawal_intent_id.v0", { accountId: accounts["bob-user"].accountId, amount: "100000" }), + releaseTxHash: hashJson("flowchain.production_l1.release_tx_hash.v0", { name: "base-release-1" }), + releaseBlockNumber: "45960120", + releaseLogIndex: 11, + releasedToAddress: addressFor("base-withdrawal-recipient-bob"), + releaseAuthorityAccountId: accounts["bridge-release-authority"].accountId + } + }; + const releaseObservationId = hashJson("flowchain.production_l1.bridge_observation_id.v0", sourceEventKey(releaseCore)); + const releaseCreditId = hashJson("flowchain.production_l1.bridge_credit_id.v0", { + observationId: releaseObservationId, + localRecipientAccountId: releaseCore.localRecipientAccountId, + amount: releaseCore.amount, + assetId: releaseCore.assetId + }); + const release = finishBridgeEvidence({ + ...releaseCore, + observationId: releaseObservationId, + creditId: releaseCreditId + }); + return [deposit, release]; +} + +function finishBridgeEvidence(evidence) { + const duplicateKey = hashJson("flowchain.production_l1.bridge_duplicate_key.v0", sourceEventKey(evidence)); + const evidenceHash = hashJson("flowchain.production_l1.bridge_evidence_hash.v0", { ...evidence, duplicateKey }); + return { + schema: BRIDGE_EVIDENCE_SCHEMA, + evidenceId: hashJson("flowchain.production_l1.bridge_evidence_id.v0", { evidenceHash }), + ...evidence, + duplicateKey, + evidenceHash, + localOnly: true, + productionReady: false + }; +} + +function sourceEventKey(evidence) { + return { + sourceChainId: evidence.sourceChainId, + lockboxAddress: evidence.lockboxAddress, + sourceTxHash: evidence.sourceTxHash, + sourceLogIndex: evidence.sourceLogIndex + }; +} + +function buildTransactions(genesis, profile, accounts, ids) { + const nonce = Object.fromEntries(Object.values(accounts).map((account) => [account.accountId, 1n])); + const txs = []; + const add = (label, role, payloadType, details, eventTypes, balanceChanges = []) => { + const account = accounts[label]; + const current = nonce[account.accountId]; + const payload = makePayload(payloadType, account.accountId, current, details, eventTypes, balanceChanges); + txs.push(makeEnvelope(genesis, profile, account, role, payload)); + nonce[account.accountId] = current + 1n; + }; + + add("alice-user", "user", "native_transfer", { + fromAccountId: accounts["alice-user"].accountId, + toAccountId: accounts["bob-user"].accountId, + assetId: ids.nativeAssetId, + amount: "10000", + memoHash: hashJson("memo", "native-transfer") + }, ["NativeTransferRecorded"], [ + { accountId: accounts["alice-user"].accountId, assetId: ids.nativeAssetId, delta: "-10000" }, + { accountId: accounts["bob-user"].accountId, assetId: ids.nativeAssetId, delta: "10000" } + ]); + add("alice-user", "deployer", "faucet_funding", { + faucetId: hashJson("faucet", "bob-local-funding"), + toAccountId: accounts["bob-user"].accountId, + assetId: ids.nativeAssetId, + amount: "5000", + reasonHash: hashJson("reason", "local-test-funding"), + localOnly: true + }, ["FaucetFundingRecorded"], [ + { accountId: accounts["bob-user"].accountId, assetId: ids.nativeAssetId, delta: "5000" } + ]); + add("bridge-relayer", "relayer", "bridge_credit", { + bridgeEvidenceId: ids.bridgeEvidence[0].evidenceId, + observationId: ids.bridgeEvidence[0].observationId, + creditId: ids.bridgeEvidence[0].creditId, + sourceChainId: 8453, + assetId: ids.nativeAssetId, + amount: ids.bridgeEvidence[0].amount, + recipientAccountId: accounts["bob-user"].accountId + }, ["BridgeCreditApplied"], [ + { accountId: accounts["bob-user"].accountId, assetId: ids.nativeAssetId, delta: ids.bridgeEvidence[0].amount } + ]); + add("alice-user", "deployer", "token_launch", { + tokenLaunchId: hashJson("token-launch", "FLOWT"), + issuerAccountId: accounts["alice-user"].accountId, + tokenId: ids.tokenId, + symbol: "FLOWT", + name: "FlowChain Local Test Token", + decimals: 6, + metadataHash: hashJson("token-metadata", "FLOWT"), + initialSupply: "1000000000", + recipientAccountId: accounts["alice-user"].accountId + }, ["TokenLaunched"], [ + { accountId: accounts["alice-user"].accountId, assetId: ids.tokenId, delta: "1000000000" } + ]); + add("alice-user", "deployer", "token_mint", { + mintId: hashJson("token-mint", "bob-FLOWT"), + tokenId: ids.tokenId, + toAccountId: accounts["bob-user"].accountId, + amount: "250000", + reasonHash: hashJson("mint-reason", "local-test-mode"), + localOrTestMode: true + }, ["TokenMinted"], [ + { accountId: accounts["bob-user"].accountId, assetId: ids.tokenId, delta: "250000" } + ]); + add("alice-user", "user", "token_transfer", { + tokenTransferId: hashJson("token-transfer", "alice-to-bob-FLOWT"), + tokenId: ids.tokenId, + fromAccountId: accounts["alice-user"].accountId, + toAccountId: accounts["bob-user"].accountId, + amount: "50000", + memoHash: hashJson("memo", "token-transfer") + }, ["TokenTransferred"], [ + { accountId: accounts["alice-user"].accountId, assetId: ids.tokenId, delta: "-50000" }, + { accountId: accounts["bob-user"].accountId, assetId: ids.tokenId, delta: "50000" } + ]); + add("alice-user", "deployer", "pool_create", { + poolCreateId: hashJson("pool-create", ids.poolId), + creatorAccountId: accounts["alice-user"].accountId, + poolId: ids.poolId, + baseAssetId: ids.nativeAssetId, + quoteAssetId: ids.tokenId, + feeBps: 30, + tickSpacing: 1, + metadataHash: hashJson("pool-metadata", ids.poolId) + }, ["PoolCreated"]); + add("alice-user", "user", "add_liquidity", { + liquidityId: hashJson("liquidity-add", ids.poolId), + poolId: ids.poolId, + providerAccountId: accounts["alice-user"].accountId, + baseAmount: "100000", + quoteAmount: "5000000", + minLpUnits: "1" + }, ["LiquidityAdded"], [ + { accountId: accounts["alice-user"].accountId, assetId: ids.nativeAssetId, delta: "-100000" }, + { accountId: accounts["alice-user"].accountId, assetId: ids.tokenId, delta: "-5000000" } + ]); + add("alice-user", "user", "remove_liquidity", { + liquidityId: hashJson("liquidity-remove", ids.poolId), + poolId: ids.poolId, + providerAccountId: accounts["alice-user"].accountId, + lpUnits: "100", + minBaseAmount: "1", + minQuoteAmount: "1" + }, ["LiquidityRemoved"], [ + { accountId: accounts["alice-user"].accountId, assetId: ids.nativeAssetId, delta: "2000" }, + { accountId: accounts["alice-user"].accountId, assetId: ids.tokenId, delta: "100000" } + ]); + add("bob-user", "user", "swap", { + swapId: hashJson("swap", "bob-native-to-FLOWT"), + poolId: ids.poolId, + traderAccountId: accounts["bob-user"].accountId, + assetInId: ids.nativeAssetId, + assetOutId: ids.tokenId, + amountIn: "1000", + minAmountOut: "40000", + routeHash: hashJson("route", [ids.nativeAssetId, ids.tokenId]) + }, ["SwapExecuted"], [ + { accountId: accounts["bob-user"].accountId, assetId: ids.nativeAssetId, delta: "-1000" }, + { accountId: accounts["bob-user"].accountId, assetId: ids.tokenId, delta: "49000" } + ]); + add("bob-user", "user", "withdrawal_intent", { + withdrawalIntentId: ids.bridgeEvidence[1].release.withdrawalIntentId, + sourceAccountId: accounts["bob-user"].accountId, + destinationChainId: 8453, + destinationAddress: ids.bridgeEvidence[1].release.releasedToAddress, + assetId: ids.nativeAssetId, + amount: "100000", + releasePolicyHash: hashJson("release-policy", "bridge-release-authority") + }, ["WithdrawalIntentRecorded"], [ + { accountId: accounts["bob-user"].accountId, assetId: ids.nativeAssetId, delta: "-100000" } + ]); + add("validator-one", "validator", "validator_authority_config", { + authorityConfigId: hashJson("authority-config", "validator-one"), + authorityId: genesis.validatorSet[0].authorityId, + validatorAccountId: accounts["validator-one"].accountId, + action: "update", + authorityType: "validator", + votingPower: "1", + metadataHash: hashJson("authority-metadata", "validator-one-update") + }, ["ValidatorAuthorityConfigured"]); + add("validator-one", "validator", "finality_vote", { + voteId: hashJson("finality-vote", "height-1"), + validatorAccountId: accounts["validator-one"].accountId, + height: "1", + blockHash: hashJson("pre-final-block-hash", "height-1"), + stateRoot: hashJson("pre-final-state-root", "height-1"), + voteRound: "1" + }, ["FinalityVoteRecorded"]); + add("validator-one", "validator", "finality_certificate", { + certificateId: hashJson("finality-certificate", "height-1"), + height: "1", + blockHash: hashJson("pre-final-block-hash", "height-1"), + stateRoot: hashJson("pre-final-state-root", "height-1"), + signerSetRoot: hashJson("validator-set", genesis.validatorSet), + voteIds: [hashJson("finality-vote", "height-1")], + quorumNumerator: 1, + quorumDenominator: 1 + }, ["FinalityCertificateRecorded"]); + + for (const payloadType of OBJECT_PAYLOAD_TYPES) { + const objectType = objectTypeForPayload(payloadType); + add("alice-user", "deployer", payloadType, { + lifecycleUpdateId: hashJson("lifecycle", payloadType), + objectType, + operation: objectType === "FinalityReceipt" ? "finalize" : "create", + objectId: hashJson("object-id", objectType), + objectHash: hashJson("object-hash", objectType), + status: objectType === "Challenge" ? "resolved" : objectType === "FinalityReceipt" ? "finalized" : "active", + rootfieldId: hashJson("rootfield", "flowchain-local-core"), + sourceReceiptId: hashJson("source-receipt", objectType), + parentObjectId: null + }, ["ObjectLifecycleUpdated"]); + } + + return { transactions: txs }; +} + +function makePayload(payloadType, actorAccountId, nonce, details, emittedEventTypes, balanceChanges) { + const payloadId = hashJson("flowchain.production_l1.payload_id.v0", { payloadType, actorAccountId, nonce: nonce.toString(), details }); + return { + schema: PAYLOAD_SCHEMA, + payloadType, + payloadId, + actorAccountId, + accountNonce: nonce.toString(), + details, + preconditions: [`payload_type:${payloadType}`, `account_nonce:${nonce.toString()}`], + stateWrites: [`${payloadType}:state_write:${payloadId}`], + balanceChanges, + nonceChange: { + accountId: actorAccountId, + before: nonce.toString(), + after: (nonce + 1n).toString() + }, + emittedEventTypes, + indexKeys: [ + { key: "payloadType", value: payloadType }, + { key: "actorAccountId", value: actorAccountId } + ], + localOnly: true, + productionReady: false + }; +} + +function makeEnvelope(genesis, profile, account, role, payload) { + const payloadHash = hashJson("flowchain.production_l1.payload_hash.v0", payload); + const signingDigestInput = { + protocolVersion: PROTOCOL_VERSION, + chainId: profile.chainId, + networkProfile: profile.profileId, + genesisHash: genesis.genesisHash, + nonce: payload.accountNonce, + signerAccountId: account.accountId, + payloadType: payload.payloadType, + payloadHash + }; + const signingDigest = hashJson("flowchain.production_l1.signing_digest.v0", signingDigestInput); + const txIdInput = { + chainId: profile.chainId, + networkProfile: profile.profileId, + genesisHash: genesis.genesisHash, + nonce: payload.accountNonce, + signerAccountId: account.accountId, + payloadType: payload.payloadType, + payloadHash + }; + return { + schema: ENVELOPE_SCHEMA, + txId: hashJson("flowchain.production_l1.tx_id.v0", txIdInput), + protocolVersion: PROTOCOL_VERSION, + chainId: profile.chainId, + networkProfile: profile.profileId, + genesisHash: genesis.genesisHash, + nonce: payload.accountNonce, + nonceDomain: account.nonceDomain.domainId, + signer: { + accountId: account.accountId, + publicKey: account.publicKey, + address: account.address, + role + }, + payloadType: payload.payloadType, + payloadHash, + payload, + fee: { + mode: "local_gas_units", + gasLimit: "1000000", + maxFeePerGas: "0", + localExecutionCostLimit: "1000000" + }, + expiration: { + validAfterBlock: "0", + validUntilBlock: "100", + expiresAtUnixMs: "1778691600000" + }, + signature: { + scheme: "fixture-secp256k1-digest-only", + signingDigest, + value: `0x${signingDigest.slice(2)}${hashJson("flowchain.production_l1.signature_tail.v0", signingDigest).slice(2)}` + } + }; +} + +function buildReceiptsAndEvents(transactions, bridgeEvidence) { + const receipts = []; + const events = []; + for (const tx of transactions) { + const receiptIdInput = hashJson("flowchain.production_l1.receipt_id_input.v0", { txId: tx.txId, payloadType: tx.payloadType, status: "succeeded" }); + const receiptId = hashJson("flowchain.production_l1.receipt_id.v0", { receiptIdInput }); + const txEvents = tx.payload.emittedEventTypes.map((eventType, index) => { + const deterministicIdInput = hashJson("flowchain.production_l1.event_id_input.v0", { txId: tx.txId, receiptId, eventType, index }); + return { + schema: EVENT_SCHEMA, + eventId: hashJson("flowchain.production_l1.event_id.v0", { deterministicIdInput }), + eventType, + payloadType: tx.payloadType, + txId: tx.txId, + receiptId, + blockHeight: "1", + eventIndex: events.length + index, + emitterAccountId: tx.signer.accountId, + subjectId: subjectIdForPayload(tx.payload), + attributes: [ + { key: "payloadType", value: tx.payloadType, valueType: "string" }, + { key: "payloadId", value: tx.payload.payloadId, valueType: "hex32" } + ], + deterministicIdInput + }; + }); + events.push(...txEvents); + const evidenceRefs = tx.payloadType === "bridge_credit" ? [bridgeEvidence[0].evidenceId] : tx.payloadType === "withdrawal_intent" ? [bridgeEvidence[1].evidenceId] : []; + receipts.push({ + schema: RECEIPT_SCHEMA, + receiptId, + txId: tx.txId, + payloadType: tx.payloadType, + status: "succeeded", + executionCost: { + costUnits: (1000 + receipts.length * 10).toString(), + meter: "local_execution_units" + }, + stateDeltaRef: hashJson("flowchain.production_l1.state_delta_ref.v0", { txId: tx.txId, payloadType: tx.payloadType }), + emittedEvents: txEvents.map((event) => event.eventId), + bridgeEvidenceRefs: evidenceRefs, + errorCode: null, + failureReason: null, + deterministicIdInput: receiptIdInput + }); + } + return { receipts, events }; +} + +function subjectIdForPayload(payload) { + const details = payload.details; + return details.tokenId ?? details.poolId ?? details.creditId ?? details.withdrawalIntentId ?? details.objectId ?? details.authorityId ?? payload.payloadId; +} + +function buildStateRootManifest(genesis, transactionSet, receiptsAndEvents, bridgeEvidence, ids) { + const stateComponents = { + accounts: genesis.initialAccounts, + balances: [ + ...genesis.initialBalances, + { accountId: genesis.initialAccounts[1].accountId, assetId: ids.nativeAssetId, amount: "2640000", balanceType: "native_local_unit", noValue: true }, + { accountId: genesis.initialAccounts[0].accountId, assetId: ids.tokenId, amount: "995050000", balanceType: "test_token", noValue: true }, + { accountId: genesis.initialAccounts[1].accountId, assetId: ids.tokenId, amount: "349000", balanceType: "test_token", noValue: true } + ], + tokens: [ + { tokenId: ids.tokenId, symbol: "FLOWT", name: "FlowChain Local Test Token", decimals: 6, totalSupply: "1000250000", noValue: true } + ], + pools: [ + { poolId: ids.poolId, baseAssetId: ids.nativeAssetId, quoteAssetId: ids.tokenId, reserveBase: "99000", reserveQuote: "4951000", feeBps: 30, noValue: true } + ], + lp_positions: [ + { lpPositionId: hashJson("lp-position", ids.poolId), poolId: ids.poolId, ownerAccountId: genesis.initialAccounts[0].accountId, lpUnits: "99900", noValue: true } + ], + bridge_credits: [ + { creditId: bridgeEvidence[0].creditId, observationId: bridgeEvidence[0].observationId, accountId: bridgeEvidence[0].localRecipientAccountId, amount: bridgeEvidence[0].amount, assetId: bridgeEvidence[0].assetId } + ], + withdrawals: [ + { withdrawalIntentId: bridgeEvidence[1].release.withdrawalIntentId, accountId: bridgeEvidence[1].localRecipientAccountId, amount: bridgeEvidence[1].amount, assetId: bridgeEvidence[1].assetId, releaseEvidenceId: bridgeEvidence[1].evidenceId } + ], + object_store: transactionSet.transactions + .filter((tx) => OBJECT_PAYLOAD_TYPES.includes(tx.payloadType)) + .map((tx) => ({ + objectType: tx.payload.details.objectType, + objectId: tx.payload.details.objectId, + objectHash: tx.payload.details.objectHash, + status: tx.payload.details.status + })), + finality: [ + { height: "1", status: "accepted", certificateId: hashJson("finality-certificate", "height-1") } + ], + validator_state: genesis.validatorSet + }; + const components = STATE_COMPONENTS.map((component) => { + const entries = stateComponents[component]; + return { + component, + root: hashJson("flowchain.production_l1.state_component_root.v0", { component, entries }), + count: entries.length, + ownerAgent: ownerForStateComponent(component), + inputs: stateInputsForComponent(component) + }; + }); + const stateRoot = hashJson("flowchain.production_l1.state_root.v0", { + chainId: genesis.chainId, + networkProfile: genesis.networkProfile, + genesisHash: genesis.genesisHash, + components: components.map(({ component, root, count }) => ({ component, root, count })) + }); + return { + schema: STATE_ROOT_SCHEMA, + chainId: genesis.chainId, + networkProfile: genesis.networkProfile, + genesisHash: genesis.genesisHash, + stateRoot, + stateRootAlgorithm: "keccak256(canonical-json-sorted-keys-v0)", + components, + stateComponents, + deterministicReplay: { + sameLogicalStateRoot: stateRoot, + replayCommand: "npm run validate:production-l1-fixtures" + } + }; +} + +function ownerForStateComponent(component) { + if (component === "bridge_credits" || component === "withdrawals") return "bridge"; + if (component === "validator_state" || component === "finality") return "consensus"; + if (component === "accounts") return "wallet"; + return "runtime"; +} + +function stateInputsForComponent(component) { + const inputs = { + accounts: ["accountId", "publicKey", "address", "roleFlags", "nonceDomain"], + balances: ["accountId", "assetId", "amount"], + tokens: ["tokenId", "symbol", "decimals", "totalSupply"], + pools: ["poolId", "baseAssetId", "quoteAssetId", "reserves"], + lp_positions: ["lpPositionId", "poolId", "ownerAccountId", "lpUnits"], + bridge_credits: ["creditId", "observationId", "accountId", "assetId", "amount"], + withdrawals: ["withdrawalIntentId", "accountId", "assetId", "amount", "releaseEvidenceId"], + object_store: ["objectType", "objectId", "objectHash", "status"], + finality: ["height", "status", "certificateId"], + validator_state: ["authorityId", "accountId", "votingPower", "status"] + }; + return inputs[component]; +} + +function buildBlock(genesis, profile, accounts, transactions, receipts, events, bridgeEvidence, stateRootManifest) { + const txRoot = hashJson("flowchain.production_l1.tx_root.v0", transactions.map((tx) => tx.txId)); + const receiptRoot = hashJson("flowchain.production_l1.receipt_root.v0", receipts.map((receipt) => receipt.receiptId)); + const eventRoot = hashJson("flowchain.production_l1.event_root.v0", events.map((event) => event.eventId)); + const evidenceRoot = hashJson("flowchain.production_l1.evidence_root.v0", bridgeEvidence.map((evidence) => evidence.evidenceId)); + const headerBase = { + schema: BLOCK_HEADER_SCHEMA, + chainId: genesis.chainId, + networkProfile: genesis.networkProfile, + genesisHash: genesis.genesisHash, + height: "1", + parentHash: ZERO_HASH, + timestamp: "2026-05-13T15:00:02.000Z", + proposer: accounts["validator-one"].accountId, + txRoot, + receiptRoot, + eventRoot, + stateRoot: stateRootManifest.stateRoot, + evidenceRoot, + finalizedHeight: "0", + protocolVersion: profile ? PROTOCOL_VERSION : PROTOCOL_VERSION + }; + const header = { + ...headerBase, + blockHash: hashJson("flowchain.production_l1.block_hash.v0", headerBase) + }; + return { + schema: BLOCK_BODY_SCHEMA, + header, + transactions, + receipts, + events, + bridgeEvidence, + stateRootManifest + }; +} + +function buildFinalityReceipt(genesis, profile, accounts, block) { + const certificateHash = hashJson("flowchain.production_l1.finality_certificate_hash.v0", { + blockHash: block.header.blockHash, + stateRoot: block.header.stateRoot, + validatorSet: genesis.validatorSet + }); + return { + schema: FINALITY_SCHEMA, + finalityReceiptId: hashJson("flowchain.production_l1.finality_receipt_id.v0", { blockHash: block.header.blockHash, certificateHash }), + chainId: genesis.chainId, + networkProfile: genesis.networkProfile, + height: block.header.height, + blockHash: block.header.blockHash, + stateRoot: block.header.stateRoot, + finalizedHeight: block.header.height, + finalityRule: profile.finalityRule.rule, + status: "accepted", + validatorSetHash: hashJson("flowchain.production_l1.validator_set_hash.v0", genesis.validatorSet), + certificateHash, + evidenceRoot: block.header.evidenceRoot, + producedAt: "2026-05-13T15:00:03.000Z", + productionReady: false + }; +} + +function buildExportSnapshot(genesis, block, stateRootManifest, finalityReceipt, ids) { + return { + schema: EXPORT_SNAPSHOT_SCHEMA, + chainId: genesis.chainId, + networkProfile: genesis.networkProfile, + genesisHash: genesis.genesisHash, + blockHeight: block.header.height, + blockHash: block.header.blockHash, + stateRoot: block.header.stateRoot, + stateRootManifest, + accounts: genesis.initialAccounts, + balances: stateRootManifest.stateComponents.balances, + tokens: stateRootManifest.stateComponents.tokens, + pools: stateRootManifest.stateComponents.pools, + bridgeCredits: stateRootManifest.stateComponents.bridge_credits, + withdrawals: stateRootManifest.stateComponents.withdrawals, + objectStoreRefs: stateRootManifest.stateComponents.object_store, + finalityReceipts: [finalityReceipt], + provenance: { + generatedBy: "fixtures/production-l1/production-l1-tools.mjs", + schemaNames: Object.keys(buildSchemas()).sort(), + fixturePaths: [ + "fixtures/production-l1/profiles.json", + "fixtures/production-l1/genesis.input.json", + "fixtures/production-l1/genesis.json", + "fixtures/production-l1/transactions.valid.json", + "fixtures/production-l1/receipts.valid.json", + "fixtures/production-l1/block.valid.json", + "fixtures/production-l1/negative-fixtures.json" + ], + validationCommands: [ + "npm run validate:production-l1-protocol", + "npm run validate:production-l1-fixtures" + ] + }, + productionReady: false + }; +} + +function buildNegativeFixtures(genesis, profile, transactions, stateRootManifest, bridgeEvidence) { + const malformedByType = transactions.map((tx) => ({ + caseId: `invalid_${tx.payloadType}_malformed_payload_hash`, + fixtureKind: "transaction", + expectedErrorCode: ERROR_CODES.MALFORMED_PAYLOAD_HASH, + transaction: { ...tx, payloadHash: flipHash(tx.payloadHash) } + })); + return { + schema: "flowchain.production_l1.negative_fixture_set.v0", + cases: [ + { + caseId: "wrong_chain_transaction", + fixtureKind: "transaction", + expectedErrorCode: ERROR_CODES.WRONG_CHAIN, + transaction: { ...transactions[0], chainId: "742999" } + }, + { + caseId: "wrong_genesis_hash_transaction", + fixtureKind: "transaction", + expectedErrorCode: ERROR_CODES.WRONG_GENESIS, + transaction: { ...transactions[0], genesisHash: hashJson("wrong", "genesis") } + }, + { + caseId: "stale_nonce_transaction", + fixtureKind: "transaction", + expectedErrorCode: ERROR_CODES.STALE_NONCE, + expectedNonce: "5", + transaction: recomputeEnvelope({ ...transactions[0], nonce: "1" }) + }, + { + caseId: "duplicate_tx_transaction_set", + fixtureKind: "transaction_set", + expectedErrorCode: ERROR_CODES.DUPLICATE_TX, + transactions: [transactions[0], transactions[0]] + }, + { + caseId: "malformed_payload_hash_transaction", + fixtureKind: "transaction", + expectedErrorCode: ERROR_CODES.MALFORMED_PAYLOAD_HASH, + transaction: { ...transactions[0], payloadHash: flipHash(transactions[0].payloadHash) } + }, + { + caseId: "malformed_state_root_manifest", + fixtureKind: "state_root_manifest", + expectedErrorCode: ERROR_CODES.MALFORMED_STATE_ROOT, + stateRootManifest: { ...stateRootManifest, stateRoot: ZERO_HASH } + }, + { + caseId: "invalid_bridge_source_chain", + fixtureKind: "bridge_evidence", + expectedErrorCode: ERROR_CODES.INVALID_BRIDGE_SOURCE_CHAIN, + bridgeEvidence: { ...bridgeEvidence[0], sourceChainId: 1 } + }, + { + caseId: "duplicate_bridge_event", + fixtureKind: "bridge_evidence_set", + expectedErrorCode: ERROR_CODES.DUPLICATE_BRIDGE_EVENT, + bridgeEvidence: [ + bridgeEvidence[0], + { + ...bridgeEvidence[0], + evidenceId: hashJson("duplicate-evidence-id", bridgeEvidence[0].evidenceId) + } + ] + }, + ...malformedByType + ] + }; +} + +function recomputeEnvelope(tx) { + const payloadHash = tx.payloadHash; + const signingDigestInput = { + protocolVersion: tx.protocolVersion, + chainId: tx.chainId, + networkProfile: tx.networkProfile, + genesisHash: tx.genesisHash, + nonce: tx.nonce, + signerAccountId: tx.signer.accountId, + payloadType: tx.payloadType, + payloadHash + }; + const signingDigest = hashJson("flowchain.production_l1.signing_digest.v0", signingDigestInput); + const txIdInput = { + chainId: tx.chainId, + networkProfile: tx.networkProfile, + genesisHash: tx.genesisHash, + nonce: tx.nonce, + signerAccountId: tx.signer.accountId, + payloadType: tx.payloadType, + payloadHash + }; + return { + ...tx, + txId: hashJson("flowchain.production_l1.tx_id.v0", txIdInput), + signature: { + ...tx.signature, + signingDigest, + value: `0x${signingDigest.slice(2)}${hashJson("flowchain.production_l1.signature_tail.v0", signingDigest).slice(2)}` + } + }; +} + +function flipHash(hash) { + return `${hash.slice(0, -1)}${hash.endsWith("0") ? "1" : "0"}`; +} + +function objectTypeForPayload(payloadType) { + const map = { + agent_account_update: "AgentAccount", + model_passport_update: "ModelPassport", + work_receipt_update: "WorkReceipt", + artifact_availability_proof_update: "ArtifactAvailabilityProof", + verifier_module_update: "VerifierModule", + verifier_report_update: "VerifierReport", + memory_cell_update: "MemoryCell", + challenge_update: "Challenge", + finality_receipt_update: "FinalityReceipt" + }; + return map[payloadType]; +} + +function payloadOwner(payloadType) { + if (payloadType.includes("bridge") || payloadType === "withdrawal_intent") return "bridge"; + if (payloadType.includes("finality") || payloadType.includes("validator")) return "consensus"; + if (OBJECT_PAYLOAD_TYPES.includes(payloadType)) return "runtime"; + return "runtime"; +} + +function schemaPaths() { + return Object.keys(buildSchemas()).sort().map((name) => resolve(schemasDir, name)); +} + +function fixturePaths() { + return [ + "profiles.json", + "genesis.input.json", + "genesis.json", + "transactions.valid.json", + "receipts.valid.json", + "events.valid.json", + "bridge-evidence.valid.json", + "state-root-manifest.valid.json", + "block.valid.json", + "finality-receipt.valid.json", + "export-snapshot.valid.json", + "negative-fixtures.json" + ].map((name) => resolve(fixturesDir, name)); +} + +function writeSchemasAndFixtures() { + const schemas = buildSchemas(); + mkdirSync(schemasDir, { recursive: true }); + for (const [name, schema] of Object.entries(schemas)) { + writeJson(resolve(schemasDir, name), schema); + } + const all = buildAll(); + writeJson(resolve(fixturesDir, "profiles.json"), { schema: "flowchain.production_l1.network_profile_set.v0", profiles: all.profiles }); + writeJson(resolve(fixturesDir, "genesis.input.json"), all.genesisInput); + writeJson(resolve(fixturesDir, "genesis.json"), all.genesis); + writeJson(resolve(fixturesDir, "transactions.valid.json"), { schema: "flowchain.production_l1.transaction_fixture_set.v0", transactions: all.transactions }); + writeJson(resolve(fixturesDir, "receipts.valid.json"), { schema: "flowchain.production_l1.receipt_fixture_set.v0", receipts: all.receipts }); + writeJson(resolve(fixturesDir, "events.valid.json"), { schema: "flowchain.production_l1.event_fixture_set.v0", events: all.events }); + writeJson(resolve(fixturesDir, "bridge-evidence.valid.json"), { schema: "flowchain.production_l1.bridge_evidence_fixture_set.v0", bridgeEvidence: all.bridgeEvidence }); + writeJson(resolve(fixturesDir, "state-root-manifest.valid.json"), all.stateRootManifest); + writeJson(resolve(fixturesDir, "block.valid.json"), all.block); + writeJson(resolve(fixturesDir, "finality-receipt.valid.json"), all.finalityReceipt); + writeJson(resolve(fixturesDir, "export-snapshot.valid.json"), all.exportSnapshot); + writeJson(resolve(fixturesDir, "negative-fixtures.json"), all.negativeFixtures); + return all; +} + +async function validateProtocol() { + assertKeccak(); + const missing = schemaPaths().filter((path) => !existsSync(path)); + if (missing.length > 0) { + throw new Error(`missing required schema files: ${missing.join(", ")}`); + } + const { ajv } = await compileAjv(); + const schemas = buildSchemas(); + for (const [name, schema] of Object.entries(schemas)) { + const disk = readJson(resolve(schemasDir, name)); + if (canonicalJson(disk) !== canonicalJson(schema)) { + throw new Error(`schema drift: ${name}; run node fixtures/production-l1/production-l1-tools.mjs write`); + } + if (!ajv.getSchema(disk.$id)) { + throw new Error(`schema did not compile: ${name}`); + } + } + const profileSet = readJson(resolve(fixturesDir, "profiles.json")); + const profiles = profileSet.profiles ?? []; + assertEqualSets(profiles.map((profile) => profile.profileId), PROFILE_IDS, "profile ids"); + for (const profile of profiles) { + validateWithAjv(ajv, "production-network-profile.schema.json", profile, `profile ${profile.profileId}`); + assertEqualSets(profile.allowedTransactionFamilies, PAYLOAD_TYPES, `${profile.profileId} transaction families`); + } + return { + schemas: Object.keys(schemas).length, + profiles: profiles.length, + payloadTypes: PAYLOAD_TYPES.length + }; +} + +async function validateFixtures() { + assertKeccak(); + const { ajv } = await compileAjv(); + const profileSet = readJson(resolve(fixturesDir, "profiles.json")); + const profiles = profileSet.profiles; + const profile = profiles.find((entry) => entry.profileId === "flowchain-base8453-pilot"); + const genesisInput = readJson(resolve(fixturesDir, "genesis.input.json")); + const genesis = readJson(resolve(fixturesDir, "genesis.json")); + const transactions = readJson(resolve(fixturesDir, "transactions.valid.json")).transactions; + const receipts = readJson(resolve(fixturesDir, "receipts.valid.json")).receipts; + const events = readJson(resolve(fixturesDir, "events.valid.json")).events; + const bridgeEvidence = readJson(resolve(fixturesDir, "bridge-evidence.valid.json")).bridgeEvidence; + const stateRootManifest = readJson(resolve(fixturesDir, "state-root-manifest.valid.json")); + const block = readJson(resolve(fixturesDir, "block.valid.json")); + const finalityReceipt = readJson(resolve(fixturesDir, "finality-receipt.valid.json")); + const exportSnapshot = readJson(resolve(fixturesDir, "export-snapshot.valid.json")); + const negativeFixtures = readJson(resolve(fixturesDir, "negative-fixtures.json")); + + const rebuilt = buildAll(); + const fixtureComparisons = [ + ["profiles.json", { schema: "flowchain.production_l1.network_profile_set.v0", profiles: rebuilt.profiles }, profileSet], + ["genesis.input.json", rebuilt.genesisInput, genesisInput], + ["genesis.json", rebuilt.genesis, genesis], + ["transactions.valid.json", { schema: "flowchain.production_l1.transaction_fixture_set.v0", transactions: rebuilt.transactions }, readJson(resolve(fixturesDir, "transactions.valid.json"))], + ["receipts.valid.json", { schema: "flowchain.production_l1.receipt_fixture_set.v0", receipts: rebuilt.receipts }, readJson(resolve(fixturesDir, "receipts.valid.json"))], + ["events.valid.json", { schema: "flowchain.production_l1.event_fixture_set.v0", events: rebuilt.events }, readJson(resolve(fixturesDir, "events.valid.json"))], + ["bridge-evidence.valid.json", { schema: "flowchain.production_l1.bridge_evidence_fixture_set.v0", bridgeEvidence: rebuilt.bridgeEvidence }, readJson(resolve(fixturesDir, "bridge-evidence.valid.json"))], + ["state-root-manifest.valid.json", rebuilt.stateRootManifest, stateRootManifest], + ["block.valid.json", rebuilt.block, block], + ["finality-receipt.valid.json", rebuilt.finalityReceipt, finalityReceipt], + ["export-snapshot.valid.json", rebuilt.exportSnapshot, exportSnapshot], + ["negative-fixtures.json", rebuilt.negativeFixtures, negativeFixtures] + ]; + for (const [name, expected, actual] of fixtureComparisons) { + if (canonicalJson(expected) !== canonicalJson(actual)) { + throw new Error(`fixture drift: ${name}; run node fixtures/production-l1/production-l1-tools.mjs write`); + } + } + + for (const profileEntry of profiles) validateWithAjv(ajv, "production-network-profile.schema.json", profileEntry, `profile ${profileEntry.profileId}`); + validateWithAjv(ajv, "production-genesis.schema.json", genesis, "genesis"); + for (const account of genesis.initialAccounts) validateWithAjv(ajv, "production-account-public-metadata.schema.json", account, `account ${account.label}`); + for (const authorityEntry of genesis.validatorSet) validateWithAjv(ajv, "production-validator-authority.schema.json", authorityEntry, `authority ${authorityEntry.authorityId}`); + for (const tx of transactions) { + validateWithAjv(ajv, "production-transaction-payload.schema.json", tx.payload, `payload ${tx.payloadType}`); + validateWithAjv(ajv, "production-transaction-envelope.schema.json", tx, `tx ${tx.txId}`); + } + for (const receipt of receipts) validateWithAjv(ajv, "production-receipt.schema.json", receipt, `receipt ${receipt.receiptId}`); + for (const event of events) validateWithAjv(ajv, "production-event.schema.json", event, `event ${event.eventId}`); + for (const evidence of bridgeEvidence) validateWithAjv(ajv, "production-bridge-evidence.schema.json", evidence, `bridge evidence ${evidence.evidenceId}`); + validateWithAjv(ajv, "production-state-root-manifest.schema.json", stateRootManifest, "state root manifest"); + validateWithAjv(ajv, "production-block-body.schema.json", block, "block"); + validateWithAjv(ajv, "production-finality-receipt.schema.json", finalityReceipt, "finality receipt"); + validateWithAjv(ajv, "production-export-snapshot.schema.json", exportSnapshot, "export snapshot"); + + validateGenesisHash(genesisInput, genesis); + validateTransactionSet(transactions, genesis, profile); + validateReceiptsAndEvents(receipts, events, transactions); + validateBridgeEvidenceSet(bridgeEvidence, profile); + validateStateRootManifest(stateRootManifest); + validateBlock(block, transactions, receipts, events, bridgeEvidence, stateRootManifest); + validateFinalityReceipt(finalityReceipt, block, profile); + validateNegativeFixtures(negativeFixtures, genesis, profile); + + assertEqualSets([...new Set(transactions.map((tx) => tx.payloadType))], PAYLOAD_TYPES, "valid transaction payload type coverage"); + const invalidTypes = negativeFixtures.cases + .filter((entry) => entry.caseId.startsWith("invalid_") && entry.caseId.endsWith("_malformed_payload_hash")) + .map((entry) => entry.transaction.payloadType); + assertEqualSets([...new Set(invalidTypes)], PAYLOAD_TYPES, "invalid transaction payload type coverage"); + + return { + profiles: profiles.length, + transactions: transactions.length, + receipts: receipts.length, + events: events.length, + bridgeEvidence: bridgeEvidence.length, + negativeCases: negativeFixtures.cases.length, + stateRoot: stateRootManifest.stateRoot, + genesisHash: genesis.genesisHash + }; +} + +async function compileAjv() { + const Ajv2020 = (await import("ajv/dist/2020.js")).default; + const addFormats = (await import("ajv-formats")).default; + const ajv = new Ajv2020({ allErrors: true, strict: false }); + addFormats(ajv); + for (const path of schemaPaths()) { + if (existsSync(path)) { + ajv.addSchema(readJson(path)); + } + } + return { ajv }; +} + +function validateWithAjv(ajv, schemaName, value, label) { + const validate = ajv.getSchema(`https://flowmemory.local/schemas/flowmemory/${schemaName}`); + if (!validate) throw new Error(`missing compiled schema: ${schemaName}`); + if (!validate(value)) { + throw new Error(`${label} failed ${schemaName}: ${ajv.errorsText(validate.errors)}`); + } +} + +function validateGenesisHash(input, genesis) { + const rebuilt = buildGenesisFromInput(input); + if (rebuilt.genesisHash !== genesis.genesisHash) { + throw new Error(`genesis hash mismatch: expected ${rebuilt.genesisHash}, got ${genesis.genesisHash}`); + } +} + +function validateTransactionSet(transactions, genesis, profile) { + const seen = new Set(); + const accountMap = Object.fromEntries(genesis.initialAccounts.map((account) => [account.accountId, account])); + for (const tx of transactions) { + const error = validateTransaction(tx, genesis, profile, accountMap); + if (error) throw new Error(`${tx.txId} failed semantic validation: ${error}`); + if (seen.has(tx.txId)) throw new Error(`${ERROR_CODES.DUPLICATE_TX}: ${tx.txId}`); + seen.add(tx.txId); + } +} + +function validateTransaction(tx, genesis, profile, accountMap, options = {}) { + if (tx.chainId !== profile.chainId) return ERROR_CODES.WRONG_CHAIN; + if (tx.networkProfile !== profile.profileId) return ERROR_CODES.WRONG_PROFILE; + if (tx.genesisHash !== genesis.genesisHash) return ERROR_CODES.WRONG_GENESIS; + if (options.expectedNonce && BigInt(tx.nonce) < BigInt(options.expectedNonce)) return ERROR_CODES.STALE_NONCE; + if (!profile.allowedTransactionFamilies.includes(tx.payloadType)) return ERROR_CODES.WRONG_PROFILE; + if (tx.payload.payloadType !== tx.payloadType) return ERROR_CODES.MALFORMED_PAYLOAD_HASH; + const payloadHash = hashJson("flowchain.production_l1.payload_hash.v0", tx.payload); + if (tx.payloadHash !== payloadHash) return ERROR_CODES.MALFORMED_PAYLOAD_HASH; + const txId = hashJson("flowchain.production_l1.tx_id.v0", { + chainId: tx.chainId, + networkProfile: tx.networkProfile, + genesisHash: tx.genesisHash, + nonce: tx.nonce, + signerAccountId: tx.signer.accountId, + payloadType: tx.payloadType, + payloadHash: tx.payloadHash + }); + if (tx.txId !== txId) return ERROR_CODES.MALFORMED_TX_ID; + const account = accountMap?.[tx.signer.accountId]; + if (account && (account.publicKey !== tx.signer.publicKey || account.address !== tx.signer.address)) { + return ERROR_CODES.MALFORMED_TX_ID; + } + return null; +} + +function validateReceiptsAndEvents(receipts, events, transactions) { + const txIds = new Set(transactions.map((tx) => tx.txId)); + const eventIds = new Set(events.map((event) => event.eventId)); + for (const receipt of receipts) { + if (!txIds.has(receipt.txId)) throw new Error(`receipt references unknown tx: ${receipt.receiptId}`); + for (const eventId of receipt.emittedEvents) { + if (!eventIds.has(eventId)) throw new Error(`receipt references unknown event: ${receipt.receiptId} ${eventId}`); + } + } +} + +function validateBridgeEvidenceSet(bridgeEvidence, profile) { + const seen = new Set(); + for (const evidence of bridgeEvidence) { + if (!profile.allowedBridgeSourceChainIds.includes(evidence.sourceChainId)) { + throw new Error(`${ERROR_CODES.INVALID_BRIDGE_SOURCE_CHAIN}: ${evidence.evidenceId}`); + } + const key = canonicalJson(sourceEventKey(evidence)); + if (seen.has(key)) throw new Error(`${ERROR_CODES.DUPLICATE_BRIDGE_EVENT}: ${evidence.evidenceId}`); + seen.add(key); + } +} + +function validateStateRootManifest(manifest) { + const components = manifest.components.map((component) => { + const entries = manifest.stateComponents[component.component]; + const root = hashJson("flowchain.production_l1.state_component_root.v0", { component: component.component, entries }); + if (root !== component.root) { + throw new Error(`${ERROR_CODES.MALFORMED_STATE_ROOT}: component ${component.component}`); + } + return { component: component.component, root: component.root, count: component.count }; + }); + const stateRoot = hashJson("flowchain.production_l1.state_root.v0", { + chainId: manifest.chainId, + networkProfile: manifest.networkProfile, + genesisHash: manifest.genesisHash, + components + }); + if (stateRoot !== manifest.stateRoot || manifest.deterministicReplay.sameLogicalStateRoot !== manifest.stateRoot) { + throw new Error(`${ERROR_CODES.MALFORMED_STATE_ROOT}: state root`); + } +} + +function validateBlock(block, transactions, receipts, events, bridgeEvidence, stateRootManifest) { + const headerBase = { ...block.header }; + delete headerBase.blockHash; + const blockHash = hashJson("flowchain.production_l1.block_hash.v0", headerBase); + if (blockHash !== block.header.blockHash) throw new Error(`block hash mismatch: ${block.header.blockHash}`); + const roots = { + txRoot: hashJson("flowchain.production_l1.tx_root.v0", transactions.map((tx) => tx.txId)), + receiptRoot: hashJson("flowchain.production_l1.receipt_root.v0", receipts.map((receipt) => receipt.receiptId)), + eventRoot: hashJson("flowchain.production_l1.event_root.v0", events.map((event) => event.eventId)), + evidenceRoot: hashJson("flowchain.production_l1.evidence_root.v0", bridgeEvidence.map((evidence) => evidence.evidenceId)) + }; + for (const [field, root] of Object.entries(roots)) { + if (block.header[field] !== root) throw new Error(`block ${field} mismatch`); + } + if (block.header.stateRoot !== stateRootManifest.stateRoot) { + throw new Error(`${ERROR_CODES.MALFORMED_STATE_ROOT}: block state root`); + } +} + +function validateFinalityReceipt(finalityReceipt, block, profile) { + if (finalityReceipt.blockHash !== block.header.blockHash) throw new Error("finality receipt block hash mismatch"); + if (finalityReceipt.stateRoot !== block.header.stateRoot) throw new Error("finality receipt state root mismatch"); + if (finalityReceipt.finalityRule !== profile.finalityRule.rule) throw new Error("finality rule mismatch"); +} + +function validateNegativeFixtures(negativeFixtures, genesis, profile) { + const accountMap = Object.fromEntries(genesis.initialAccounts.map((account) => [account.accountId, account])); + for (const entry of negativeFixtures.cases) { + const actual = validateNegativeCase(entry, genesis, profile, accountMap); + if (actual !== entry.expectedErrorCode) { + throw new Error(`${entry.caseId} expected ${entry.expectedErrorCode} got ${actual}`); + } + } +} + +function validateNegativeCase(entry, genesis, profile, accountMap) { + try { + if (entry.fixtureKind === "transaction") { + return validateTransaction(entry.transaction, genesis, profile, accountMap, { expectedNonce: entry.expectedNonce }) ?? "UNEXPECTED_VALID"; + } + if (entry.fixtureKind === "transaction_set") { + const seen = new Set(); + for (const tx of entry.transactions) { + if (seen.has(tx.txId)) return ERROR_CODES.DUPLICATE_TX; + seen.add(tx.txId); + } + return "UNEXPECTED_VALID"; + } + if (entry.fixtureKind === "state_root_manifest") { + validateStateRootManifest(entry.stateRootManifest); + return "UNEXPECTED_VALID"; + } + if (entry.fixtureKind === "bridge_evidence") { + if (!profile.allowedBridgeSourceChainIds.includes(entry.bridgeEvidence.sourceChainId)) { + return ERROR_CODES.INVALID_BRIDGE_SOURCE_CHAIN; + } + return "UNEXPECTED_VALID"; + } + if (entry.fixtureKind === "bridge_evidence_set") { + const seen = new Set(); + for (const evidence of entry.bridgeEvidence) { + const key = canonicalJson(sourceEventKey(evidence)); + if (seen.has(key)) return ERROR_CODES.DUPLICATE_BRIDGE_EVENT; + seen.add(key); + } + return "UNEXPECTED_VALID"; + } + return ERROR_CODES.SCHEMA; + } catch (error) { + const message = String(error.message ?? error); + const code = Object.values(ERROR_CODES).find((entryCode) => message.includes(entryCode)); + return code ?? ERROR_CODES.SCHEMA; + } +} + +function assertEqualSets(actual, expected, label) { + const actualSorted = [...actual].sort(); + const expectedSorted = [...expected].sort(); + if (canonicalJson(actualSorted) !== canonicalJson(expectedSorted)) { + throw new Error(`${label} mismatch: expected ${expectedSorted.join(", ")} got ${actualSorted.join(", ")}`); + } +} + +function assertKeccak() { + const empty = keccakHex(""); + const abc = keccakHex("abc"); + if (empty !== "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470") { + throw new Error(`keccak self-test failed for empty string: ${empty}`); + } + if (abc !== "0x4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45") { + throw new Error(`keccak self-test failed for abc: ${abc}`); + } +} + +function printGenesisHash() { + const genesisPath = resolve(fixturesDir, "genesis.json"); + const genesis = existsSync(genesisPath) ? readJson(genesisPath) : buildAll().genesis; + console.log(genesis.genesisHash); +} + +async function main() { + const command = process.argv[2] ?? "help"; + if (command === "write") { + const all = writeSchemasAndFixtures(); + console.log(`FLOWCHAIN_PRODUCTION_L1_WRITE_OK schemas=${Object.keys(buildSchemas()).length} transactions=${all.transactions.length} negativeCases=${all.negativeFixtures.cases.length}`); + return; + } + if (command === "build-genesis") { + const all = buildAll(); + writeJson(resolve(fixturesDir, "genesis.json"), all.genesis); + console.log(`FLOWCHAIN_PRODUCTION_L1_GENESIS_BUILD_OK genesisHash=${all.genesis.genesisHash}`); + return; + } + if (command === "validate-genesis") { + const input = readJson(resolve(fixturesDir, "genesis.input.json")); + const genesis = readJson(resolve(fixturesDir, "genesis.json")); + validateGenesisHash(input, genesis); + console.log(`FLOWCHAIN_PRODUCTION_L1_GENESIS_OK genesisHash=${genesis.genesisHash}`); + return; + } + if (command === "genesis-hash") { + printGenesisHash(); + return; + } + if (command === "validate-protocol") { + const result = await validateProtocol(); + console.log(`FLOWCHAIN_PRODUCTION_L1_PROTOCOL_OK schemas=${result.schemas} profiles=${result.profiles} payloadTypes=${result.payloadTypes}`); + return; + } + if (command === "validate-fixtures") { + const result = await validateFixtures(); + console.log(`FLOWCHAIN_PRODUCTION_L1_FIXTURES_OK transactions=${result.transactions} receipts=${result.receipts} events=${result.events} bridgeEvidence=${result.bridgeEvidence} negativeCases=${result.negativeCases} genesisHash=${result.genesisHash} stateRoot=${result.stateRoot}`); + return; + } + console.log("usage: node fixtures/production-l1/production-l1-tools.mjs "); +} + +main().catch((error) => { + console.error(error instanceof Error ? error.message : error); + process.exit(1); +}); diff --git a/fixtures/production-l1/profiles.json b/fixtures/production-l1/profiles.json new file mode 100644 index 00000000..f666b418 --- /dev/null +++ b/fixtures/production-l1/profiles.json @@ -0,0 +1,196 @@ +{ + "schema": "flowchain.production_l1.network_profile_set.v0", + "profiles": [ + { + "schema": "flowchain.production_l1.network_profile.v0", + "destinationScope": "local_private", + "genesisHashRules": { + "hashAlgorithm": "keccak256", + "canonicalization": "canonical-json-sorted-keys-v0", + "domain": "flowchain.production_l1.genesis_hash.v0", + "inputFields": [ + "protocolVersion", + "networkProfile", + "chainId", + "genesisTimestamp", + "stateRootSeed", + "initialAccountsRoot", + "initialBalancesRoot", + "validatorSetRoot", + "bridgePilotConfigHash", + "tokenDexBootstrapConfigHash" + ] + }, + "allowedTransactionFamilies": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ], + "productionReady": false, + "publicMainnetReady": false, + "profileId": "flowchain-local-private", + "legacyAliases": [ + "flowchain-local" + ], + "chainId": "742001", + "networkName": "FlowChain Local Private", + "allowedBridgeSourceChainIds": [ + 31337 + ], + "finalityRule": { + "rule": "single_authority_instant", + "requiredConfirmations": 0, + "quorum": "1/1" + }, + "blockTimeTargetMs": 1000, + "defaultDataDirectory": "devnet/local/flowchain-local-private" + }, + { + "schema": "flowchain.production_l1.network_profile.v0", + "destinationScope": "local_private", + "genesisHashRules": { + "hashAlgorithm": "keccak256", + "canonicalization": "canonical-json-sorted-keys-v0", + "domain": "flowchain.production_l1.genesis_hash.v0", + "inputFields": [ + "protocolVersion", + "networkProfile", + "chainId", + "genesisTimestamp", + "stateRootSeed", + "initialAccountsRoot", + "initialBalancesRoot", + "validatorSetRoot", + "bridgePilotConfigHash", + "tokenDexBootstrapConfigHash" + ] + }, + "allowedTransactionFamilies": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ], + "productionReady": false, + "publicMainnetReady": false, + "profileId": "flowchain-local-multinode", + "legacyAliases": [ + "flowchain-private-lan" + ], + "chainId": "742002", + "networkName": "FlowChain Local Multinode", + "allowedBridgeSourceChainIds": [ + 31337, + 84532 + ], + "finalityRule": { + "rule": "quorum_2f_plus_1_checkpoint", + "requiredConfirmations": 1, + "quorum": "2/3" + }, + "blockTimeTargetMs": 2000, + "defaultDataDirectory": "devnet/local/flowchain-local-multinode" + }, + { + "schema": "flowchain.production_l1.network_profile.v0", + "destinationScope": "local_private", + "genesisHashRules": { + "hashAlgorithm": "keccak256", + "canonicalization": "canonical-json-sorted-keys-v0", + "domain": "flowchain.production_l1.genesis_hash.v0", + "inputFields": [ + "protocolVersion", + "networkProfile", + "chainId", + "genesisTimestamp", + "stateRootSeed", + "initialAccountsRoot", + "initialBalancesRoot", + "validatorSetRoot", + "bridgePilotConfigHash", + "tokenDexBootstrapConfigHash" + ] + }, + "allowedTransactionFamilies": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ], + "productionReady": false, + "publicMainnetReady": false, + "profileId": "flowchain-base8453-pilot", + "legacyAliases": [], + "chainId": "7428453", + "networkName": "FlowChain Base 8453 Pilot Destination", + "allowedBridgeSourceChainIds": [ + 8453 + ], + "finalityRule": { + "rule": "source_base_confirmed_destination_local_finalized", + "requiredConfirmations": 12, + "quorum": "1/1" + }, + "blockTimeTargetMs": 2000, + "defaultDataDirectory": "devnet/local/flowchain-base8453-pilot" + } + ] +} diff --git a/fixtures/production-l1/receipts.valid.json b/fixtures/production-l1/receipts.valid.json new file mode 100644 index 00000000..ee315ced --- /dev/null +++ b/fixtures/production-l1/receipts.valid.json @@ -0,0 +1,446 @@ +{ + "schema": "flowchain.production_l1.receipt_fixture_set.v0", + "receipts": [ + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0xaab66440be842f3a695bb4c3939c050ef52f8b73d238a3c7f0effc388e7e8d4d", + "txId": "0x18e97cdd0f9b8222ae270a034b8b26daf6d73c43c425d0593100b1d889563930", + "payloadType": "native_transfer", + "status": "succeeded", + "executionCost": { + "costUnits": "1000", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xcf625c6f805b7fba9da7c9b68741e52b9702497c08fae5c7965e44ce05b48dde", + "emittedEvents": [ + "0xc6f8e2e9c44e10a90e458a7e97baa8c21d2662bbf01c4f0617f9f52f11615ec2" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xae2106e2b4b3636ca6aea26d035901d1632f1641bf3e1d22afe370680f230c75" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x4d2f916288f57f7c89a4612d3bb30c5251b6eaae5d702000fbafa9319159ddee", + "txId": "0x74b37fa211b380912250d589cbd52a7f08ef9e34ec68bcf034ef38d07697465a", + "payloadType": "faucet_funding", + "status": "succeeded", + "executionCost": { + "costUnits": "1010", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x1eb20d6e22ed2674ec0aec53ce794eb6f6c6d6646187828ff9507d8c7c1e449a", + "emittedEvents": [ + "0x3113e8fc0d6c3cd517bd106edaf1759c05ecedbd9f269e09e1f1b5185e48a533" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x663c95dc1df22014837e55cb57fc55dac29ee716efd6eb14f9f5c589e46ff721" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x6ab4628784b485df65f9c0da7c17b74e65ef63cadecf01ef7bb167555095c173", + "txId": "0x36f329a0663b99955a5778cefa40aed22fbafedea1230e559253aef782bbe42a", + "payloadType": "bridge_credit", + "status": "succeeded", + "executionCost": { + "costUnits": "1020", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x15611c30fc281144fe3d5cc8abfdfbf11986eac503dd4af5dbd77256b237e6cd", + "emittedEvents": [ + "0x18ab2a4773227935db49d5c55f829605523fa9f792a53fcb4db56f9dda74831e" + ], + "bridgeEvidenceRefs": [ + "0x013b5052df9be23c0816f77258d50bddfad0d73eb62af5fdd96a0b45d16fee21" + ], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x81d11beec24893cc8454c41e38ef8ea5b0c5b7bb71e022166fc33e4db09967af" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x55db075836a0a940577fe6bbc9390929e41130149f85ec7742882232725a8b71", + "txId": "0x6ca72702d734aea0d6b969b8aaa3328d0862f4b21ea0a8262ccc7839468c8c65", + "payloadType": "token_launch", + "status": "succeeded", + "executionCost": { + "costUnits": "1030", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xe02d860c7dafde20cb298fb491f5d263904d7c4aaf40d427cb6c1dd76bbacc52", + "emittedEvents": [ + "0x43bc800f9038b28b8b63cbb08163fb2b254b1b292ad8a35e1345c02fbf35d26d" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x8258c11d2deb44fa14fbecc5bd9e744c6cc8ec888dac4ffea3bb71668d4ab149" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x57bd4ce1019d971caae3bc5a01c82daff0a82e8d227c004b71bc49e433361f12", + "txId": "0xc8cddac632390a6b736a7433c8fbc726028eb153517d5030ff17c94f5463a03a", + "payloadType": "token_mint", + "status": "succeeded", + "executionCost": { + "costUnits": "1040", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x4a06659e1c9f97a0d487671dd4d05b412245a5c1b5b57419ea5ed44f4d7a2a49", + "emittedEvents": [ + "0xe35c08ebb149330513eeb85e5bbc7f564e5962e12a1c1becd45907ec3d990dd7" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xddd2826a31c2344adcb3bed95c167b072436b84a9ff6e607544b7c17cc71f78c" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0xc5961f384cf1c6effa725345efde771ce45b9783b737e8de0aa7478c94607f66", + "txId": "0x8a327e611d306b367d9794000a64395c96990d9d16b93d309e149fc56a8af9e7", + "payloadType": "token_transfer", + "status": "succeeded", + "executionCost": { + "costUnits": "1050", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xff99693d7b298757481ee43c6ccf5fb60f6802335055f613a1cd624c8d03507d", + "emittedEvents": [ + "0x136b2ed86c9330e651e5f22057d0e679f79a5c9054a9baa3e7d3c815fa0a5210" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xe6dacdeefb032004e7e7566dd26c1beedf9645f230272dfe17d4615d1d3b329b" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0xf5b679bf1ca1ddf30680c5f5e336b1d7dde6afa5878a8eadfb18862f8528ecf7", + "txId": "0x459fd019e44fba8961ed3cab569eed08b906dfed8580c444002defe70b4147b4", + "payloadType": "pool_create", + "status": "succeeded", + "executionCost": { + "costUnits": "1060", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x831459db37090c02b1fb26de723e2b36a9aacfb8193053fbaa63c6afe16f6023", + "emittedEvents": [ + "0xade5c06b4eb9d2876a11cb85e3060a8e80ea53447b62f8e34e6e8ece40e9ee8b" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xcf6c6300b317e3e3632e3558e864b573bf381fef942496d7ded759bc2a46ea78" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x69a1cec77fdac4171b4d7d72ac1904f43910fa7d46b2a46dd56c7fcff7ecd142", + "txId": "0xd4d4e811d8f4e18334823af5c81ff769eb27ff6e4d88d9b2e197fd9378c54535", + "payloadType": "add_liquidity", + "status": "succeeded", + "executionCost": { + "costUnits": "1070", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xa5c8e295c1844af03094af48f1580b52b6ea38670219a136e0735bb0c1e9dbc2", + "emittedEvents": [ + "0xf00a265dd32f64efd0398ec799527cf9bee0c9044c17dd99f478f4d0aedab5b9" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x5f15474b3575f9431b79a4f07cbb2513bf669ae80c5d18aef68326d47b63b867" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0xc2473bf8abe594ecd9f0bda46cb3e3728f83a3988c1d9f477d05a7dd78e6ba55", + "txId": "0xacef8f2d596a89b4f375e77d99a786fe50995f54558e0010f0d186a118303c03", + "payloadType": "remove_liquidity", + "status": "succeeded", + "executionCost": { + "costUnits": "1080", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x82eb3fc263e910559e0ad051ac665384a67e47a85050ad8e2f2b5b79e8314b1b", + "emittedEvents": [ + "0x71e243ad26c879cabaf041f5677774f0ab8ab1922b54a7173bb35a6088c81677" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xc0cebf1d3b1868abb732ecdcebba7950a769c7cdaa98b88dd9538a3a98b7627a" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0xc04b5906bfe4d4a8dbf8a1ae4e67d118cae78cd286058b72da9e4b854a2b12dd", + "txId": "0xc651a70810a35b170cbc851580fbc39ed1d1eed3f6ba5a7aac9837640c2e6116", + "payloadType": "swap", + "status": "succeeded", + "executionCost": { + "costUnits": "1090", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xefccc2d1cb910fd2e70ec001598b59c833da8c5da24e60e564d946487979a411", + "emittedEvents": [ + "0x4c93abec1055989ee9e54a615bff00758acb593f957ebe0cbf6d1781100abb60" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x6562accb225e54ad8432ca1fda5db766afaa52167ce1643e594ba8bf894ad5cd" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x1ba588c12762f0aabcb7c76eb1e1746d93ab3d050de4fedb0baae5a1681af23d", + "txId": "0xb0db1c922d7bbfa58759dfde491317d41c9aee638b442df4dfe1985b73e34c48", + "payloadType": "withdrawal_intent", + "status": "succeeded", + "executionCost": { + "costUnits": "1100", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x7b480f778881971d21c8045e82eeae9d92a1b5270bc802c42de6dbcb17115fbf", + "emittedEvents": [ + "0xff43e6ec48d56966d680893de999d296a277ed4f77693922e833b0f0908219eb" + ], + "bridgeEvidenceRefs": [ + "0x4b632f40672ceb7ab195def56d8bc86141f1878ec31ffc742ec3e5b5d0def15d" + ], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x6175b6964ddd7b713529a0f3e4d1862ad66580b2b03c83a58ebb51bb588c5bde" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x2cbdb8fab6b7c1c5057582a137e5f8e2f4a9c8d5fd195bdd6fe1f183fdcaa44c", + "txId": "0xd63772799f7ca1d3eddfcf9ba2ef9bf77444e46d8222d5721e5c38f4f86656c3", + "payloadType": "validator_authority_config", + "status": "succeeded", + "executionCost": { + "costUnits": "1110", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x078c6abec319ffa4100e0477ba6b0924ef0c8c53d7d652e57b38f01669e2e231", + "emittedEvents": [ + "0x4213e214b202b5bc5aa268dff471c42d4197d4075d50b9dd70954d51f336e69a" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xd8e3b577578b0063bb2552baf93b257a48321605c9b0f6a987223326b7cc0855" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x5c92898faf0c75e4ec9b39246c4629e464103f9005d23160c61845ca622f6616", + "txId": "0x10f8e2a10f9e7eeb66b7958c59cca95443c84504deeee7b45b3cd695ccd74c8a", + "payloadType": "finality_vote", + "status": "succeeded", + "executionCost": { + "costUnits": "1120", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x36402784906678d57c64a2e7596ae7df8f519843c436c1eac874dd2b902ae83b", + "emittedEvents": [ + "0x147b00cef5b801830faefd80f1e5b708677b0c62e320cf133dcec604a67aef38" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x5c83e35062dd5919f27bed6ddbf1e709f34b2287190cfd3864779054d5d747e0" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x73a0b8e32efca89f7a48e2f80bc5fd311b447fc41344b3887bf713c9c935852f", + "txId": "0x2bf8ab2f47a541f7c2808c8bf9decec6a8f60d4d026c5ce1e43be10af156ee6c", + "payloadType": "finality_certificate", + "status": "succeeded", + "executionCost": { + "costUnits": "1130", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xe554cf8d92a51c8a0249968d16c648d310e82bf8eaca924ffe7b60637d5a2887", + "emittedEvents": [ + "0x57da01213fdb57bc6687284efa5ce316c0f43ddedb9e9adcad924d62de4f1bab" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x4648ccb0d567460f7485b377d5fe0dc03c4415569947db22322fd8b16e92c0ac" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0xc40dff53c1a8e16a65013d96fcabdd2ebdea0b37acdb25b6b17a7d001f43fea1", + "txId": "0xd1a8d36d371779c09ecf2a627e27ceb85854fb3797d8a4b70ad7aa2fdc0baa83", + "payloadType": "agent_account_update", + "status": "succeeded", + "executionCost": { + "costUnits": "1140", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x5f9f51f8d28ad1a6008933569c49a6e323c17c00fcfd4cb7e7da0a0827d95682", + "emittedEvents": [ + "0x381cfd3d9968a813c5a9c0e121c0852317c320d4b860fa1bbe4d53c7dc2d4266" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xd17172a44dfabbed9500c3d87cfe858a24b5134776fcf4c780ea23e253f79748" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x2261159f48fbb7b1a62b28f4156060594441987c49d6eaeecfe451f46c5bb517", + "txId": "0xb539c517573818f12fa8d1a3604ec24296225a26ef76fb9badeaabed55b4f3dd", + "payloadType": "model_passport_update", + "status": "succeeded", + "executionCost": { + "costUnits": "1150", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x5214edb50cdb17c59f43840c870424ed6adf05ddad057e889f14dde9957d9263", + "emittedEvents": [ + "0x9f6585f2178ba0d2efd9d37ce0f8625d7f802759f5c8dfa1ce37317d827c02ed" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x0e7529e5eaed1b160fccabe56ff4f0e7ec96fab63cf75d546f424c48792ce48a" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x5ff763d0fb238a08f859991582bf569c7b3c6d25ca9c6b1024d348a221b2ebdd", + "txId": "0x81650a8cda675785e199f8259b80fee11abadc43fffbf619ed694920c2b20fea", + "payloadType": "work_receipt_update", + "status": "succeeded", + "executionCost": { + "costUnits": "1160", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x316d700b2807fdffc19c5f04487d83144bb731a2a452902ede6b7509f152ab1c", + "emittedEvents": [ + "0x93f4077d3b4225a297ac3c652fe69d5e4b1e160a96201c8fd93538367ac095f8" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x98c0e82742fa16158dd81dd7aa9beaf9fd09426faf788b41aef95b2382ebea10" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x146d5001dd2bb2fca087b678f3aa265157b225e3442db20cf9361f360fba609d", + "txId": "0xf2755e509ad9a58d6c4d969ada79f08d7bfa7ceeef4d0b439959f8108ee8d026", + "payloadType": "artifact_availability_proof_update", + "status": "succeeded", + "executionCost": { + "costUnits": "1170", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x55d1944b097a3f7b0f6e790caad761d9adc5419b3300a60aefc498b2f2a91436", + "emittedEvents": [ + "0x23894d2f46ebe807e4c379a7c56a6df7231c5f5c0516aaa159f6ad2daf012bae" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xf3a79addad62c517cc109e66780cca44645d7cdd4a1c084c454cedd373a131f3" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0xaa0a8a0b973625ce0a40c573a91613ff8460461e283a3ca92c08b6923975c64b", + "txId": "0x14c854dedf7535dc4b6d7aebf6891905d35889f95341e72df121c31d82bc2717", + "payloadType": "verifier_module_update", + "status": "succeeded", + "executionCost": { + "costUnits": "1180", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xbeef686a1991ba9f08f5f5fb973b0c63593e6eed158ae1bddada8b3ef1f878a4", + "emittedEvents": [ + "0x9abd63cbe0bcadd4341288bba2ad97bc88e64c785749c493e2f65220d884d289" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x55f64a360ba0fbbe386c551a44e848e83ce8ef437d92fecb18b1237c40ded508" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x6bd4278844d4803c92246f3e44ab1bdce702245f613af658776dcec59381dfb8", + "txId": "0xc86669294104fea26444eb412d85a6b4c940d0d05c3fdccef2c26bc7753ca0af", + "payloadType": "verifier_report_update", + "status": "succeeded", + "executionCost": { + "costUnits": "1190", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xb3071da3579c43c4da7527464f9814d788e6ed33022850a35e40421f45f8f0fa", + "emittedEvents": [ + "0x80e11e3a6ec9644110ec64329394c206b09e17396b61e56520ed6a00f8536ec7" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x10c569d0178d3765fbf28f7482dbaa57950fd0793d6ec081bf9c32cd0fd84ea9" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0xcbdcebbe06f7354341395af5fc87d4b443d0cf59480761ab790e38e857c9fd1d", + "txId": "0x09b13bb36deeecd2f862620273e0c13b1c0c02e4545553117dc8eab61082a546", + "payloadType": "memory_cell_update", + "status": "succeeded", + "executionCost": { + "costUnits": "1200", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xe7ae8cf639df17cdf73fd69579771b424e9586a7d764267f52343489ba186f5f", + "emittedEvents": [ + "0xc4de82b39ea363819843ce71263a4e964742b11a7b241ce9aefb8d38d7c4f47f" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xa80ba204e441a64a0a870e13bebadb40af3ef4b9bc32314c0fb31945e9ea3821" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0x2ecb3769958751ff06259795a187b2ef9972cce62aea38d1809b71fe3fcf25d5", + "txId": "0xc20e5b49cac7f27690643613dac7e35f00452e826cbc22b4ddd7107d224a4b4a", + "payloadType": "challenge_update", + "status": "succeeded", + "executionCost": { + "costUnits": "1210", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0x70474a9e4deb5e341d16249dc040492d91a4e4d481ccc1002b38261dc00cbfe9", + "emittedEvents": [ + "0xe462a465a90e44bbb51e1b53aba5661cf0ad8039a84295c0819e8a4ff28744ec" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0xf5defa0cc92d5fc3f96cc1b9d34bdf487d5b4ca1c83efd209fad1002ec676d49" + }, + { + "schema": "flowchain.production_l1.receipt.v0", + "receiptId": "0xcb25bf4472251bf2e3320c7d2feed61ebd8fb831e887149906a226ef8bb14ce5", + "txId": "0x39cfb18c324d443d4096ea96c5f5a6f307558025a7bf1df7286df3d5811fe37d", + "payloadType": "finality_receipt_update", + "status": "succeeded", + "executionCost": { + "costUnits": "1220", + "meter": "local_execution_units" + }, + "stateDeltaRef": "0xa7b0cd57ed0ceffb6a7aa7bb547708cc4fd2412355471bedf4d2414a96f155fd", + "emittedEvents": [ + "0x098ee4110828ebd8b5246a3c67d4086c3205a1a43eec46139b2be182eabc941a" + ], + "bridgeEvidenceRefs": [], + "errorCode": null, + "failureReason": null, + "deterministicIdInput": "0x37f183226937e175cac7e0e4b01b324f21df0761121d6683907b08a16035e4c7" + } + ] +} diff --git a/fixtures/production-l1/state-root-manifest.valid.json b/fixtures/production-l1/state-root-manifest.valid.json new file mode 100644 index 00000000..dfdae53e --- /dev/null +++ b/fixtures/production-l1/state-root-manifest.valid.json @@ -0,0 +1,508 @@ +{ + "schema": "flowchain.production_l1.state_root_manifest.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "stateRoot": "0x716ccaf7e8946591973d4614d41ba39c047ef7e89bd67d62f1aa6d90b99133ef", + "stateRootAlgorithm": "keccak256(canonical-json-sorted-keys-v0)", + "components": [ + { + "component": "accounts", + "root": "0xf4914d4bb9ced10596986f52eefbe15e6b775c8b0855d51f85addd175b61e046", + "count": 6, + "ownerAgent": "wallet", + "inputs": [ + "accountId", + "publicKey", + "address", + "roleFlags", + "nonceDomain" + ] + }, + { + "component": "balances", + "root": "0x8a4fbb966efb61bd6e8f78fb7b8b510086b2650504654cc82a61d3ed97ac4d1c", + "count": 7, + "ownerAgent": "runtime", + "inputs": [ + "accountId", + "assetId", + "amount" + ] + }, + { + "component": "tokens", + "root": "0x542972588a71cf20b19e18681adc3bfbdcf7ca2fed4d4e60858e7679c2cbe238", + "count": 1, + "ownerAgent": "runtime", + "inputs": [ + "tokenId", + "symbol", + "decimals", + "totalSupply" + ] + }, + { + "component": "pools", + "root": "0x66666b609cd2486e0b688b8967452a54b49e684f587c107c8392d58b62ae3897", + "count": 1, + "ownerAgent": "runtime", + "inputs": [ + "poolId", + "baseAssetId", + "quoteAssetId", + "reserves" + ] + }, + { + "component": "lp_positions", + "root": "0xac45ae606ad56a72fd38b75aad52ed9b46365dfcca5b7679e3f7397d88ef05d3", + "count": 1, + "ownerAgent": "runtime", + "inputs": [ + "lpPositionId", + "poolId", + "ownerAccountId", + "lpUnits" + ] + }, + { + "component": "bridge_credits", + "root": "0x0f91f6d8d6a014b6b9e5c271e8a746256c4ef3b00c2194e0b858e405b7044b9a", + "count": 1, + "ownerAgent": "bridge", + "inputs": [ + "creditId", + "observationId", + "accountId", + "assetId", + "amount" + ] + }, + { + "component": "withdrawals", + "root": "0x179cf78b41131caefd13d557b73e73258fcb027e103007115deeb98e7755959f", + "count": 1, + "ownerAgent": "bridge", + "inputs": [ + "withdrawalIntentId", + "accountId", + "assetId", + "amount", + "releaseEvidenceId" + ] + }, + { + "component": "object_store", + "root": "0x96cca38dd6e86995a2b3551676a5c5777c3d270762cab8769771f840a9ac23fd", + "count": 9, + "ownerAgent": "runtime", + "inputs": [ + "objectType", + "objectId", + "objectHash", + "status" + ] + }, + { + "component": "finality", + "root": "0xbc714da6fb6a0957172d578e52e611e35c2f5c7a5433435c31736e6da2abf6f6", + "count": 1, + "ownerAgent": "consensus", + "inputs": [ + "height", + "status", + "certificateId" + ] + }, + { + "component": "validator_state", + "root": "0x6ae2131489fb1d27c5a6786fe058ad7a4d70edc598c0d766028fc1f4d1532290", + "count": 1, + "ownerAgent": "consensus", + "inputs": [ + "authorityId", + "accountId", + "votingPower", + "status" + ] + } + ], + "stateComponents": { + "accounts": [ + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "label": "alice-user", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": true, + "validator": false, + "bridgeOperator": false, + "deployer": true, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x1c114222c149606293a4dac2c2b8bd53d64517a2cb4804b13c560e6f0e3e09de", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "label": "bob-user", + "publicKey": "0x02bd133d4df63458ed49a0d7acde36d546b80c735f04d9a37eb428f1d92505b6be", + "address": "0xc8d2f10666e1216121f6449f0fc5726f63590aa7", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x8a6124844f49d9390c78a1dfd812c43c1963edf9be78b4154bc50fabf0e12f9a", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": true, + "validator": false, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0xd7456e440b78c346aa02b5fff11c181d45d40c691d836e571d464a595db02008", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "label": "validator-one", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x8aca75dd306f43261a9c58812a426a62ddf72e5a0823fe7ef6c4e0aff78b42d9", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": true, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x18e55b4da0218551072142ab2f110626c3f47f0c6f2a8fc5dbb5efb2fa3b34eb", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "label": "bridge-relayer", + "publicKey": "0x02f90ad32b15b53c0e4abd4f2f0de6db96dbe0adee1dab1736b0cf596070f7ef05", + "address": "0x633621fec8e01f8346130d81c26be8e33d1dcea9", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x346974a0aa8346f9759dde1d56bb8962a36eb013ca5e7f8c1b8e673fcfebd08a", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": true, + "deployer": false, + "relayer": true, + "emergencyOperator": false + }, + "metadataHash": "0x09d6e50d1093be697a68f09a0a8c99c1c8b072dd71ea832305d5153ae585a3ff", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0x9f7090c47663019f3d7647a2d4b5895a529e9dbac911bb2fde2c359828cbb3b8", + "label": "bridge-release-authority", + "publicKey": "0x02be094d43f51fb0e267c4ed5767bf26ef1370dc3c7756d1399d8e152c3a59b602", + "address": "0xdb523727f85b4f6d0ff5f62fc4d6c25a337af90d", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x0df088a7e0abfe419a042ed6caf58dba22d3a4f7e8ca066c3585b859ae870e4f", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": true, + "deployer": false, + "relayer": false, + "emergencyOperator": false + }, + "metadataHash": "0x8f83b49dac9afecf998c810362df58ad3e05daa154a80f63cbf32acf3f435ed2", + "status": "active", + "productionReady": false + }, + { + "schema": "flowchain.production_l1.account_public_metadata.v0", + "accountId": "0x458a01532bc3ec202c267dbd715ef239d54e3844cb37c57f504ab7e7f077ac8a", + "label": "emergency-operator", + "publicKey": "0x0202837e867307660b83033448b53dae9fbf18646041ac72fc3797272b59d65d79", + "address": "0x9386458c8c48d14bfebedc4fd00a528c15727b9e", + "addressDerivation": { + "algorithm": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "preimageFields": [ + "publicKey", + "chainId", + "networkProfile" + ], + "chainIdBinding": true + }, + "nonceDomain": { + "domainId": "0x6c2e83ab478452519394a62c494432d5e6643b6fd28c95af2fb38e55644ab734", + "nextNonce": "1", + "replayScope": "chainId+networkProfile+genesisHash+accountId" + }, + "roleFlags": { + "user": false, + "validator": false, + "bridgeOperator": false, + "deployer": false, + "relayer": false, + "emergencyOperator": true + }, + "metadataHash": "0xc0602b4f0b0d0dd87908d4808189afb4e60c7d7100865cabaf215fdf1311996f", + "status": "active", + "productionReady": false + } + ], + "balances": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "1000000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "100000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "50000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "25000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "2640000", + "balanceType": "native_local_unit", + "noValue": true + }, + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "amount": "995050000", + "balanceType": "test_token", + "noValue": true + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "amount": "349000", + "balanceType": "test_token", + "noValue": true + } + ], + "tokens": [ + { + "tokenId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "symbol": "FLOWT", + "name": "FlowChain Local Test Token", + "decimals": 6, + "totalSupply": "1000250000", + "noValue": true + } + ], + "pools": [ + { + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "baseAssetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "quoteAssetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "reserveBase": "99000", + "reserveQuote": "4951000", + "feeBps": 30, + "noValue": true + } + ], + "lp_positions": [ + { + "lpPositionId": "0x027c83ae59eefcbea8ecb604e3a527e4392c82376866e2f1e6804bae5a1dbd7d", + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "ownerAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "lpUnits": "99900", + "noValue": true + } + ], + "bridge_credits": [ + { + "creditId": "0xd52d44dc757c0ecd7853bd269902848a3dd04af44db8dc704b347da47ed1b238", + "observationId": "0x070736a82e7dad444266af15ec8b521beba7c08502be2aeecb32c0f7f41b68d3", + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "2500000", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024" + } + ], + "withdrawals": [ + { + "withdrawalIntentId": "0xa3bd91f938d573c2e58bb34f4842a3f9acb85df7d2b4086a5949a65b95c55ee6", + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "100000", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "releaseEvidenceId": "0x4b632f40672ceb7ab195def56d8bc86141f1878ec31ffc742ec3e5b5d0def15d" + } + ], + "object_store": [ + { + "objectType": "AgentAccount", + "objectId": "0x79587bf5b81d6b566fe12453bc30803a773997e1f85371b4ba399d761758004d", + "objectHash": "0x24ad98a6c242b0b361aa0c48f6331202eb55002dd43e0db3bcbab52b30ac8018", + "status": "active" + }, + { + "objectType": "ModelPassport", + "objectId": "0xa73adb911f58e33dcd820471675d7a3d2b242be0574e217b144f4873135a4085", + "objectHash": "0xd5de49d30e0ff04ff2de2141d119bbfb46f3b741ce529f0594936a1cfba296d3", + "status": "active" + }, + { + "objectType": "WorkReceipt", + "objectId": "0xa96483b49a3d6005d748a512e00ab0bf1feb77d2bad4dec4f7842310bfe401f7", + "objectHash": "0xeb0475e34e1b2818d882210c44d3a3d8c6f30b1e551b827c48d9b0619ad238d9", + "status": "active" + }, + { + "objectType": "ArtifactAvailabilityProof", + "objectId": "0x7458f4ac71bc9008bc012e2a8cec5b529772b58f6fc86ab44bcd339a7070e069", + "objectHash": "0x67aed44d292f94b1bd141ec1f355955f96283783e08152a7237e2d37810fd49a", + "status": "active" + }, + { + "objectType": "VerifierModule", + "objectId": "0x5194f738c5e5d252e0ae82f28883d732b762b9944f20181b854841875c45c54b", + "objectHash": "0xfef87b4fe768283b6e0e741bde3c43e635ce3f89f769285e356027c813877895", + "status": "active" + }, + { + "objectType": "VerifierReport", + "objectId": "0x5d0ad9b32f26abc0cd7be3b8869c51aefbc3cdd5d3f01735a8820fb7ff0910e1", + "objectHash": "0xa8d1865f5910ec6a9b615c48d7768e6a6ad3d3647495ffd5e5f6e9a8870a9489", + "status": "active" + }, + { + "objectType": "MemoryCell", + "objectId": "0xbcd05714eabfa7babbe32888041eaca0f715073f92e8c8cbd1f81922eeab5b16", + "objectHash": "0x86eeee0b28fa6533fd4220fb4953e78c29e1d545d3cffea2d985053157923619", + "status": "active" + }, + { + "objectType": "Challenge", + "objectId": "0x927bb5cb7a259e9ef7a3ca9ed94f4f536928f87ecec25ef8e04eb3dd16884ad9", + "objectHash": "0xa73c3472a504f9dd8d98b3851f88a1fbaf9914524c0a7879172268bcc3225acf", + "status": "resolved" + }, + { + "objectType": "FinalityReceipt", + "objectId": "0xd0017f1d9ab4a827a296feed92d8427582bb2eeac7bc1d006ecb843d2a2022fa", + "objectHash": "0xe8331685281b5709bcff0d968bff6a796d9e78057156c9ad4662bcc6bb8ef1ac", + "status": "finalized" + } + ], + "finality": [ + { + "height": "1", + "status": "accepted", + "certificateId": "0x4b525f224cd71929a613f6235ffb03a641916851c2fc90843feec3bbad90a3b3" + } + ], + "validator_state": [ + { + "schema": "flowchain.production_l1.validator_authority.v0", + "authorityId": "0x4e7ad43d8db36ddde419d64fac4768a38167efd7b9e7abc503036f2ba22c92ba", + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "authorityType": "validator", + "votingPower": "1", + "finalityWeight": "1", + "metadataHash": "0x708f6074acaf685798e4085ceb5d4c3053dfa72bc1ccf0078feb3dbcd39c5e15", + "status": "active", + "productionReady": false + } + ] + }, + "deterministicReplay": { + "sameLogicalStateRoot": "0x716ccaf7e8946591973d4614d41ba39c047ef7e89bd67d62f1aa6d90b99133ef", + "replayCommand": "npm run validate:production-l1-fixtures" + } +} diff --git a/fixtures/production-l1/transactions.valid.json b/fixtures/production-l1/transactions.valid.json new file mode 100644 index 00000000..c0901138 --- /dev/null +++ b/fixtures/production-l1/transactions.valid.json @@ -0,0 +1,1901 @@ +{ + "schema": "flowchain.production_l1.transaction_fixture_set.v0", + "transactions": [ + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x18e97cdd0f9b8222ae270a034b8b26daf6d73c43c425d0593100b1d889563930", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "1", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "user" + }, + "payloadType": "native_transfer", + "payloadHash": "0xb314ed92273ef9aed93bcc16e4989067a8d7dbd362373e4f15bdf2ad15d2b639", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "native_transfer", + "payloadId": "0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "1", + "details": { + "fromAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "toAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "10000", + "memoHash": "0x9284d3dc2a7d698ae915b37d7e2811f36db10682e82d56aa6bd7664d1220ef06" + }, + "preconditions": [ + "payload_type:native_transfer", + "account_nonce:1" + ], + "stateWrites": [ + "native_transfer:state_write:0xc812c43f614a33562fbdd8ea7c02ba4839f87e45f201bbeb8fd08e080b88d2fa" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "-10000" + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "10000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "1", + "after": "2" + }, + "emittedEventTypes": [ + "NativeTransferRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "native_transfer" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x1a4bd0898df04f0e790a8256a7d254412d22e06326f8b2b46ba4039e0fbfe2ce", + "value": "0x1a4bd0898df04f0e790a8256a7d254412d22e06326f8b2b46ba4039e0fbfe2cedbb4b0f74b3d6f6b6c9cdea4aaaf227cc71941d46a3a2e4826f7ec07e15a7d2a" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x74b37fa211b380912250d589cbd52a7f08ef9e34ec68bcf034ef38d07697465a", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "2", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "faucet_funding", + "payloadHash": "0x678de8bb69e2e7585fbbd059f014e9f3f7af59b970e55a7a1817709bf3a74c4b", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "faucet_funding", + "payloadId": "0xa4e0c6b866e9ee38c2b31dd6a928388a7389c8058648609c80d490ce77f40073", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "2", + "details": { + "faucetId": "0x268c55ac11ea534f33a96f4738b075648a9603e41cc7054ee03a8eb7f0e55c34", + "toAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "5000", + "reasonHash": "0x8934e316445b4e6bcee5226b067a5eddc19fa23a869e272feb6be378dae8ed48", + "localOnly": true + }, + "preconditions": [ + "payload_type:faucet_funding", + "account_nonce:2" + ], + "stateWrites": [ + "faucet_funding:state_write:0xa4e0c6b866e9ee38c2b31dd6a928388a7389c8058648609c80d490ce77f40073" + ], + "balanceChanges": [ + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "5000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "2", + "after": "3" + }, + "emittedEventTypes": [ + "FaucetFundingRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "faucet_funding" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x5e1b2659f86f1f99703c8b54d0721b51c41eec36ba6ae9d89f1ca56df045092d", + "value": "0x5e1b2659f86f1f99703c8b54d0721b51c41eec36ba6ae9d89f1ca56df045092d387e84a80721b4291186c3a02d8a0511410504f1a702e1930a266c62333635e3" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x36f329a0663b99955a5778cefa40aed22fbafedea1230e559253aef782bbe42a", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "1", + "nonceDomain": "0x346974a0aa8346f9759dde1d56bb8962a36eb013ca5e7f8c1b8e673fcfebd08a", + "signer": { + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "publicKey": "0x02f90ad32b15b53c0e4abd4f2f0de6db96dbe0adee1dab1736b0cf596070f7ef05", + "address": "0x633621fec8e01f8346130d81c26be8e33d1dcea9", + "role": "relayer" + }, + "payloadType": "bridge_credit", + "payloadHash": "0x5945c72f2b23e8f5f301a7610a066f516c26f2d64245f94bb59821e013861979", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "bridge_credit", + "payloadId": "0x7a8668dcd2bffa80eb280031bd7757ecbaf8cd880d766d04e9bfc1a5bd8c4d66", + "actorAccountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "accountNonce": "1", + "details": { + "bridgeEvidenceId": "0x013b5052df9be23c0816f77258d50bddfad0d73eb62af5fdd96a0b45d16fee21", + "observationId": "0x070736a82e7dad444266af15ec8b521beba7c08502be2aeecb32c0f7f41b68d3", + "creditId": "0xd52d44dc757c0ecd7853bd269902848a3dd04af44db8dc704b347da47ed1b238", + "sourceChainId": 8453, + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "2500000", + "recipientAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a" + }, + "preconditions": [ + "payload_type:bridge_credit", + "account_nonce:1" + ], + "stateWrites": [ + "bridge_credit:state_write:0x7a8668dcd2bffa80eb280031bd7757ecbaf8cd880d766d04e9bfc1a5bd8c4d66" + ], + "balanceChanges": [ + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "2500000" + } + ], + "nonceChange": { + "accountId": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4", + "before": "1", + "after": "2" + }, + "emittedEventTypes": [ + "BridgeCreditApplied" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "bridge_credit" + }, + { + "key": "actorAccountId", + "value": "0xb456f55c243edcb1372f27f199f9e68b25d0909f5d2d90ec4e20fbe6de7098b4" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x28f6ace9b0b309f17bf28fa90976e64550d93889f9dd9b659caa6f46c46b005f", + "value": "0x28f6ace9b0b309f17bf28fa90976e64550d93889f9dd9b659caa6f46c46b005fb6f08e745ba67912ac7bb807db36c6a7dd4aee51335200624ea267da77652b62" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x6ca72702d734aea0d6b969b8aaa3328d0862f4b21ea0a8262ccc7839468c8c65", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "3", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "token_launch", + "payloadHash": "0x8074dc0dbd44f3431dcca27687de12bc68ef9189d86286b630f94c73931b4e07", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "token_launch", + "payloadId": "0x58b3ad1cc7dea9851e1f6813760e021681c975a6f8ebfe29a8c5116c43ac813d", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "3", + "details": { + "tokenLaunchId": "0xb941d23378dd9e79573960c3fe836cced8c07f9a5d261abee1626ae66b38e15b", + "issuerAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "tokenId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "symbol": "FLOWT", + "name": "FlowChain Local Test Token", + "decimals": 6, + "metadataHash": "0xfd3e99204deb1fb81c51aac93bf9468ba42b0a45d2c8a8201080db1627056dd5", + "initialSupply": "1000000000", + "recipientAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + }, + "preconditions": [ + "payload_type:token_launch", + "account_nonce:3" + ], + "stateWrites": [ + "token_launch:state_write:0x58b3ad1cc7dea9851e1f6813760e021681c975a6f8ebfe29a8c5116c43ac813d" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "1000000000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "3", + "after": "4" + }, + "emittedEventTypes": [ + "TokenLaunched" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "token_launch" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x674f36261cbf81240f959a8bf5dc9808862b64194e0e0bd42d547abd14ea8dde", + "value": "0x674f36261cbf81240f959a8bf5dc9808862b64194e0e0bd42d547abd14ea8dde22ceec74319ce2a380f816948f99db9385e907385eaae404b226673eef5a3650" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xc8cddac632390a6b736a7433c8fbc726028eb153517d5030ff17c94f5463a03a", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "4", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "token_mint", + "payloadHash": "0xbfdef58cb485fa1d5e6eb16a166e0cab34350c5b0e9383509015b5929069b31d", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "token_mint", + "payloadId": "0x9a084a321aab722fad0ed7f1e7bba27e4d9c72afe9d74b876a727ae2646cad9f", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "4", + "details": { + "mintId": "0x3e118238b7a7677dadb07a2df738838ae438f2fb1edc56235ec7267f85c8cc84", + "tokenId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "toAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "250000", + "reasonHash": "0xa1f900fe4d833267daf29d488dd8c4f106718feca017762e54306d640e903d75", + "localOrTestMode": true + }, + "preconditions": [ + "payload_type:token_mint", + "account_nonce:4" + ], + "stateWrites": [ + "token_mint:state_write:0x9a084a321aab722fad0ed7f1e7bba27e4d9c72afe9d74b876a727ae2646cad9f" + ], + "balanceChanges": [ + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "250000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "4", + "after": "5" + }, + "emittedEventTypes": [ + "TokenMinted" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "token_mint" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x13fe583db212ec1dcfbe6240ea7489ea9288688f423f78069413534f725cdde3", + "value": "0x13fe583db212ec1dcfbe6240ea7489ea9288688f423f78069413534f725cdde32211ac2917eb98093dd6f007b5c40de8e21e3d9b235a9f6b223088cb5a52a2a6" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x8a327e611d306b367d9794000a64395c96990d9d16b93d309e149fc56a8af9e7", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "5", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "user" + }, + "payloadType": "token_transfer", + "payloadHash": "0x8aa5892acd6e69297bb30beccfcb9b97e224562cbbc6bcab6b45d11f820f2e28", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "token_transfer", + "payloadId": "0xf297b8f97f86900fca41aa854aee01e0d8413ae99488e217ef75eaa5da1fd98f", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "5", + "details": { + "tokenTransferId": "0x13d8066d6f4711e834f123b102087394e11495c646dc1aec74112a3bd72c562b", + "tokenId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "fromAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "toAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "amount": "50000", + "memoHash": "0xc8a014c9eef7461736465de0ed544a310bc26d386b932dca8e29ae2e34adffac" + }, + "preconditions": [ + "payload_type:token_transfer", + "account_nonce:5" + ], + "stateWrites": [ + "token_transfer:state_write:0xf297b8f97f86900fca41aa854aee01e0d8413ae99488e217ef75eaa5da1fd98f" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "-50000" + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "50000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "5", + "after": "6" + }, + "emittedEventTypes": [ + "TokenTransferred" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "token_transfer" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x74294b063606729075950a0686094e3a7f5d8c6872ac4e62f5914cd75f8df417", + "value": "0x74294b063606729075950a0686094e3a7f5d8c6872ac4e62f5914cd75f8df4178028417a9d1a4519b66a088b401b8c2807dc44bcabbd04a7b95a6fd457de3696" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x459fd019e44fba8961ed3cab569eed08b906dfed8580c444002defe70b4147b4", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "6", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "pool_create", + "payloadHash": "0x542609986958c9c723b621092c8ba0456d6a5da33bf94cf33457050acdb5bc78", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "pool_create", + "payloadId": "0x099a7f62c1af5c718644e22a2a96486c4bdad7852c52d4373ed69c9a7aca3ae9", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "6", + "details": { + "poolCreateId": "0x7d29c3a9eca221bddf7903d6a45f8bca0b6fd1a001741b50d003504ad67c5c53", + "creatorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "baseAssetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "quoteAssetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "feeBps": 30, + "tickSpacing": 1, + "metadataHash": "0xdf927b67c67e3761744ac6ae5ef35375d42eda3fc857a6ec1567b24b8f29845e" + }, + "preconditions": [ + "payload_type:pool_create", + "account_nonce:6" + ], + "stateWrites": [ + "pool_create:state_write:0x099a7f62c1af5c718644e22a2a96486c4bdad7852c52d4373ed69c9a7aca3ae9" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "6", + "after": "7" + }, + "emittedEventTypes": [ + "PoolCreated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "pool_create" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x1a059c36d2c22e3e4cf0ff31990cd4b60bfce93c38fd3bc68b23d09d396e3f09", + "value": "0x1a059c36d2c22e3e4cf0ff31990cd4b60bfce93c38fd3bc68b23d09d396e3f090dbea9d7dd5742e612e330ae16b848b093d21404e8a68f67580360b024a12c88" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xd4d4e811d8f4e18334823af5c81ff769eb27ff6e4d88d9b2e197fd9378c54535", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "7", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "user" + }, + "payloadType": "add_liquidity", + "payloadHash": "0x77d4968318412db65dcc0995cc2130af1d741d65c464a500b0982f91c2cb4ddc", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "add_liquidity", + "payloadId": "0x222a60a6e50c7a8d205fd472bb75c216485f56b33f824138a2b83cedd2ab6f7b", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "7", + "details": { + "liquidityId": "0x9ea34509afbe23343522af862dad843cf73df7532606eeca817edc5e0c7c2272", + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "providerAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "baseAmount": "100000", + "quoteAmount": "5000000", + "minLpUnits": "1" + }, + "preconditions": [ + "payload_type:add_liquidity", + "account_nonce:7" + ], + "stateWrites": [ + "add_liquidity:state_write:0x222a60a6e50c7a8d205fd472bb75c216485f56b33f824138a2b83cedd2ab6f7b" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "-100000" + }, + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "-5000000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "7", + "after": "8" + }, + "emittedEventTypes": [ + "LiquidityAdded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "add_liquidity" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x3eb1a65a616eb8031c4889a20ed244423a404b95c636b73ee4cb284f5c6936bb", + "value": "0x3eb1a65a616eb8031c4889a20ed244423a404b95c636b73ee4cb284f5c6936bbe4ad5abcb31f55676be981456e1e1aeb84327afe3769b291fc874e8b2eea4884" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xacef8f2d596a89b4f375e77d99a786fe50995f54558e0010f0d186a118303c03", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "8", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "user" + }, + "payloadType": "remove_liquidity", + "payloadHash": "0x589737d24bc2636d0b10aaf2790e7e3932810f05a311ac2c4644213f405715de", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "remove_liquidity", + "payloadId": "0xb32b8118708f2adda42c92c555efab29e973efd05fc0a694ebd0cdd78e2caca5", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "8", + "details": { + "liquidityId": "0xe4a3ca64db987b9fac69d0df9069eecc4ad31da806b912b1606ef0efce172dfc", + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "providerAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "lpUnits": "100", + "minBaseAmount": "1", + "minQuoteAmount": "1" + }, + "preconditions": [ + "payload_type:remove_liquidity", + "account_nonce:8" + ], + "stateWrites": [ + "remove_liquidity:state_write:0xb32b8118708f2adda42c92c555efab29e973efd05fc0a694ebd0cdd78e2caca5" + ], + "balanceChanges": [ + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "2000" + }, + { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "100000" + } + ], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "8", + "after": "9" + }, + "emittedEventTypes": [ + "LiquidityRemoved" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "remove_liquidity" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x1aaaaa0c3174718b5df8bc7899384de7a450c01286a6bd98af72959a42e023e5", + "value": "0x1aaaaa0c3174718b5df8bc7899384de7a450c01286a6bd98af72959a42e023e5fb7590a0f3441a51788d3952be34a3ae28eb0dff986d95167f815e8761326405" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xc651a70810a35b170cbc851580fbc39ed1d1eed3f6ba5a7aac9837640c2e6116", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "1", + "nonceDomain": "0x8a6124844f49d9390c78a1dfd812c43c1963edf9be78b4154bc50fabf0e12f9a", + "signer": { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "publicKey": "0x02bd133d4df63458ed49a0d7acde36d546b80c735f04d9a37eb428f1d92505b6be", + "address": "0xc8d2f10666e1216121f6449f0fc5726f63590aa7", + "role": "user" + }, + "payloadType": "swap", + "payloadHash": "0xcb6bc1a569412a08d52ef59b17463ddb63fb82f6396f3fff3cdf813c2707d4a5", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "swap", + "payloadId": "0x15fa2e1e2c305a0d29bd6c674a1fec00b18346d9d60e31f7a7677bd18cb3aac9", + "actorAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "accountNonce": "1", + "details": { + "swapId": "0x671be20c2cae4a8f2b5cf9ed4de1dbe64528fdb50c5f6c052f56883f8be994d7", + "poolId": "0x81e13f7a36b9520e6094e4fa26c79fe6bc56421d964b7773ff3344fccc6f5f5a", + "traderAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetInId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "assetOutId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "amountIn": "1000", + "minAmountOut": "40000", + "routeHash": "0x71a523049c4579ce011a78a263713e5a2d32ae7150158aa8015fc9cb8e4871f4" + }, + "preconditions": [ + "payload_type:swap", + "account_nonce:1" + ], + "stateWrites": [ + "swap:state_write:0x15fa2e1e2c305a0d29bd6c674a1fec00b18346d9d60e31f7a7677bd18cb3aac9" + ], + "balanceChanges": [ + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "-1000" + }, + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xab33f8fc8a0ac57cc3a49d06e53a5dde13b2daec76a3ba2b4f92253372913f4d", + "delta": "49000" + } + ], + "nonceChange": { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "before": "1", + "after": "2" + }, + "emittedEventTypes": [ + "SwapExecuted" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "swap" + }, + { + "key": "actorAccountId", + "value": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x201504789fb3e32c01d8496c915ab1e448d048f49a20d9d9c0969e8b0ebe14bc", + "value": "0x201504789fb3e32c01d8496c915ab1e448d048f49a20d9d9c0969e8b0ebe14bc7d9349c8cdb4657fa66eb3aa7db3b8284401547b238bc98e92ff5920cc763b7f" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xb0db1c922d7bbfa58759dfde491317d41c9aee638b442df4dfe1985b73e34c48", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "2", + "nonceDomain": "0x8a6124844f49d9390c78a1dfd812c43c1963edf9be78b4154bc50fabf0e12f9a", + "signer": { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "publicKey": "0x02bd133d4df63458ed49a0d7acde36d546b80c735f04d9a37eb428f1d92505b6be", + "address": "0xc8d2f10666e1216121f6449f0fc5726f63590aa7", + "role": "user" + }, + "payloadType": "withdrawal_intent", + "payloadHash": "0xe638c78e1bc9a52ac1243b1da3f8d5f22707ad968d50d7a3fef03041bbf251cb", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "withdrawal_intent", + "payloadId": "0x8c8be8335d98fc6337cbef75b34ef228d11a4cacabf0b8da0d93282785d4efcb", + "actorAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "accountNonce": "2", + "details": { + "withdrawalIntentId": "0xa3bd91f938d573c2e58bb34f4842a3f9acb85df7d2b4086a5949a65b95c55ee6", + "sourceAccountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "destinationChainId": 8453, + "destinationAddress": "0xb8eed8a8ec1ba09a1b46e79042399df3984f36df", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "amount": "100000", + "releasePolicyHash": "0x5a1af4db0125b5c9be8ae5c2ca236108de242dc1e259d6f89e2e931c80e601c1" + }, + "preconditions": [ + "payload_type:withdrawal_intent", + "account_nonce:2" + ], + "stateWrites": [ + "withdrawal_intent:state_write:0x8c8be8335d98fc6337cbef75b34ef228d11a4cacabf0b8da0d93282785d4efcb" + ], + "balanceChanges": [ + { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "assetId": "0xa70acd8537f968b85bbfcff11f26a46376af5de590645cfd4976f1382794c024", + "delta": "-100000" + } + ], + "nonceChange": { + "accountId": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a", + "before": "2", + "after": "3" + }, + "emittedEventTypes": [ + "WithdrawalIntentRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "withdrawal_intent" + }, + { + "key": "actorAccountId", + "value": "0xc687acd2a8f82c43e7b5e5fc8c3df132aa69becb29a71abcdfe6461a2e6e774a" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x957fb4572398a908af8493a77464a05e1271c2806f1e33c6a3ead9357941d32f", + "value": "0x957fb4572398a908af8493a77464a05e1271c2806f1e33c6a3ead9357941d32f47918c7a7829133695cd334ba1efdcf68644b5ff423fcfd80526622ef40fb1d1" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xd63772799f7ca1d3eddfcf9ba2ef9bf77444e46d8222d5721e5c38f4f86656c3", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "1", + "nonceDomain": "0x8aca75dd306f43261a9c58812a426a62ddf72e5a0823fe7ef6c4e0aff78b42d9", + "signer": { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "role": "validator" + }, + "payloadType": "validator_authority_config", + "payloadHash": "0xa9f7a299f1a986b88b7a73990c45a3d2e4bc607ffade4a73e24ac85137887b20", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "validator_authority_config", + "payloadId": "0x7536fd5ee06a6afa22228e339c896fa95e3a17c0b501c3556d8d88f07be5f908", + "actorAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "accountNonce": "1", + "details": { + "authorityConfigId": "0x1ef8f8fa3707b0f16f98ed88c79e0c7d5465b55a6c14b0236b1949fa5ffc1fb8", + "authorityId": "0x4e7ad43d8db36ddde419d64fac4768a38167efd7b9e7abc503036f2ba22c92ba", + "validatorAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "action": "update", + "authorityType": "validator", + "votingPower": "1", + "metadataHash": "0x2bf51245a695e6afc8cad010f197129cba1bca7f1ff689caccaaea01f77935c8" + }, + "preconditions": [ + "payload_type:validator_authority_config", + "account_nonce:1" + ], + "stateWrites": [ + "validator_authority_config:state_write:0x7536fd5ee06a6afa22228e339c896fa95e3a17c0b501c3556d8d88f07be5f908" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "before": "1", + "after": "2" + }, + "emittedEventTypes": [ + "ValidatorAuthorityConfigured" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "validator_authority_config" + }, + { + "key": "actorAccountId", + "value": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x30db85e4b20d362f057d21535de016ec43d9eb813821e072e4afbea9cc78e409", + "value": "0x30db85e4b20d362f057d21535de016ec43d9eb813821e072e4afbea9cc78e409b7bf7ec3e75551273d274db995655d1fbdfa863414a060d41a57040bf8234a7d" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x10f8e2a10f9e7eeb66b7958c59cca95443c84504deeee7b45b3cd695ccd74c8a", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "2", + "nonceDomain": "0x8aca75dd306f43261a9c58812a426a62ddf72e5a0823fe7ef6c4e0aff78b42d9", + "signer": { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "role": "validator" + }, + "payloadType": "finality_vote", + "payloadHash": "0x4488eab003da8fd001e2d3411f9830140e816d72a580d1f00138c90ffe28ab7b", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "finality_vote", + "payloadId": "0x680c40512bd8a86c0610e4787d5a346ed11ce7d487f37e51b49d8f347cbf4901", + "actorAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "accountNonce": "2", + "details": { + "voteId": "0x5bf522270da05b7f92d03344e49c7b9f3d82d825d4303b2bed722375e822fdce", + "validatorAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "height": "1", + "blockHash": "0x3746b76bda4221999bf94bc0b1a144002dcb08769da1878ae6e690bfaf3205c1", + "stateRoot": "0x6fb8606dcd290285bf0fa89dc40bf6ee98a766e9858cb0b18a85dd288848c4ab", + "voteRound": "1" + }, + "preconditions": [ + "payload_type:finality_vote", + "account_nonce:2" + ], + "stateWrites": [ + "finality_vote:state_write:0x680c40512bd8a86c0610e4787d5a346ed11ce7d487f37e51b49d8f347cbf4901" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "before": "2", + "after": "3" + }, + "emittedEventTypes": [ + "FinalityVoteRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "finality_vote" + }, + { + "key": "actorAccountId", + "value": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0xf8147b67f890077cebf74db5185632bb08e8128c45ae5b89569d5b9dd87aafd9", + "value": "0xf8147b67f890077cebf74db5185632bb08e8128c45ae5b89569d5b9dd87aafd9f5885301664a67492d1c64816684914d11ae78e9871877eebb8c34734006018c" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x2bf8ab2f47a541f7c2808c8bf9decec6a8f60d4d026c5ce1e43be10af156ee6c", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "3", + "nonceDomain": "0x8aca75dd306f43261a9c58812a426a62ddf72e5a0823fe7ef6c4e0aff78b42d9", + "signer": { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "publicKey": "0x021d45040882bbe0d3d1ff6ed7476a4b533e17b00633d81cff5cd15479c3c0bd22", + "address": "0xd0c3c122262ba1116de221d5fbf4505357b97e8a", + "role": "validator" + }, + "payloadType": "finality_certificate", + "payloadHash": "0x82e2a8a031b079adac6e41851df9cb44f05722eee933d7526765f4487e151ca2", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "finality_certificate", + "payloadId": "0x527697a531538b1617cec46d668a01a8d6b0d8210adb42b1506c0210b2df8a80", + "actorAccountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "accountNonce": "3", + "details": { + "certificateId": "0x4b525f224cd71929a613f6235ffb03a641916851c2fc90843feec3bbad90a3b3", + "height": "1", + "blockHash": "0x3746b76bda4221999bf94bc0b1a144002dcb08769da1878ae6e690bfaf3205c1", + "stateRoot": "0x6fb8606dcd290285bf0fa89dc40bf6ee98a766e9858cb0b18a85dd288848c4ab", + "signerSetRoot": "0x65217700c09f22aa4d3a0da9b5ee0955e2e7a196106ae6a93982d607b33d4ea3", + "voteIds": [ + "0x5bf522270da05b7f92d03344e49c7b9f3d82d825d4303b2bed722375e822fdce" + ], + "quorumNumerator": 1, + "quorumDenominator": 1 + }, + "preconditions": [ + "payload_type:finality_certificate", + "account_nonce:3" + ], + "stateWrites": [ + "finality_certificate:state_write:0x527697a531538b1617cec46d668a01a8d6b0d8210adb42b1506c0210b2df8a80" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d", + "before": "3", + "after": "4" + }, + "emittedEventTypes": [ + "FinalityCertificateRecorded" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "finality_certificate" + }, + { + "key": "actorAccountId", + "value": "0xef8fcf1e5560df82860c4de608453cc69a07478b1c7472b6fa7f5834d7d0c46d" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x33bf4f0d795235b556ca8e4ad33226cf6bd41f78acfdf4519b32c9a94d074637", + "value": "0x33bf4f0d795235b556ca8e4ad33226cf6bd41f78acfdf4519b32c9a94d074637a202d048be2c634cf410b35ee519b9c00c371d08950416c4d96e4ccc5a0c5bff" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xd1a8d36d371779c09ecf2a627e27ceb85854fb3797d8a4b70ad7aa2fdc0baa83", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "9", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "agent_account_update", + "payloadHash": "0xac1359e1af6c3632d5d7a2ea0b78f75beead7733d2268bd4a645e740ce358da6", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "agent_account_update", + "payloadId": "0x00159178ecb25498ba211866e664bf321b41140d3283ffdf22adf5ff1afea75e", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "9", + "details": { + "lifecycleUpdateId": "0x6e36f280f28b502261bddc5928c67c7f7801575211f4109a4dfb0531a6257a5b", + "objectType": "AgentAccount", + "operation": "create", + "objectId": "0x79587bf5b81d6b566fe12453bc30803a773997e1f85371b4ba399d761758004d", + "objectHash": "0x24ad98a6c242b0b361aa0c48f6331202eb55002dd43e0db3bcbab52b30ac8018", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0xae4c481a9422d17fe8e2b45dfbc0ff9386850a6d5cfa9067c35d14857882143d", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:agent_account_update", + "account_nonce:9" + ], + "stateWrites": [ + "agent_account_update:state_write:0x00159178ecb25498ba211866e664bf321b41140d3283ffdf22adf5ff1afea75e" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "9", + "after": "10" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "agent_account_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x203c268461b8f2a65bfcf75ec7e0c7d73e66cfe8f10d967304ecbaa1fa7211d6", + "value": "0x203c268461b8f2a65bfcf75ec7e0c7d73e66cfe8f10d967304ecbaa1fa7211d641f0bb70c6bc1acbb4949c9926fc4026d837be1e08434de9a186b46415d4421c" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xb539c517573818f12fa8d1a3604ec24296225a26ef76fb9badeaabed55b4f3dd", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "10", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "model_passport_update", + "payloadHash": "0x1441fc64083c7cef50ff08f8e469ca59f0c09b80dc15e811b52700a7b87968fb", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "model_passport_update", + "payloadId": "0xe3cab3f31196df112aea6f29a374fb337acdab4b06e38b4af4d7c791a7651c59", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "10", + "details": { + "lifecycleUpdateId": "0xf5a85105d2d5754e0c1b65b0007f87d468d2bd8213b8eb95ef1d384d61cd34d6", + "objectType": "ModelPassport", + "operation": "create", + "objectId": "0xa73adb911f58e33dcd820471675d7a3d2b242be0574e217b144f4873135a4085", + "objectHash": "0xd5de49d30e0ff04ff2de2141d119bbfb46f3b741ce529f0594936a1cfba296d3", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0xdea6e290610e42576dc9fa8855c1d8e4cbedb6106cff9976ff36ddb79b6ccbcb", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:model_passport_update", + "account_nonce:10" + ], + "stateWrites": [ + "model_passport_update:state_write:0xe3cab3f31196df112aea6f29a374fb337acdab4b06e38b4af4d7c791a7651c59" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "10", + "after": "11" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "model_passport_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x374db9766c01ee8756caf4dc7d9c18b0c82b366a481aedbaf231c787472d761f", + "value": "0x374db9766c01ee8756caf4dc7d9c18b0c82b366a481aedbaf231c787472d761f1e31e11444a086edf6e2e1c946256dbbd6ece936f179408b30709a5db93599d4" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x81650a8cda675785e199f8259b80fee11abadc43fffbf619ed694920c2b20fea", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "11", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "work_receipt_update", + "payloadHash": "0xb808fb23de2a4c5931df1bd0793a50e300e384056191bf8ec43c40a63f72cd6e", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "work_receipt_update", + "payloadId": "0x0f20ce102d27fae1dcd6e39ede8549a9ce20ea089bf7e850bd78bfbae1b3c904", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "11", + "details": { + "lifecycleUpdateId": "0x44a1288ac877ce018ed5e155c43be6131a3f861a2733bb964f60ee66eee4b9cd", + "objectType": "WorkReceipt", + "operation": "create", + "objectId": "0xa96483b49a3d6005d748a512e00ab0bf1feb77d2bad4dec4f7842310bfe401f7", + "objectHash": "0xeb0475e34e1b2818d882210c44d3a3d8c6f30b1e551b827c48d9b0619ad238d9", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0x9dd038e0ce4935319fda5f8a95674362d8b33b1d3ee787820e6c343b788cd58d", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:work_receipt_update", + "account_nonce:11" + ], + "stateWrites": [ + "work_receipt_update:state_write:0x0f20ce102d27fae1dcd6e39ede8549a9ce20ea089bf7e850bd78bfbae1b3c904" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "11", + "after": "12" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "work_receipt_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x567bc1def071888630c1b448279a6d4a44e9d00e87f4258c49a5f2bd3eac7bbf", + "value": "0x567bc1def071888630c1b448279a6d4a44e9d00e87f4258c49a5f2bd3eac7bbfd31a9c86dfc12050deb8f11fd8b8b368016aefa60ebcac8ba5262ec4243cfff4" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xf2755e509ad9a58d6c4d969ada79f08d7bfa7ceeef4d0b439959f8108ee8d026", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "12", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "artifact_availability_proof_update", + "payloadHash": "0x12875a7d20ac4115fd8b73a789a08659c80b62fa43eb61ae307c918449665593", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "artifact_availability_proof_update", + "payloadId": "0x368dde5881c4ace9e3f79d3c0c0544a33c5f397138b566019a4582b334f91d5b", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "12", + "details": { + "lifecycleUpdateId": "0x60734dd1226e4077c9e65ca13677b93fa7ffa60f82842b5091bf78afb81e8a47", + "objectType": "ArtifactAvailabilityProof", + "operation": "create", + "objectId": "0x7458f4ac71bc9008bc012e2a8cec5b529772b58f6fc86ab44bcd339a7070e069", + "objectHash": "0x67aed44d292f94b1bd141ec1f355955f96283783e08152a7237e2d37810fd49a", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0x86d33924cdab0b02f52329c23c47a17fc366aaa1f25ffe86cb043d45dce2645e", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:artifact_availability_proof_update", + "account_nonce:12" + ], + "stateWrites": [ + "artifact_availability_proof_update:state_write:0x368dde5881c4ace9e3f79d3c0c0544a33c5f397138b566019a4582b334f91d5b" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "12", + "after": "13" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "artifact_availability_proof_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x712e542a9bac78e3eaaf053ea5aa79579c48d11598be10b4ca1ff3464e66fbbd", + "value": "0x712e542a9bac78e3eaaf053ea5aa79579c48d11598be10b4ca1ff3464e66fbbddc65ca3fc5efda2596a2f0228be45b73b3bbc85552f8a65f29cf6721ad63b967" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x14c854dedf7535dc4b6d7aebf6891905d35889f95341e72df121c31d82bc2717", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "13", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "verifier_module_update", + "payloadHash": "0x0aca3f36b89204ac92eda6e6f868fc0b3ea6025c09c4ae96e7fb50ad81705fc8", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "verifier_module_update", + "payloadId": "0x995dde6d97ac1eb6929e4bd4e039cf288b5be4d092c79f62701babcbeae04829", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "13", + "details": { + "lifecycleUpdateId": "0xc92d8a917522ff573364e22a1794e254f09dd825645397bb02657eb883e82eb5", + "objectType": "VerifierModule", + "operation": "create", + "objectId": "0x5194f738c5e5d252e0ae82f28883d732b762b9944f20181b854841875c45c54b", + "objectHash": "0xfef87b4fe768283b6e0e741bde3c43e635ce3f89f769285e356027c813877895", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0xa02d1408d6f854615536af9e3fcc3c691eb8c6fad87ef68a6401fe6618618c5c", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:verifier_module_update", + "account_nonce:13" + ], + "stateWrites": [ + "verifier_module_update:state_write:0x995dde6d97ac1eb6929e4bd4e039cf288b5be4d092c79f62701babcbeae04829" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "13", + "after": "14" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "verifier_module_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x178b1397398ff39f53ede827aa50a384566c48f380f6ff70bbd2e30c17918745", + "value": "0x178b1397398ff39f53ede827aa50a384566c48f380f6ff70bbd2e30c179187456f7b1343945a7e3cafd48063b5029c6f4a7f64bdb2ba6425ceccf515cd201e1f" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xc86669294104fea26444eb412d85a6b4c940d0d05c3fdccef2c26bc7753ca0af", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "14", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "verifier_report_update", + "payloadHash": "0x9073c274dd94bfb13fbf1c40965935b5183f8f3151b09acbb020d9d94a9385fe", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "verifier_report_update", + "payloadId": "0xb32efbce075e1cb579dd1f336f3e3f19f0376bb97a73d4e9c3a42908551aee40", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "14", + "details": { + "lifecycleUpdateId": "0x2908295b327e718d264dabc5f5498f56890e28243d77aee467b194f05dcdf86e", + "objectType": "VerifierReport", + "operation": "create", + "objectId": "0x5d0ad9b32f26abc0cd7be3b8869c51aefbc3cdd5d3f01735a8820fb7ff0910e1", + "objectHash": "0xa8d1865f5910ec6a9b615c48d7768e6a6ad3d3647495ffd5e5f6e9a8870a9489", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0xb5679c8d1628adadf665abcd5c9ba0654a9cddb98de4d2fad83da2e561a17d13", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:verifier_report_update", + "account_nonce:14" + ], + "stateWrites": [ + "verifier_report_update:state_write:0xb32efbce075e1cb579dd1f336f3e3f19f0376bb97a73d4e9c3a42908551aee40" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "14", + "after": "15" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "verifier_report_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x34afe42f2c19ff474384a3fae65c8adca908053d4c74c6a52456954cdaa4ba3e", + "value": "0x34afe42f2c19ff474384a3fae65c8adca908053d4c74c6a52456954cdaa4ba3ec4829eee2eb535113d2a6c1f1713ce7e5fd15ffdfb34942478601ba4f92746b1" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x09b13bb36deeecd2f862620273e0c13b1c0c02e4545553117dc8eab61082a546", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "15", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "memory_cell_update", + "payloadHash": "0x95975da8734fca016e8c2f93ec5828fa0f19d6e571d871a2d0fe97f797b75d6f", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "memory_cell_update", + "payloadId": "0x119ce8e2b8bff44f6dd3e58c5f55142f4b91192bd88dc4b342beb1dda2e4ec2b", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "15", + "details": { + "lifecycleUpdateId": "0x8dcd30dfa2af2149622159d554cfd4b406e3b957d33c20f2d24d5e93f062807f", + "objectType": "MemoryCell", + "operation": "create", + "objectId": "0xbcd05714eabfa7babbe32888041eaca0f715073f92e8c8cbd1f81922eeab5b16", + "objectHash": "0x86eeee0b28fa6533fd4220fb4953e78c29e1d545d3cffea2d985053157923619", + "status": "active", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0x58bd17bc953ceac0890366bbcb897f36926712b1f5b14b648e2fec47c8833281", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:memory_cell_update", + "account_nonce:15" + ], + "stateWrites": [ + "memory_cell_update:state_write:0x119ce8e2b8bff44f6dd3e58c5f55142f4b91192bd88dc4b342beb1dda2e4ec2b" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "15", + "after": "16" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "memory_cell_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x02c6d16114becab27062bec4294a991a44cfad1a85c9c4203c852e442ee9423a", + "value": "0x02c6d16114becab27062bec4294a991a44cfad1a85c9c4203c852e442ee9423a88307792b4fa2188839c0c5075254977a8bb73f1ce79e3b5de1e741e122ff712" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0xc20e5b49cac7f27690643613dac7e35f00452e826cbc22b4ddd7107d224a4b4a", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "16", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "challenge_update", + "payloadHash": "0x098203b68b7bfa8eb206ba3e10aa3dcc86d203edffc05ffa01de503641f73a60", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "challenge_update", + "payloadId": "0x3b5f3c39e177cbe3f68b3e17c3386c42bc9bd233bc1481d53eac73751d910b38", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "16", + "details": { + "lifecycleUpdateId": "0xf83daf6567077f2d934cecbba620031985e36727c891e81311552640ef930ef3", + "objectType": "Challenge", + "operation": "create", + "objectId": "0x927bb5cb7a259e9ef7a3ca9ed94f4f536928f87ecec25ef8e04eb3dd16884ad9", + "objectHash": "0xa73c3472a504f9dd8d98b3851f88a1fbaf9914524c0a7879172268bcc3225acf", + "status": "resolved", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0xa148aa4f0555533c2cb50a4b7a6c705ea1952ed7622cd4f8f978868b66277863", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:challenge_update", + "account_nonce:16" + ], + "stateWrites": [ + "challenge_update:state_write:0x3b5f3c39e177cbe3f68b3e17c3386c42bc9bd233bc1481d53eac73751d910b38" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "16", + "after": "17" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "challenge_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0xaea8ccac2f425c2e879919a426d2f0134490645480109e1ec4ab3989d6ee877a", + "value": "0xaea8ccac2f425c2e879919a426d2f0134490645480109e1ec4ab3989d6ee877a3225d734144d1cb416db73c545216ac6ab28fae4014816a910bc54aefd61d8db" + } + }, + { + "schema": "flowchain.production_l1.transaction_envelope.v0", + "txId": "0x39cfb18c324d443d4096ea96c5f5a6f307558025a7bf1df7286df3d5811fe37d", + "protocolVersion": "flowchain.private_local_l1.protocol.v0", + "chainId": "7428453", + "networkProfile": "flowchain-base8453-pilot", + "genesisHash": "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + "nonce": "17", + "nonceDomain": "0x02a7170b32f06e676036e7f0df7a0c1b5aed6d97730abc30f29e6a6d22b610ac", + "signer": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "publicKey": "0x02a332e6b5637c5584cf1b19a24410a74a86715d1d054f5bf1f1054ed789fae974", + "address": "0x160c4dcc0bb4bdc9bdbdd3b652dacdb0a95731d3", + "role": "deployer" + }, + "payloadType": "finality_receipt_update", + "payloadHash": "0xd604885b817860cb2b3456884d3399d65b42386ff4651625542bfc73426aa9df", + "payload": { + "schema": "flowchain.production_l1.transaction_payload.v0", + "payloadType": "finality_receipt_update", + "payloadId": "0x696e3e7a10a04d7d980be69b0c29c7c92de93b98c829b33a33626bc7f6a51ddd", + "actorAccountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "accountNonce": "17", + "details": { + "lifecycleUpdateId": "0x8a5eaff64212d4663055accac2c71d212eb8c09fa387872c263357be1bb8fab9", + "objectType": "FinalityReceipt", + "operation": "finalize", + "objectId": "0xd0017f1d9ab4a827a296feed92d8427582bb2eeac7bc1d006ecb843d2a2022fa", + "objectHash": "0xe8331685281b5709bcff0d968bff6a796d9e78057156c9ad4662bcc6bb8ef1ac", + "status": "finalized", + "rootfieldId": "0xfe983c788ee8d26d12c5fe49c59eb9a641ef0032c8f44f5da893a3fb96f73a5d", + "sourceReceiptId": "0x055948ea197b6ddb3b4b24fa76231e753eed6326db549f88ac3026beb2d5ab94", + "parentObjectId": null + }, + "preconditions": [ + "payload_type:finality_receipt_update", + "account_nonce:17" + ], + "stateWrites": [ + "finality_receipt_update:state_write:0x696e3e7a10a04d7d980be69b0c29c7c92de93b98c829b33a33626bc7f6a51ddd" + ], + "balanceChanges": [], + "nonceChange": { + "accountId": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908", + "before": "17", + "after": "18" + }, + "emittedEventTypes": [ + "ObjectLifecycleUpdated" + ], + "indexKeys": [ + { + "key": "payloadType", + "value": "finality_receipt_update" + }, + { + "key": "actorAccountId", + "value": "0xd6d0a8eb15ca2da58ecde78beb56830564ea3302b3af4215cdccb3a08ff34908" + } + ], + "localOnly": true, + "productionReady": false + }, + "fee": { + "mode": "local_gas_units", + "gasLimit": "1000000", + "maxFeePerGas": "0", + "localExecutionCostLimit": "1000000" + }, + "expiration": { + "validAfterBlock": "0", + "validUntilBlock": "100", + "expiresAtUnixMs": "1778691600000" + }, + "signature": { + "scheme": "fixture-secp256k1-digest-only", + "signingDigest": "0x14257ecfda35adc39a8373793133bd06935417159dc31980cd783db8cb124442", + "value": "0x14257ecfda35adc39a8373793133bd06935417159dc31980cd783db8cb12444226fe91f37110b380180f5549df1f929e714381dbb733f6020980717aff33ec3e" + } + } + ] +} diff --git a/infra/scripts/flowchain-bridge-mock-e2e.mjs b/infra/scripts/flowchain-bridge-mock-e2e.mjs new file mode 100644 index 00000000..e8c55c23 --- /dev/null +++ b/infra/scripts/flowchain-bridge-mock-e2e.mjs @@ -0,0 +1,77 @@ +#!/usr/bin/env node +import { spawnSync } from "node:child_process"; +import { existsSync, readFileSync, writeFileSync, mkdirSync } from "node:fs"; +import { dirname, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; + +const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), "../.."); +const bridgeRelayerRoot = resolve(repoRoot, "services/bridge-relayer"); +const reportDir = resolve(repoRoot, "devnet/local/live-l1-protocol"); +const reportPath = resolve(reportDir, "bridge-mock-e2e-report.json"); + +function run(label, command, args, options = {}) { + const result = spawnSync(command, args, { + cwd: options.cwd ?? repoRoot, + stdio: "inherit", + env: process.env + }); + if (result.status !== 0) { + const reason = result.error ? `: ${result.error.message}` : ""; + throw new Error(`${label} failed${reason}`); + } +} + +function readJson(path) { + return JSON.parse(readFileSync(path, "utf8")); +} + +function writeJson(path, value) { + mkdirSync(dirname(path), { recursive: true }); + writeFileSync(path, `${JSON.stringify(value, null, 2)}\n`); +} + +run( + "bridge mock observer", + process.execPath, + [ + "src/observe-base-lockbox.ts", + "--mode", + "mock", + "--fixture", + "../../fixtures/bridge/base-sepolia-mock-deposit.json", + "--out", + "out/bridge-observation.json", + "--credit-out", + "out/bridge-credit.json", + "--handoff-out", + "out/bridge-runtime-handoff.json" + ], + { cwd: bridgeRelayerRoot } +); +run("live L1 protocol verifier", process.execPath, ["infra/scripts/flowchain-live-l1-protocol-verify.mjs"]); + +const observationPath = resolve(repoRoot, "services/bridge-relayer/out/bridge-observation.json"); +const creditPath = resolve(repoRoot, "services/bridge-relayer/out/bridge-credit.json"); +const handoffPath = resolve(repoRoot, "services/bridge-relayer/out/bridge-runtime-handoff.json"); +for (const path of [observationPath, creditPath, handoffPath]) { + if (!existsSync(path)) throw new Error(`bridge mock output missing: ${path}`); +} + +const observation = readJson(observationPath); +const credit = readJson(creditPath); +const handoff = readJson(handoffPath); +if (!observation.observationId || !credit.creditId || !Array.isArray(handoff.credits)) { + throw new Error("bridge mock output did not include observation, credit, and handoff credit objects"); +} + +writeJson(reportPath, { + schema: "flowchain.bridge_mock_e2e.report.v0", + generatedAt: new Date().toISOString(), + finalStatus: "PASS", + observationPath, + creditPath, + handoffPath, + protocolReportPath: resolve(reportDir, "protocol-conformance-report.json") +}); + +console.log(`FLOWCHAIN_BRIDGE_MOCK_E2E_PASS report=${reportPath}`); diff --git a/infra/scripts/flowchain-live-l1-protocol-verify.mjs b/infra/scripts/flowchain-live-l1-protocol-verify.mjs new file mode 100644 index 00000000..b46a2594 --- /dev/null +++ b/infra/scripts/flowchain-live-l1-protocol-verify.mjs @@ -0,0 +1,240 @@ +#!/usr/bin/env node +import { spawnSync } from "node:child_process"; +import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs"; +import { dirname, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; + +const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), "../.."); +const reportRoot = resolve(repoRoot, "devnet/local/live-l1-protocol"); +const runRoot = resolve(reportRoot, "run"); +const statePath = resolve(runRoot, "state.json"); +const importedStatePath = resolve(runRoot, "imported-state.json"); +const snapshotPath = resolve(runRoot, "export-snapshot.json"); +const handoffDir = resolve(runRoot, "handoff"); +const reportPath = resolve(reportRoot, "protocol-conformance-report.json"); +const cargoTargetDir = resolve(repoRoot, "target/live-l1-protocol"); +const cargoManifest = "crates/flowmemory-devnet/Cargo.toml"; + +function readJson(path) { + return JSON.parse(readFileSync(path, "utf8")); +} + +function writeJson(path, value) { + mkdirSync(dirname(path), { recursive: true }); + writeFileSync(path, `${JSON.stringify(value, null, 2)}\n`); +} + +function run(label, command, args, options = {}) { + const result = spawnSync(command, args, { + cwd: repoRoot, + encoding: "utf8", + stdio: options.capture ? "pipe" : "inherit", + env: { + ...process.env, + CARGO_TARGET_DIR: cargoTargetDir + } + }); + if (result.status !== 0) { + const detail = result.stderr || result.stdout || ""; + throw new Error(`${label} failed${detail ? `: ${detail}` : ""}`); + } + return result.stdout?.trim() ?? ""; +} + +function cargoDevnet(args, options = {}) { + return run( + `flowmemory-devnet ${args.join(" ")}`, + "cargo", + ["run", "--quiet", "--manifest-path", cargoManifest, "--", ...args], + options + ); +} + +function latestReceiptError(stateFile) { + const state = readJson(stateFile); + const latest = state.blocks[state.blocks.length - 1]; + const rejected = latest?.receipts?.find((receipt) => receipt.status === "rejected"); + return rejected?.error ?? ""; +} + +function runRejectedEvidenceCase(caseId, evidence, expectedCode) { + const caseDir = resolve(runRoot, "negative", caseId); + mkdirSync(caseDir, { recursive: true }); + const caseState = resolve(caseDir, "state.json"); + const fixturePath = resolve(caseDir, "bridge-evidence.json"); + writeJson(fixturePath, { + schema: "flowchain.production_l1.bridge_evidence_fixture_set.v0", + bridgeEvidence: [evidence] + }); + cargoDevnet(["--state", caseState, "init"]); + cargoDevnet(["--state", caseState, "submit-fixture", "--fixture", fixturePath]); + cargoDevnet(["--state", caseState, "start", "--blocks", "1"]); + const error = latestReceiptError(caseState); + if (!error.includes(expectedCode)) { + throw new Error(`${caseId} expected ${expectedCode}, got ${error || "no rejection"}`); + } + return { caseId, expectedCode, observedError: error, status: "PASS" }; +} + +function assertLiveState(state, importedState, summary) { + const checks = [ + ["protocol accounts", Object.keys(state.protocolAccounts ?? {}).length >= 6], + ["protocol balances", Object.keys(state.protocolBalances ?? {}).length >= 4], + ["bridge evidence", Object.keys(state.protocolBridgeEvidence ?? {}).length === 2], + ["bridge credit", Object.keys(state.protocolBridgeCredits ?? {}).length === 1], + ["bridge replay index", Object.keys(state.protocolBridgeReplayIndex ?? {}).length === 1], + ["protocol receipts", Object.keys(state.protocolReceipts ?? {}).length === 23], + ["protocol events", Object.keys(state.protocolEvents ?? {}).length === 23], + ["event receipt index", Object.keys(state.protocolEventReceiptIndex ?? {}).length === 23], + ["withdrawal intent", Object.keys(state.protocolWithdrawals ?? {}).length === 1], + ["validator authority", Object.keys(state.protocolValidatorAuthorities ?? {}).length >= 1], + ["finality vote", Object.keys(state.protocolFinalityVotes ?? {}).length === 1], + ["finality certificate", Object.keys(state.protocolFinalityCertificates ?? {}).length === 1], + ["object store", Object.keys(state.protocolObjectStore ?? {}).length === 9], + ["import preserved bridge credits", JSON.stringify(importedState.protocolBridgeCredits) === JSON.stringify(state.protocolBridgeCredits)], + ["import preserved replay index", JSON.stringify(importedState.protocolBridgeReplayIndex) === JSON.stringify(state.protocolBridgeReplayIndex)], + ["import preserved receipts", JSON.stringify(importedState.protocolReceipts) === JSON.stringify(state.protocolReceipts)], + ["import preserved event index", JSON.stringify(importedState.protocolEventReceiptIndex) === JSON.stringify(state.protocolEventReceiptIndex)], + ["state root matches summary", summary.stateRoot === state.blocks.at(-1)?.stateRoot] + ]; + const failed = checks.filter(([, ok]) => !ok).map(([name]) => name); + if (failed.length > 0) { + throw new Error(`live protocol state checks failed: ${failed.join(", ")}`); + } + return Object.fromEntries(checks.map(([name, ok]) => [name, ok ? "PASS" : "FAIL"])); +} + +function conformanceItems(state, summary) { + return [ + ["genesis schema and genesis hash", true, "code-enforced", `production genesis hash ${state.protocolGenesisHash ?? "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f"} is bound by transaction validation`], + ["account model", true, "code-enforced", `${Object.keys(state.protocolAccounts).length} protocol accounts initialized with nonces and public metadata`], + ["transaction envelope schema", true, "code-enforced", "production envelopes are parsed as state-machine transactions and checked for chain/profile/genesis/hash/nonce/signer identity"], + ["state transition catalog", true, "code-enforced", "all 23 catalog payloads applied through apply_transaction in one live block"], + ["receipt catalog", true, "code-enforced", `${Object.keys(state.protocolReceipts).length} protocol receipts generated by the live state machine`], + ["event catalog", true, "code-enforced", `${Object.keys(state.protocolEvents).length} protocol events generated and event-receipt indexed`], + ["block header/body schema", true, "code-backed", "live devnet blocks carry tx ids, receipts, state root, parent hash, and block hash; production header schema remains validated by fixture gate"], + ["block hash rules", true, "code-enforced", `latest block ${state.blocks.at(-1).blockHash} commits tx ids, receipts, parent hash, and state root`], + ["state root manifest", true, "code-enforced", `state root ${summary.stateRoot} includes bridge evidence, credit, replay, receipt, event, balance, withdrawal, validator, and finality maps`], + ["finality receipt schema", true, "code-backed", "local finality vote and certificate objects are code-backed; production consensus remains blocked"], + ["validator authority schema", true, "code-backed", `${Object.keys(state.protocolValidatorAuthorities).length} validator authority rows are code-backed in state`], + ["bridge evidence schema", true, "code-enforced", `${Object.keys(state.protocolBridgeEvidence).length} bridge evidence rows accepted only after source/finality/hash/replay validation`], + ["export snapshot schema", true, "code-enforced", "export/import round trip preserved bridge credit, receipt, replay index, account balance, event receipt index, and finality state"] + ].map(([item, neededForLiveBridgeAndSpending, status, evidence]) => ({ + item, + neededForLiveBridgeAndSpending, + status, + fixtureOnly: false, + docOnly: false, + evidence + })); +} + +function main() { + mkdirSync(reportRoot, { recursive: true }); + rmSync(runRoot, { recursive: true, force: true }); + mkdirSync(runRoot, { recursive: true }); + + run("production protocol schema validation", "node", ["fixtures/production-l1/production-l1-tools.mjs", "validate-protocol"]); + run("production fixture validation", "node", ["fixtures/production-l1/production-l1-tools.mjs", "validate-fixtures"]); + + cargoDevnet(["--state", statePath, "init"]); + cargoDevnet(["--state", statePath, "submit-fixture", "--fixture", "fixtures/production-l1/bridge-evidence.valid.json"]); + cargoDevnet(["--state", statePath, "start", "--blocks", "1"]); + cargoDevnet(["--state", statePath, "submit-fixture", "--fixture", "fixtures/production-l1/transactions.valid.json"]); + cargoDevnet(["--state", statePath, "start", "--blocks", "1"]); + cargoDevnet(["--state", statePath, "export-state", "--out", snapshotPath]); + cargoDevnet(["--state", importedStatePath, "import-state", "--from", snapshotPath]); + cargoDevnet(["--state", statePath, "export", "--out-dir", handoffDir]); + const summary = JSON.parse(cargoDevnet(["--state", statePath, "inspect-state", "--summary"], { capture: true })); + + const state = readJson(statePath); + const importedState = readJson(importedStatePath); + const liveStateChecks = assertLiveState(state, importedState, summary); + + const evidence = readJson(resolve(repoRoot, "fixtures/production-l1/bridge-evidence.valid.json")).bridgeEvidence[0]; + const invalidSource = { ...evidence, sourceChainId: 1 }; + const wrongLockbox = { ...evidence, lockboxAddress: "0x1111111111111111111111111111111111111111" }; + const overCap = { ...evidence, amount: "5000001" }; + const pending = { ...evidence, finalityStatus: "source_pending" }; + const mutated = { ...evidence, depositorAddress: "0x2222222222222222222222222222222222222222" }; + const duplicateFixture = resolve(runRoot, "duplicate-bridge-evidence.json"); + writeJson(duplicateFixture, { + schema: "flowchain.production_l1.bridge_evidence_fixture_set.v0", + bridgeEvidence: [evidence] + }); + cargoDevnet(["--state", statePath, "submit-fixture", "--fixture", duplicateFixture]); + cargoDevnet(["--state", statePath, "start", "--blocks", "1"]); + const duplicateError = latestReceiptError(statePath); + if (!duplicateError.includes("FC_PROTO_DUPLICATE_BRIDGE_EVENT")) { + throw new Error(`duplicate bridge event expected FC_PROTO_DUPLICATE_BRIDGE_EVENT, got ${duplicateError || "no rejection"}`); + } + const negativeChecks = [ + { caseId: "duplicate_base_source_event", expectedCode: "FC_PROTO_DUPLICATE_BRIDGE_EVENT", observedError: duplicateError, status: "PASS" }, + runRejectedEvidenceCase("invalid_source_chain", invalidSource, "FC_PROTO_INVALID_BRIDGE_SOURCE_CHAIN"), + runRejectedEvidenceCase("wrong_lockbox", wrongLockbox, "FC_PROTO_WRONG_LOCKBOX"), + runRejectedEvidenceCase("over_cap_amount", overCap, "FC_PROTO_BRIDGE_AMOUNT_OVER_CAP"), + runRejectedEvidenceCase("unsatisfied_confirmation_proof", pending, "FC_PROTO_BRIDGE_CONFIRMATION_UNSATISFIED"), + runRejectedEvidenceCase("mutated_bridge_evidence", mutated, "FC_PROTO_MUTATED_BRIDGE_EVIDENCE") + ]; + + const finalState = readJson(statePath); + const items = conformanceItems(finalState, summary); + const fixtureOnly = items.filter((item) => + item.neededForLiveBridgeAndSpending && (item.fixtureOnly || item.docOnly || !["code-enforced", "code-backed"].includes(item.status)) + ); + if (fixtureOnly.length > 0) { + throw new Error(`fixture-only/doc-only live protocol items: ${fixtureOnly.map((item) => item.item).join(", ")}`); + } + + const report = { + schema: "flowchain.live_l1_protocol.conformance_report.v0", + generatedAt: new Date().toISOString(), + finalStatus: "PASS", + scope: "private/local live L1 bridge and spending protocol gate", + protocolVersion: "flowchain.private_local_l1.protocol.v0", + chainId: "7428453", + networkProfile: "flowchain-base8453-pilot", + genesisHash: "0x0826d4c5093c967d57dd5239b8c24e089dc898942291b5f3050a129887041e7f", + statePath, + importedStatePath, + snapshotPath, + handoffDir, + stateRoot: summary.stateRoot, + latestBlockHash: finalState.blocks.at(-1).blockHash, + postNegativeBlockCount: finalState.blocks.length, + liveStateChecks, + negativeChecks, + conformanceItems: items, + goNoGo: { + livePrivateLocalBridgeAndSpending: "PASS", + productionMainnetOrPublicValidatorLaunch: "CODE-BLOCKED" + }, + productionBlockers: [ + { + item: "production consensus", + status: "CODE-BLOCKED", + reason: "local finality vote/certificate rows are code-backed, but public validator consensus, fork choice, slashing, and quorum operation are not proven" + }, + { + item: "validator/audit readiness", + status: "CODE-BLOCKED", + reason: "validator authority schema exists, but independent validator operations and security audit evidence are incomplete" + }, + { + item: "proof system", + status: "CODE-BLOCKED", + reason: "proof circuits, audited cryptographic proving, and production verifier economics are not implemented" + }, + { + item: "production bridge", + status: "CODE-BLOCKED", + reason: "Base evidence validation and local accounting are enforced, but this remains a private/local no-value bridge lifecycle gate" + } + ] + }; + + writeJson(reportPath, report); + console.log(`FLOWCHAIN_LIVE_L1_PROTOCOL_VERIFY_PASS report=${reportPath}`); +} + +main(); diff --git a/infra/scripts/flowchain-no-secret-scan.mjs b/infra/scripts/flowchain-no-secret-scan.mjs new file mode 100644 index 00000000..380884ac --- /dev/null +++ b/infra/scripts/flowchain-no-secret-scan.mjs @@ -0,0 +1,186 @@ +#!/usr/bin/env node +import { existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs"; +import { dirname, extname, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; + +const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), "../.."); +const reportDir = resolve(repoRoot, "devnet/local/live-l1-protocol"); +const reportPath = resolve(reportDir, "no-secret-scan-report.json"); + +const skipDirs = new Set([ + ".git", + "node_modules", + "dist", + "cache", + "out", + "broadcast", + "target", + "target-local" +]); + +const textExtensions = new Set([ + "", + ".cjs", + ".css", + ".html", + ".js", + ".json", + ".jsx", + ".lock", + ".md", + ".mjs", + ".ps1", + ".rs", + ".sol", + ".toml", + ".ts", + ".tsx", + ".txt", + ".yaml", + ".yml" +]); + +const secretPatterns = [ + { + name: "named credential literal", + regex: /\b(?:private[_-]?key|secret(?:[_-]?key)?|api[_-]?key|webhook(?:[_-]?url)?|mnemonic|seed[_-]?phrase|rpc[_-]?url)\b\s*[:=]\s*["']([^"'\s]{16,})["']/gi, + capture: 1 + }, + { + name: "json credential field", + regex: /"(?:privateKey|private_key|secret|secretKey|secret_key|apiKey|api_key|webhookUrl|webhook_url|mnemonic|seedPhrase|seed_phrase|rpcUrl|rpc_url)"\s*:\s*"([^"]{16,})"/gi, + capture: 1 + }, + { + name: "provider token", + regex: /\b(sk-[A-Za-z0-9_-]{20,}|ghp_[A-Za-z0-9_]{20,}|github_pat_[A-Za-z0-9_]{20,}|xox[baprs]-[A-Za-z0-9-]{20,})\b/g, + capture: 1 + }, + { + name: "private key hex literal", + regex: /\bprivate[_ -]?key\b.*\b(0x[0-9a-fA-F]{64})\b/gi, + capture: 1 + } +]; + +function relative(path) { + return path.slice(repoRoot.length + 1).replaceAll("\\", "/"); +} + +function isAllowedPlaceholder(value) { + const normalized = value.trim().toLowerCase(); + return ( + normalized.startsWith("$") || + normalized.startsWith("%") || + normalized.startsWith("<") || + normalized.includes("process.env") || + normalized.includes("redacted") || + normalized.includes("placeholder") || + normalized.includes("example") || + normalized.includes("not-set") || + normalized === "none" || + normalized === "null" + ); +} + +function walk(dir, files) { + const entries = readdirSync(dir, { withFileTypes: true }); + for (const entry of entries) { + const path = resolve(dir, entry.name); + if (entry.isDirectory()) { + if (skipDirs.has(entry.name)) continue; + if (relative(path).startsWith("devnet/local/")) continue; + walk(path, files); + continue; + } + if (!entry.isFile()) continue; + const ext = extname(entry.name).toLowerCase(); + if (!textExtensions.has(ext)) continue; + const stat = lstatSync(path); + if (stat.size > 5_000_000) continue; + files.push(path); + } +} + +function addScanPath(path, files) { + if (!existsSync(path)) return; + const stat = lstatSync(path); + if (stat.isDirectory()) { + walk(path, files); + return; + } + if (!stat.isFile()) return; + const ext = extname(path).toLowerCase(); + if (!textExtensions.has(ext) || stat.size > 5_000_000) return; + files.push(path); +} + +function scanFile(path) { + const content = readFileSync(path, "utf8"); + const findings = []; + const lines = content.split(/\r?\n/); + for (let index = 0; index < lines.length; index += 1) { + const line = lines[index]; + for (const pattern of secretPatterns) { + pattern.regex.lastIndex = 0; + let match; + while ((match = pattern.regex.exec(line)) !== null) { + const value = match[pattern.capture] ?? ""; + if (isAllowedPlaceholder(value)) continue; + findings.push({ + file: relative(path), + line: index + 1, + pattern: pattern.name, + excerpt: line.replace(value, "") + }); + } + } + } + return findings; +} + +function writeJson(path, value) { + mkdirSync(dirname(path), { recursive: true }); + writeFileSync(path, `${JSON.stringify(value, null, 2)}\n`); +} + +const files = []; +for (const scanPath of [ + "package.json", + "crates/flowmemory-devnet/src", + "crates/flowmemory-devnet/tests", + "docs/agent-runs/production-l1-protocol", + "fixtures/production-l1", + "schemas/flowmemory", + "infra/scripts/flowchain-live-l1-protocol-verify.mjs", + "infra/scripts/flowchain-bridge-mock-e2e.mjs", + "infra/scripts/flowchain-no-secret-scan.mjs" +]) { + addScanPath(resolve(repoRoot, scanPath), files); +} +for (const extraPath of [ + resolve(reportDir, "protocol-conformance-report.json"), + resolve(reportDir, "bridge-mock-e2e-report.json") +]) { + if (existsSync(extraPath) && !files.includes(extraPath)) files.push(extraPath); +} + +const findings = files.flatMap((path) => scanFile(path)); +const report = { + schema: "flowchain.no_secret_scan.report.v0", + generatedAt: new Date().toISOString(), + finalStatus: findings.length === 0 ? "PASS" : "CODE-BLOCKED", + scannedFiles: files.length, + findings +}; +writeJson(reportPath, report); + +if (findings.length > 0) { + console.error(`FLOWCHAIN_NO_SECRET_SCAN_FAIL report=${reportPath}`); + for (const finding of findings.slice(0, 20)) { + console.error(`${finding.file}:${finding.line} ${finding.pattern}`); + } + process.exit(1); +} + +console.log(`FLOWCHAIN_NO_SECRET_SCAN_PASS report=${reportPath} scannedFiles=${files.length}`); diff --git a/package.json b/package.json index d79d409c..9f69a997 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,12 @@ "flowmemory:canary-dashboard": "npm run generate:canary-dashboard --prefix services/flowmemory", "launch:v0": "npm run launch:v0 --prefix services/flowmemory", "validate:launch": "npm run validate --prefix services/flowmemory", + "validate:production-l1-protocol": "node fixtures/production-l1/production-l1-tools.mjs validate-protocol", + "validate:production-l1-fixtures": "node fixtures/production-l1/production-l1-tools.mjs validate-fixtures", + "flowchain:protocol:live-l1:verify": "node infra/scripts/flowchain-live-l1-protocol-verify.mjs", + "flowchain:production-l1:e2e": "node infra/scripts/flowchain-live-l1-protocol-verify.mjs", + "flowchain:bridge:mock:e2e": "node infra/scripts/flowchain-bridge-mock-e2e.mjs", + "flowchain:no-secret:scan": "node infra/scripts/flowchain-no-secret-scan.mjs", "fixtures:check": "npm run fixtures:check --prefix services/flowmemory", "launch:candidate": "npm run contracts:hardening && npm run launch:v0 && npm run validate:launch && npm run fixtures:check && node infra/scripts/check-unsafe-claims.mjs", "build:production": "npm run launch:candidate && npm run build --prefix apps/dashboard", diff --git a/schemas/flowmemory/README.md b/schemas/flowmemory/README.md index ffe6c891..e1e97872 100644 --- a/schemas/flowmemory/README.md +++ b/schemas/flowmemory/README.md @@ -29,6 +29,20 @@ These schemas are the canonical local/test V0 shapes for generated Flow Memory a - `real-value-pilot-operator-config.schema.json` - `real-value-pilot-public-metadata.schema.json` - `control-plane-provenance-response.schema.json` +- `production-network-profile.schema.json` +- `production-genesis.schema.json` +- `production-validator-authority.schema.json` +- `production-account-public-metadata.schema.json` +- `production-transaction-envelope.schema.json` +- `production-transaction-payload.schema.json` +- `production-block-header.schema.json` +- `production-block-body.schema.json` +- `production-receipt.schema.json` +- `production-event.schema.json` +- `production-state-root-manifest.schema.json` +- `production-bridge-evidence.schema.json` +- `production-finality-receipt.schema.json` +- `production-export-snapshot.schema.json` `memory-signal.schema.json` also embeds the `flowmemory.flowpulse_contract_event.v0` shape, which records the `IFlowPulse.FlowPulse` event signature, indexed fields, @@ -63,6 +77,28 @@ env-derived non-secret config, and secret-free public metadata export. Pilot messages include cap fields and are verified through the crypto package without loading vault signing helpers. +The `production-*` schema names define the private/local FlowChain protocol +contract for downstream agents. The names are historical command and folder +vocabulary only; each schema carries `productionReady: false` where applicable +and does not claim public mainnet readiness. Owners are: + +| Schema | Producer | Consumers | +| --- | --- | --- | +| `production-network-profile.schema.json` | protocol/HQ | runtime, wallet, bridge, RPC, dashboard | +| `production-genesis.schema.json` | runtime | wallet, bridge, consensus, RPC, dashboard | +| `production-validator-authority.schema.json` | consensus | runtime, RPC, dashboard | +| `production-account-public-metadata.schema.json` | wallet | runtime, RPC, bridge, dashboard | +| `production-transaction-envelope.schema.json` | wallet/crypto | runtime, RPC, dashboard | +| `production-transaction-payload.schema.json` | wallet/runtime/bridge/consensus | runtime, indexer, dashboard | +| `production-block-header.schema.json` | runtime | consensus, RPC, indexer, dashboard | +| `production-block-body.schema.json` | runtime | RPC, indexer, dashboard | +| `production-receipt.schema.json` | runtime | RPC, indexer, dashboard | +| `production-event.schema.json` | indexer/runtime | RPC, dashboard | +| `production-state-root-manifest.schema.json` | runtime/crypto | consensus, RPC, dashboard | +| `production-bridge-evidence.schema.json` | bridge relayer | runtime, RPC, dashboard | +| `production-finality-receipt.schema.json` | consensus | runtime, RPC, dashboard | +| `production-export-snapshot.schema.json` | runtime/RPC | dashboard, operators, review | + Run the canonical Local Alpha schema/fixture check from the crypto package: ```powershell diff --git a/schemas/flowmemory/production-account-public-metadata.schema.json b/schemas/flowmemory/production-account-public-metadata.schema.json new file mode 100644 index 00000000..c8591b18 --- /dev/null +++ b/schemas/flowmemory/production-account-public-metadata.schema.json @@ -0,0 +1,253 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://flowmemory.local/schemas/flowmemory/production-account-public-metadata.schema.json", + "title": "FlowChain Account Public Metadata V0", + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "accountId", + "label", + "publicKey", + "address", + "addressDerivation", + "nonceDomain", + "roleFlags", + "metadataHash", + "status", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.account_public_metadata.v0", + "x-owner": "wallet" + }, + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "label": { + "type": "string", + "minLength": 1, + "x-owner": "wallet" + }, + "publicKey": { + "type": "string", + "pattern": "^0x(02|03)[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "address": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$", + "x-owner": "wallet" + }, + "addressDerivation": { + "type": "object", + "additionalProperties": false, + "required": [ + "algorithm", + "preimageFields", + "chainIdBinding" + ], + "properties": { + "algorithm": { + "const": "keccak256(compressedSecp256k1PublicKey)[12:32]", + "x-owner": "wallet" + }, + "preimageFields": { + "type": "array", + "items": { + "enum": [ + "publicKey", + "chainId", + "networkProfile" + ] + }, + "minItems": 3, + "uniqueItems": true, + "x-owner": "wallet" + }, + "chainIdBinding": { + "const": true, + "x-owner": "wallet" + } + }, + "x-owner": "wallet" + }, + "nonceDomain": { + "type": "object", + "additionalProperties": false, + "required": [ + "domainId", + "nextNonce", + "replayScope" + ], + "properties": { + "domainId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "nextNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "replayScope": { + "const": "chainId+networkProfile+genesisHash+accountId", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "roleFlags": { + "type": "object", + "additionalProperties": false, + "required": [ + "user", + "validator", + "bridgeOperator", + "deployer", + "relayer", + "emergencyOperator" + ], + "properties": { + "user": { + "type": "boolean", + "x-owner": "wallet" + }, + "validator": { + "type": "boolean", + "x-owner": "wallet" + }, + "bridgeOperator": { + "type": "boolean", + "x-owner": "wallet" + }, + "deployer": { + "type": "boolean", + "x-owner": "wallet" + }, + "relayer": { + "type": "boolean", + "x-owner": "wallet" + }, + "emergencyOperator": { + "type": "boolean", + "x-owner": "wallet" + } + }, + "x-owner": "wallet" + }, + "metadataHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "status": { + "enum": [ + "active", + "inactive" + ], + "x-owner": "runtime" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + }, + "$defs": { + "hex32": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + "address": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$" + }, + "publicKey": { + "type": "string", + "pattern": "^0x(02|03)[0-9a-fA-F]{64}$" + }, + "uintString": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "isoTime": { + "type": "string", + "format": "date-time" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ] + }, + "payloadType": { + "type": "string", + "enum": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ] + }, + "eventType": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "stateComponent": { + "type": "string", + "enum": [ + "accounts", + "balances", + "tokens", + "pools", + "lp_positions", + "bridge_credits", + "withdrawals", + "object_store", + "finality", + "validator_state" + ] + } + } +} diff --git a/schemas/flowmemory/production-block-body.schema.json b/schemas/flowmemory/production-block-body.schema.json new file mode 100644 index 00000000..9da76aed --- /dev/null +++ b/schemas/flowmemory/production-block-body.schema.json @@ -0,0 +1,154 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://flowmemory.local/schemas/flowmemory/production-block-body.schema.json", + "title": "FlowChain Block Body V0", + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "header", + "transactions", + "receipts", + "events", + "bridgeEvidence", + "stateRootManifest" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.block_body.v0", + "x-owner": "runtime" + }, + "header": { + "$ref": "https://flowmemory.local/schemas/flowmemory/production-block-header.schema.json", + "x-owner": "runtime" + }, + "transactions": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "https://flowmemory.local/schemas/flowmemory/production-transaction-envelope.schema.json" + }, + "x-owner": "runtime" + }, + "receipts": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "https://flowmemory.local/schemas/flowmemory/production-receipt.schema.json" + }, + "x-owner": "runtime" + }, + "events": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "https://flowmemory.local/schemas/flowmemory/production-event.schema.json" + }, + "x-owner": "indexer" + }, + "bridgeEvidence": { + "type": "array", + "items": { + "$ref": "https://flowmemory.local/schemas/flowmemory/production-bridge-evidence.schema.json" + }, + "x-owner": "bridge" + }, + "stateRootManifest": { + "$ref": "https://flowmemory.local/schemas/flowmemory/production-state-root-manifest.schema.json", + "x-owner": "runtime" + } + }, + "$defs": { + "hex32": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + "address": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$" + }, + "publicKey": { + "type": "string", + "pattern": "^0x(02|03)[0-9a-fA-F]{64}$" + }, + "uintString": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "isoTime": { + "type": "string", + "format": "date-time" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ] + }, + "payloadType": { + "type": "string", + "enum": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ] + }, + "eventType": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "stateComponent": { + "type": "string", + "enum": [ + "accounts", + "balances", + "tokens", + "pools", + "lp_positions", + "bridge_credits", + "withdrawals", + "object_store", + "finality", + "validator_state" + ] + } + } +} diff --git a/schemas/flowmemory/production-block-header.schema.json b/schemas/flowmemory/production-block-header.schema.json new file mode 100644 index 00000000..66b761f9 --- /dev/null +++ b/schemas/flowmemory/production-block-header.schema.json @@ -0,0 +1,202 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://flowmemory.local/schemas/flowmemory/production-block-header.schema.json", + "title": "FlowChain Block Header V0", + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "chainId", + "networkProfile", + "genesisHash", + "height", + "parentHash", + "timestamp", + "proposer", + "txRoot", + "receiptRoot", + "eventRoot", + "stateRoot", + "evidenceRoot", + "finalizedHeight", + "protocolVersion", + "blockHash" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.block_header.v0", + "x-owner": "runtime" + }, + "chainId": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ], + "x-owner": "runtime" + }, + "genesisHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "height": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "parentHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "x-owner": "runtime" + }, + "proposer": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "txRoot": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "receiptRoot": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "eventRoot": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "stateRoot": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "evidenceRoot": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "finalizedHeight": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "consensus" + }, + "protocolVersion": { + "const": "flowchain.private_local_l1.protocol.v0", + "x-owner": "protocol" + }, + "blockHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + } + }, + "$defs": { + "hex32": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + "address": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$" + }, + "publicKey": { + "type": "string", + "pattern": "^0x(02|03)[0-9a-fA-F]{64}$" + }, + "uintString": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "isoTime": { + "type": "string", + "format": "date-time" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ] + }, + "payloadType": { + "type": "string", + "enum": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ] + }, + "eventType": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "stateComponent": { + "type": "string", + "enum": [ + "accounts", + "balances", + "tokens", + "pools", + "lp_positions", + "bridge_credits", + "withdrawals", + "object_store", + "finality", + "validator_state" + ] + } + } +} diff --git a/schemas/flowmemory/production-bridge-evidence.schema.json b/schemas/flowmemory/production-bridge-evidence.schema.json new file mode 100644 index 00000000..fd00b049 --- /dev/null +++ b/schemas/flowmemory/production-bridge-evidence.schema.json @@ -0,0 +1,332 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://flowmemory.local/schemas/flowmemory/production-bridge-evidence.schema.json", + "title": "FlowChain Bridge Evidence V0", + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "evidenceId", + "evidenceType", + "sourceChainId", + "sourceNetwork", + "lockboxAddress", + "sourceTxHash", + "sourceBlockNumber", + "sourceLogIndex", + "tokenAddress", + "assetId", + "depositorAddress", + "localRecipientAccountId", + "amount", + "observationId", + "creditId", + "duplicateKey", + "evidenceHash", + "observedByRelayerAccountId", + "finalityStatus", + "release", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.bridge_evidence.v0", + "x-owner": "bridge" + }, + "evidenceId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "evidenceType": { + "enum": [ + "deposit_observation", + "withdrawal_release" + ], + "x-owner": "bridge" + }, + "sourceChainId": { + "type": "integer", + "enum": [ + 31337, + 84532, + 8453 + ], + "x-owner": "bridge" + }, + "sourceNetwork": { + "enum": [ + "base-mainnet-source-for-local-private-pilot", + "base-sepolia-test-source", + "local-anvil-test-source" + ], + "x-owner": "bridge" + }, + "lockboxAddress": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$", + "x-owner": "bridge" + }, + "sourceTxHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "sourceBlockNumber": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "bridge" + }, + "sourceLogIndex": { + "type": "integer", + "minimum": 0, + "x-owner": "bridge" + }, + "tokenAddress": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$", + "x-owner": "bridge" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "depositorAddress": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$", + "x-owner": "bridge" + }, + "localRecipientAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "amount": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "bridge" + }, + "observationId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "creditId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "duplicateKey": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "evidenceHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "observedByRelayerAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "finalityStatus": { + "enum": [ + "source_finalized", + "source_pending", + "source_rejected" + ], + "x-owner": "bridge" + }, + "release": { + "anyOf": [ + { + "type": "object", + "additionalProperties": false, + "required": [ + "withdrawalIntentId", + "releaseTxHash", + "releaseBlockNumber", + "releaseLogIndex", + "releasedToAddress", + "releaseAuthorityAccountId" + ], + "properties": { + "withdrawalIntentId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "releaseTxHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "releaseBlockNumber": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "bridge" + }, + "releaseLogIndex": { + "type": "integer", + "minimum": 0, + "x-owner": "bridge" + }, + "releasedToAddress": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$", + "x-owner": "bridge" + }, + "releaseAuthorityAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + } + } + }, + { + "type": "null" + } + ], + "x-owner": "bridge" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + }, + "allOf": [ + { + "if": { + "properties": { + "evidenceType": { + "const": "withdrawal_release" + } + } + }, + "then": { + "properties": { + "release": { + "type": "object" + } + } + } + }, + { + "if": { + "properties": { + "evidenceType": { + "const": "deposit_observation" + } + } + }, + "then": { + "properties": { + "release": { + "type": "null" + } + } + } + } + ], + "$defs": { + "hex32": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + "address": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$" + }, + "publicKey": { + "type": "string", + "pattern": "^0x(02|03)[0-9a-fA-F]{64}$" + }, + "uintString": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "isoTime": { + "type": "string", + "format": "date-time" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ] + }, + "payloadType": { + "type": "string", + "enum": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ] + }, + "eventType": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "stateComponent": { + "type": "string", + "enum": [ + "accounts", + "balances", + "tokens", + "pools", + "lp_positions", + "bridge_credits", + "withdrawals", + "object_store", + "finality", + "validator_state" + ] + } + } +} diff --git a/schemas/flowmemory/production-event.schema.json b/schemas/flowmemory/production-event.schema.json new file mode 100644 index 00000000..9efc7260 --- /dev/null +++ b/schemas/flowmemory/production-event.schema.json @@ -0,0 +1,244 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://flowmemory.local/schemas/flowmemory/production-event.schema.json", + "title": "FlowChain Event V0", + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "eventId", + "eventType", + "payloadType", + "txId", + "receiptId", + "blockHeight", + "eventIndex", + "emitterAccountId", + "subjectId", + "attributes", + "deterministicIdInput" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.event.v0", + "x-owner": "indexer" + }, + "eventId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "indexer" + }, + "eventType": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ], + "x-owner": "indexer" + }, + "payloadType": { + "type": "string", + "enum": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ], + "x-owner": "indexer" + }, + "txId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "indexer" + }, + "receiptId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "indexer" + }, + "blockHeight": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "eventIndex": { + "type": "integer", + "minimum": 0, + "x-owner": "indexer" + }, + "emitterAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "indexer" + }, + "subjectId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "indexer" + }, + "attributes": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value", + "valueType" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "x-owner": "indexer" + }, + "valueType": { + "enum": [ + "hex32", + "address", + "uint", + "string", + "bool" + ], + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "deterministicIdInput": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + } + }, + "$defs": { + "hex32": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + "address": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$" + }, + "publicKey": { + "type": "string", + "pattern": "^0x(02|03)[0-9a-fA-F]{64}$" + }, + "uintString": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "isoTime": { + "type": "string", + "format": "date-time" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ] + }, + "payloadType": { + "type": "string", + "enum": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ] + }, + "eventType": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "stateComponent": { + "type": "string", + "enum": [ + "accounts", + "balances", + "tokens", + "pools", + "lp_positions", + "bridge_credits", + "withdrawals", + "object_store", + "finality", + "validator_state" + ] + } + } +} diff --git a/schemas/flowmemory/production-export-snapshot.schema.json b/schemas/flowmemory/production-export-snapshot.schema.json new file mode 100644 index 00000000..d51330fb --- /dev/null +++ b/schemas/flowmemory/production-export-snapshot.schema.json @@ -0,0 +1,248 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://flowmemory.local/schemas/flowmemory/production-export-snapshot.schema.json", + "title": "FlowChain Export Snapshot V0", + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "chainId", + "networkProfile", + "genesisHash", + "blockHeight", + "blockHash", + "stateRoot", + "stateRootManifest", + "accounts", + "balances", + "tokens", + "pools", + "bridgeCredits", + "withdrawals", + "objectStoreRefs", + "finalityReceipts", + "provenance", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.export_snapshot.v0", + "x-owner": "runtime" + }, + "chainId": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ], + "x-owner": "runtime" + }, + "genesisHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "blockHeight": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "blockHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "stateRoot": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "stateRootManifest": { + "$ref": "https://flowmemory.local/schemas/flowmemory/production-state-root-manifest.schema.json", + "x-owner": "runtime" + }, + "accounts": { + "type": "array", + "items": { + "$ref": "https://flowmemory.local/schemas/flowmemory/production-account-public-metadata.schema.json" + }, + "x-owner": "wallet" + }, + "balances": { + "type": "array", + "x-owner": "runtime" + }, + "tokens": { + "type": "array", + "x-owner": "runtime" + }, + "pools": { + "type": "array", + "x-owner": "runtime" + }, + "bridgeCredits": { + "type": "array", + "x-owner": "bridge" + }, + "withdrawals": { + "type": "array", + "x-owner": "bridge" + }, + "objectStoreRefs": { + "type": "array", + "x-owner": "runtime" + }, + "finalityReceipts": { + "type": "array", + "items": { + "$ref": "https://flowmemory.local/schemas/flowmemory/production-finality-receipt.schema.json" + }, + "x-owner": "consensus" + }, + "provenance": { + "type": "object", + "additionalProperties": false, + "required": [ + "generatedBy", + "schemaNames", + "fixturePaths", + "validationCommands" + ], + "properties": { + "generatedBy": { + "type": "string", + "minLength": 1, + "x-owner": "rpc" + }, + "schemaNames": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "x-owner": "rpc" + }, + "fixturePaths": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "x-owner": "rpc" + }, + "validationCommands": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1, + "x-owner": "rpc" + } + }, + "x-owner": "rpc" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + }, + "$defs": { + "hex32": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + "address": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$" + }, + "publicKey": { + "type": "string", + "pattern": "^0x(02|03)[0-9a-fA-F]{64}$" + }, + "uintString": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "isoTime": { + "type": "string", + "format": "date-time" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ] + }, + "payloadType": { + "type": "string", + "enum": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ] + }, + "eventType": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "stateComponent": { + "type": "string", + "enum": [ + "accounts", + "balances", + "tokens", + "pools", + "lp_positions", + "bridge_credits", + "withdrawals", + "object_store", + "finality", + "validator_state" + ] + } + } +} diff --git a/schemas/flowmemory/production-finality-receipt.schema.json b/schemas/flowmemory/production-finality-receipt.schema.json new file mode 100644 index 00000000..702efa41 --- /dev/null +++ b/schemas/flowmemory/production-finality-receipt.schema.json @@ -0,0 +1,204 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://flowmemory.local/schemas/flowmemory/production-finality-receipt.schema.json", + "title": "FlowChain Finality Receipt V0", + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "finalityReceiptId", + "chainId", + "networkProfile", + "height", + "blockHash", + "stateRoot", + "finalizedHeight", + "finalityRule", + "status", + "validatorSetHash", + "certificateHash", + "evidenceRoot", + "producedAt", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.finality_receipt.v0", + "x-owner": "consensus" + }, + "finalityReceiptId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "chainId": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "consensus" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ], + "x-owner": "consensus" + }, + "height": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "consensus" + }, + "blockHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "stateRoot": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "finalizedHeight": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "consensus" + }, + "finalityRule": { + "enum": [ + "single_authority_instant", + "quorum_2f_plus_1_checkpoint", + "source_base_confirmed_destination_local_finalized" + ], + "x-owner": "consensus" + }, + "status": { + "enum": [ + "pending", + "accepted", + "rejected", + "superseded", + "downgraded" + ], + "x-owner": "consensus" + }, + "validatorSetHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "certificateHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "evidenceRoot": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "producedAt": { + "type": "string", + "format": "date-time", + "x-owner": "consensus" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + }, + "$defs": { + "hex32": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + "address": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$" + }, + "publicKey": { + "type": "string", + "pattern": "^0x(02|03)[0-9a-fA-F]{64}$" + }, + "uintString": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "isoTime": { + "type": "string", + "format": "date-time" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ] + }, + "payloadType": { + "type": "string", + "enum": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ] + }, + "eventType": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "stateComponent": { + "type": "string", + "enum": [ + "accounts", + "balances", + "tokens", + "pools", + "lp_positions", + "bridge_credits", + "withdrawals", + "object_store", + "finality", + "validator_state" + ] + } + } +} diff --git a/schemas/flowmemory/production-genesis.schema.json b/schemas/flowmemory/production-genesis.schema.json new file mode 100644 index 00000000..df861498 --- /dev/null +++ b/schemas/flowmemory/production-genesis.schema.json @@ -0,0 +1,409 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://flowmemory.local/schemas/flowmemory/production-genesis.schema.json", + "title": "FlowChain Genesis V0", + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "protocolVersion", + "networkProfile", + "chainId", + "networkName", + "genesisTimestamp", + "genesisUnixMs", + "stateRootSeed", + "initialAccounts", + "initialBalances", + "validatorSet", + "bridgePilotConfig", + "tokenDexBootstrapConfig", + "genesisHashInput", + "genesisHash", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.genesis.v0", + "x-owner": "runtime" + }, + "protocolVersion": { + "const": "flowchain.private_local_l1.protocol.v0", + "x-owner": "protocol" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ], + "x-owner": "runtime" + }, + "chainId": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "networkName": { + "type": "string", + "minLength": 1, + "x-owner": "runtime" + }, + "genesisTimestamp": { + "type": "string", + "format": "date-time", + "x-owner": "runtime" + }, + "genesisUnixMs": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "stateRootSeed": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "initialAccounts": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "https://flowmemory.local/schemas/flowmemory/production-account-public-metadata.schema.json" + }, + "x-owner": "wallet" + }, + "initialBalances": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "amount", + "balanceType", + "noValue" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "amount": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "balanceType": { + "enum": [ + "native_local_unit", + "test_token" + ], + "x-owner": "runtime" + }, + "noValue": { + "const": true, + "x-owner": "hq-review" + } + } + }, + "x-owner": "runtime" + }, + "validatorSet": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "https://flowmemory.local/schemas/flowmemory/production-validator-authority.schema.json" + }, + "x-owner": "consensus" + }, + "bridgePilotConfig": { + "type": "object", + "additionalProperties": false, + "required": [ + "enabled", + "sourceChainId", + "sourceNetwork", + "destinationProfile", + "lockboxAddress", + "releaseAuthorityAccountId", + "relayerAccountId", + "duplicatePolicy", + "productionReady" + ], + "properties": { + "enabled": { + "type": "boolean", + "x-owner": "bridge" + }, + "sourceChainId": { + "type": "integer", + "enum": [ + 8453 + ], + "x-owner": "bridge" + }, + "sourceNetwork": { + "const": "base-mainnet-source-for-local-private-pilot", + "x-owner": "bridge" + }, + "destinationProfile": { + "const": "flowchain-base8453-pilot", + "x-owner": "bridge" + }, + "lockboxAddress": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$", + "x-owner": "bridge" + }, + "releaseAuthorityAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "relayerAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "duplicatePolicy": { + "const": "reject_same_source_chain_lockbox_tx_hash_log_index", + "x-owner": "bridge" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + }, + "x-owner": "bridge" + }, + "tokenDexBootstrapConfig": { + "type": "object", + "additionalProperties": false, + "required": [ + "nativeAssetId", + "localTokenLaunchAllowed", + "localTokenMintAllowed", + "dexBootstrapAllowed", + "defaultFeeBps", + "productionReady" + ], + "properties": { + "nativeAssetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "localTokenLaunchAllowed": { + "const": true, + "x-owner": "runtime" + }, + "localTokenMintAllowed": { + "const": true, + "x-owner": "runtime" + }, + "dexBootstrapAllowed": { + "const": true, + "x-owner": "runtime" + }, + "defaultFeeBps": { + "type": "integer", + "minimum": 0, + "maximum": 10000, + "x-owner": "runtime" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + }, + "x-owner": "runtime" + }, + "genesisHashInput": { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "protocolVersion", + "networkProfile", + "chainId", + "genesisTimestamp", + "stateRootSeed", + "initialAccountsRoot", + "initialBalancesRoot", + "validatorSetRoot", + "bridgePilotConfigHash", + "tokenDexBootstrapConfigHash" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.genesis_hash_input.v0", + "x-owner": "crypto" + }, + "protocolVersion": { + "const": "flowchain.private_local_l1.protocol.v0", + "x-owner": "crypto" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ], + "x-owner": "crypto" + }, + "chainId": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "crypto" + }, + "genesisTimestamp": { + "type": "string", + "format": "date-time", + "x-owner": "crypto" + }, + "stateRootSeed": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "initialAccountsRoot": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "initialBalancesRoot": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "validatorSetRoot": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "bridgePilotConfigHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "tokenDexBootstrapConfigHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + } + }, + "x-owner": "crypto" + }, + "genesisHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + }, + "$defs": { + "hex32": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + "address": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$" + }, + "publicKey": { + "type": "string", + "pattern": "^0x(02|03)[0-9a-fA-F]{64}$" + }, + "uintString": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "isoTime": { + "type": "string", + "format": "date-time" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ] + }, + "payloadType": { + "type": "string", + "enum": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ] + }, + "eventType": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "stateComponent": { + "type": "string", + "enum": [ + "accounts", + "balances", + "tokens", + "pools", + "lp_positions", + "bridge_credits", + "withdrawals", + "object_store", + "finality", + "validator_state" + ] + } + } +} diff --git a/schemas/flowmemory/production-network-profile.schema.json b/schemas/flowmemory/production-network-profile.schema.json new file mode 100644 index 00000000..82b50a33 --- /dev/null +++ b/schemas/flowmemory/production-network-profile.schema.json @@ -0,0 +1,286 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://flowmemory.local/schemas/flowmemory/production-network-profile.schema.json", + "title": "FlowChain Private/Local Network Profile V0", + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "profileId", + "legacyAliases", + "chainId", + "networkName", + "destinationScope", + "genesisHashRules", + "allowedBridgeSourceChainIds", + "finalityRule", + "blockTimeTargetMs", + "defaultDataDirectory", + "allowedTransactionFamilies", + "productionReady", + "publicMainnetReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.network_profile.v0", + "x-owner": "protocol" + }, + "profileId": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ], + "x-owner": "protocol" + }, + "legacyAliases": { + "type": "array", + "items": { + "enum": [ + "flowchain-local", + "flowchain-private-lan" + ] + }, + "uniqueItems": true, + "x-owner": "protocol" + }, + "chainId": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "networkName": { + "type": "string", + "minLength": 1, + "x-owner": "runtime" + }, + "destinationScope": { + "enum": [ + "local_private" + ], + "x-owner": "runtime" + }, + "genesisHashRules": { + "type": "object", + "additionalProperties": false, + "required": [ + "hashAlgorithm", + "canonicalization", + "domain", + "inputFields" + ], + "properties": { + "hashAlgorithm": { + "const": "keccak256", + "x-owner": "crypto" + }, + "canonicalization": { + "const": "canonical-json-sorted-keys-v0", + "x-owner": "crypto" + }, + "domain": { + "const": "flowchain.production_l1.genesis_hash.v0", + "x-owner": "crypto" + }, + "inputFields": { + "type": "array", + "minItems": 8, + "items": { + "type": "string" + }, + "x-owner": "crypto" + } + }, + "x-owner": "crypto" + }, + "allowedBridgeSourceChainIds": { + "type": "array", + "items": { + "type": "integer", + "enum": [ + 31337, + 84532, + 8453 + ] + }, + "uniqueItems": true, + "x-owner": "bridge" + }, + "finalityRule": { + "type": "object", + "additionalProperties": false, + "required": [ + "rule", + "requiredConfirmations", + "quorum" + ], + "properties": { + "rule": { + "enum": [ + "single_authority_instant", + "quorum_2f_plus_1_checkpoint", + "source_base_confirmed_destination_local_finalized" + ], + "x-owner": "consensus" + }, + "requiredConfirmations": { + "type": "integer", + "minimum": 0, + "x-owner": "consensus" + }, + "quorum": { + "type": "string", + "pattern": "^[0-9]+/[0-9]+$", + "x-owner": "consensus" + } + }, + "x-owner": "consensus" + }, + "blockTimeTargetMs": { + "type": "integer", + "minimum": 0, + "x-owner": "runtime" + }, + "defaultDataDirectory": { + "type": "string", + "minLength": 1, + "x-owner": "runtime" + }, + "allowedTransactionFamilies": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ] + }, + "minItems": 1, + "uniqueItems": true, + "x-owner": "runtime" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + }, + "publicMainnetReady": { + "const": false, + "x-owner": "hq-review" + } + }, + "$defs": { + "hex32": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + "address": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$" + }, + "publicKey": { + "type": "string", + "pattern": "^0x(02|03)[0-9a-fA-F]{64}$" + }, + "uintString": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "isoTime": { + "type": "string", + "format": "date-time" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ] + }, + "payloadType": { + "type": "string", + "enum": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ] + }, + "eventType": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "stateComponent": { + "type": "string", + "enum": [ + "accounts", + "balances", + "tokens", + "pools", + "lp_positions", + "bridge_credits", + "withdrawals", + "object_store", + "finality", + "validator_state" + ] + } + } +} diff --git a/schemas/flowmemory/production-receipt.schema.json b/schemas/flowmemory/production-receipt.schema.json new file mode 100644 index 00000000..c2dfeac7 --- /dev/null +++ b/schemas/flowmemory/production-receipt.schema.json @@ -0,0 +1,260 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://flowmemory.local/schemas/flowmemory/production-receipt.schema.json", + "title": "FlowChain Receipt V0", + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "receiptId", + "txId", + "payloadType", + "status", + "executionCost", + "stateDeltaRef", + "emittedEvents", + "bridgeEvidenceRefs", + "errorCode", + "failureReason", + "deterministicIdInput" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.receipt.v0", + "x-owner": "runtime" + }, + "receiptId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "txId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "payloadType": { + "type": "string", + "enum": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ], + "x-owner": "runtime" + }, + "status": { + "enum": [ + "succeeded", + "failed" + ], + "x-owner": "runtime" + }, + "executionCost": { + "type": "object", + "additionalProperties": false, + "required": [ + "costUnits", + "meter" + ], + "properties": { + "costUnits": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "meter": { + "enum": [ + "local_execution_units", + "local_gas_units" + ], + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "stateDeltaRef": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "emittedEvents": { + "type": "array", + "items": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + "x-owner": "indexer" + }, + "bridgeEvidenceRefs": { + "type": "array", + "items": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + "x-owner": "bridge" + }, + "errorCode": { + "anyOf": [ + { + "type": "string", + "pattern": "^FC_[A-Z0-9_]+$" + }, + { + "type": "null" + } + ], + "x-owner": "rpc" + }, + "failureReason": { + "anyOf": [ + { + "type": "object", + "additionalProperties": false, + "required": [ + "reasonCode", + "displayMessage", + "retryable" + ], + "properties": { + "reasonCode": { + "type": "string", + "pattern": "^FC_[A-Z0-9_]+$", + "x-owner": "rpc" + }, + "displayMessage": { + "type": "string", + "minLength": 1, + "x-owner": "dashboard" + }, + "retryable": { + "type": "boolean", + "x-owner": "rpc" + } + } + }, + { + "type": "null" + } + ], + "x-owner": "rpc" + }, + "deterministicIdInput": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + } + }, + "$defs": { + "hex32": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + "address": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$" + }, + "publicKey": { + "type": "string", + "pattern": "^0x(02|03)[0-9a-fA-F]{64}$" + }, + "uintString": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "isoTime": { + "type": "string", + "format": "date-time" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ] + }, + "payloadType": { + "type": "string", + "enum": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ] + }, + "eventType": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "stateComponent": { + "type": "string", + "enum": [ + "accounts", + "balances", + "tokens", + "pools", + "lp_positions", + "bridge_credits", + "withdrawals", + "object_store", + "finality", + "validator_state" + ] + } + } +} diff --git a/schemas/flowmemory/production-state-root-manifest.schema.json b/schemas/flowmemory/production-state-root-manifest.schema.json new file mode 100644 index 00000000..ee9b2b14 --- /dev/null +++ b/schemas/flowmemory/production-state-root-manifest.schema.json @@ -0,0 +1,246 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://flowmemory.local/schemas/flowmemory/production-state-root-manifest.schema.json", + "title": "FlowChain State Root Manifest V0", + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "chainId", + "networkProfile", + "genesisHash", + "stateRoot", + "stateRootAlgorithm", + "components", + "stateComponents", + "deterministicReplay" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.state_root_manifest.v0", + "x-owner": "runtime" + }, + "chainId": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ], + "x-owner": "runtime" + }, + "genesisHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "stateRoot": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "stateRootAlgorithm": { + "const": "keccak256(canonical-json-sorted-keys-v0)", + "x-owner": "crypto" + }, + "components": { + "type": "array", + "minItems": 10, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "component", + "root", + "count", + "ownerAgent", + "inputs" + ], + "properties": { + "component": { + "type": "string", + "enum": [ + "accounts", + "balances", + "tokens", + "pools", + "lp_positions", + "bridge_credits", + "withdrawals", + "object_store", + "finality", + "validator_state" + ], + "x-owner": "runtime" + }, + "root": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "count": { + "type": "integer", + "minimum": 0, + "x-owner": "runtime" + }, + "ownerAgent": { + "enum": [ + "runtime", + "wallet", + "bridge", + "consensus", + "indexer" + ], + "x-owner": "protocol" + }, + "inputs": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "stateComponents": { + "type": "object", + "additionalProperties": true, + "required": [ + "accounts", + "balances", + "tokens", + "pools", + "lp_positions", + "bridge_credits", + "withdrawals", + "object_store", + "finality", + "validator_state" + ], + "x-owner": "runtime" + }, + "deterministicReplay": { + "type": "object", + "additionalProperties": false, + "required": [ + "sameLogicalStateRoot", + "replayCommand" + ], + "properties": { + "sameLogicalStateRoot": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "replayCommand": { + "type": "string", + "minLength": 1, + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + } + }, + "$defs": { + "hex32": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + "address": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$" + }, + "publicKey": { + "type": "string", + "pattern": "^0x(02|03)[0-9a-fA-F]{64}$" + }, + "uintString": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "isoTime": { + "type": "string", + "format": "date-time" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ] + }, + "payloadType": { + "type": "string", + "enum": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ] + }, + "eventType": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "stateComponent": { + "type": "string", + "enum": [ + "accounts", + "balances", + "tokens", + "pools", + "lp_positions", + "bridge_credits", + "withdrawals", + "object_store", + "finality", + "validator_state" + ] + } + } +} diff --git a/schemas/flowmemory/production-transaction-envelope.schema.json b/schemas/flowmemory/production-transaction-envelope.schema.json new file mode 100644 index 00000000..5a8ad6a2 --- /dev/null +++ b/schemas/flowmemory/production-transaction-envelope.schema.json @@ -0,0 +1,326 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://flowmemory.local/schemas/flowmemory/production-transaction-envelope.schema.json", + "title": "FlowChain Transaction Envelope V0", + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "txId", + "protocolVersion", + "chainId", + "networkProfile", + "genesisHash", + "nonce", + "nonceDomain", + "signer", + "payloadType", + "payloadHash", + "payload", + "fee", + "expiration", + "signature" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_envelope.v0", + "x-owner": "crypto" + }, + "txId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "protocolVersion": { + "const": "flowchain.private_local_l1.protocol.v0", + "x-owner": "protocol" + }, + "chainId": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ], + "x-owner": "runtime" + }, + "genesisHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "nonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "nonceDomain": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "signer": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "publicKey", + "address", + "role" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "publicKey": { + "type": "string", + "pattern": "^0x(02|03)[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "address": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$", + "x-owner": "wallet" + }, + "role": { + "enum": [ + "user", + "validator", + "bridge_operator", + "deployer", + "relayer", + "emergency_operator" + ], + "x-owner": "wallet" + } + }, + "x-owner": "wallet" + }, + "payloadType": { + "type": "string", + "enum": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ], + "x-owner": "runtime" + }, + "payloadHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "payload": { + "$ref": "https://flowmemory.local/schemas/flowmemory/production-transaction-payload.schema.json", + "x-owner": "runtime" + }, + "fee": { + "type": "object", + "additionalProperties": false, + "required": [ + "mode", + "gasLimit", + "maxFeePerGas", + "localExecutionCostLimit" + ], + "properties": { + "mode": { + "enum": [ + "no_fee_local", + "local_gas_units" + ], + "x-owner": "runtime" + }, + "gasLimit": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "maxFeePerGas": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "localExecutionCostLimit": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "expiration": { + "type": "object", + "additionalProperties": false, + "required": [ + "validAfterBlock", + "validUntilBlock", + "expiresAtUnixMs" + ], + "properties": { + "validAfterBlock": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "validUntilBlock": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "expiresAtUnixMs": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "signature": { + "type": "object", + "additionalProperties": false, + "required": [ + "scheme", + "signingDigest", + "value" + ], + "properties": { + "scheme": { + "const": "fixture-secp256k1-digest-only", + "x-owner": "crypto" + }, + "signingDigest": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "value": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{128}$", + "x-owner": "crypto" + } + }, + "x-owner": "crypto" + } + }, + "$defs": { + "hex32": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + "address": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$" + }, + "publicKey": { + "type": "string", + "pattern": "^0x(02|03)[0-9a-fA-F]{64}$" + }, + "uintString": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "isoTime": { + "type": "string", + "format": "date-time" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ] + }, + "payloadType": { + "type": "string", + "enum": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ] + }, + "eventType": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "stateComponent": { + "type": "string", + "enum": [ + "accounts", + "balances", + "tokens", + "pools", + "lp_positions", + "bridge_credits", + "withdrawals", + "object_store", + "finality", + "validator_state" + ] + } + } +} diff --git a/schemas/flowmemory/production-transaction-payload.schema.json b/schemas/flowmemory/production-transaction-payload.schema.json new file mode 100644 index 00000000..aeab442d --- /dev/null +++ b/schemas/flowmemory/production-transaction-payload.schema.json @@ -0,0 +1,5671 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://flowmemory.local/schemas/flowmemory/production-transaction-payload.schema.json", + "title": "FlowChain Transaction Payload Union V0", + "oneOf": [ + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "native_transfer", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "fromAccountId", + "toAccountId", + "assetId", + "amount", + "memoHash" + ], + "properties": { + "fromAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "toAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "amount": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "memoHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + } + }, + "x-owner": "runtime" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "faucet_funding", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "faucetId", + "toAccountId", + "assetId", + "amount", + "reasonHash", + "localOnly" + ], + "properties": { + "faucetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "toAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "amount": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "reasonHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + } + }, + "x-owner": "runtime" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "bridge_credit", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "bridgeEvidenceId", + "observationId", + "creditId", + "sourceChainId", + "assetId", + "amount", + "recipientAccountId" + ], + "properties": { + "bridgeEvidenceId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "observationId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "creditId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "sourceChainId": { + "type": "integer", + "enum": [ + 31337, + 84532, + 8453 + ], + "x-owner": "bridge" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "amount": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "bridge" + }, + "recipientAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + } + }, + "x-owner": "bridge" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "token_launch", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "tokenLaunchId", + "issuerAccountId", + "tokenId", + "symbol", + "name", + "decimals", + "metadataHash", + "initialSupply", + "recipientAccountId" + ], + "properties": { + "tokenLaunchId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "issuerAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "tokenId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "symbol": { + "type": "string", + "pattern": "^[A-Z0-9]{2,12}$", + "x-owner": "wallet" + }, + "name": { + "type": "string", + "minLength": 1, + "x-owner": "wallet" + }, + "decimals": { + "type": "integer", + "minimum": 0, + "maximum": 18, + "x-owner": "runtime" + }, + "metadataHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "initialSupply": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "recipientAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "token_mint", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "mintId", + "tokenId", + "toAccountId", + "amount", + "reasonHash", + "localOrTestMode" + ], + "properties": { + "mintId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "tokenId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "toAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "amount": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "reasonHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "localOrTestMode": { + "const": true, + "x-owner": "hq-review" + } + }, + "x-owner": "runtime" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "token_transfer", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "tokenTransferId", + "tokenId", + "fromAccountId", + "toAccountId", + "amount", + "memoHash" + ], + "properties": { + "tokenTransferId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "tokenId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "fromAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "toAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "amount": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "memoHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + } + }, + "x-owner": "runtime" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "pool_create", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "poolCreateId", + "creatorAccountId", + "poolId", + "baseAssetId", + "quoteAssetId", + "feeBps", + "tickSpacing", + "metadataHash" + ], + "properties": { + "poolCreateId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "creatorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "poolId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "baseAssetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "quoteAssetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "feeBps": { + "type": "integer", + "minimum": 0, + "maximum": 10000, + "x-owner": "runtime" + }, + "tickSpacing": { + "type": "integer", + "minimum": 1, + "x-owner": "runtime" + }, + "metadataHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "add_liquidity", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "liquidityId", + "poolId", + "providerAccountId", + "baseAmount", + "quoteAmount", + "minLpUnits" + ], + "properties": { + "liquidityId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "poolId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "providerAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "baseAmount": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "quoteAmount": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "minLpUnits": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "remove_liquidity", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "liquidityId", + "poolId", + "providerAccountId", + "lpUnits", + "minBaseAmount", + "minQuoteAmount" + ], + "properties": { + "liquidityId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "poolId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "providerAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "lpUnits": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "minBaseAmount": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "minQuoteAmount": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "swap", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "swapId", + "poolId", + "traderAccountId", + "assetInId", + "assetOutId", + "amountIn", + "minAmountOut", + "routeHash" + ], + "properties": { + "swapId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "poolId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "traderAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetInId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetOutId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "amountIn": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "minAmountOut": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "routeHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "withdrawal_intent", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "withdrawalIntentId", + "sourceAccountId", + "destinationChainId", + "destinationAddress", + "assetId", + "amount", + "releasePolicyHash" + ], + "properties": { + "withdrawalIntentId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "sourceAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "destinationChainId": { + "type": "integer", + "enum": [ + 8453 + ], + "x-owner": "bridge" + }, + "destinationAddress": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$", + "x-owner": "bridge" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + }, + "amount": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "bridge" + }, + "releasePolicyHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "bridge" + } + }, + "x-owner": "bridge" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "validator_authority_config", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "authorityConfigId", + "authorityId", + "validatorAccountId", + "action", + "authorityType", + "votingPower", + "metadataHash" + ], + "properties": { + "authorityConfigId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "authorityId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "validatorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "action": { + "enum": [ + "register", + "update" + ], + "x-owner": "consensus" + }, + "authorityType": { + "enum": [ + "validator", + "sequencer", + "local-authority", + "finality-voter" + ], + "x-owner": "consensus" + }, + "votingPower": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "consensus" + }, + "metadataHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + } + }, + "x-owner": "consensus" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "finality_vote", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "voteId", + "validatorAccountId", + "height", + "blockHash", + "stateRoot", + "voteRound" + ], + "properties": { + "voteId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "validatorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "height": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "consensus" + }, + "blockHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "stateRoot": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "voteRound": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "consensus" + } + }, + "x-owner": "consensus" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "finality_certificate", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "certificateId", + "height", + "blockHash", + "stateRoot", + "signerSetRoot", + "voteIds", + "quorumNumerator", + "quorumDenominator" + ], + "properties": { + "certificateId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "height": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "consensus" + }, + "blockHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "stateRoot": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "signerSetRoot": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "voteIds": { + "type": "array", + "items": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + "minItems": 1, + "x-owner": "consensus" + }, + "quorumNumerator": { + "type": "integer", + "minimum": 1, + "x-owner": "consensus" + }, + "quorumDenominator": { + "type": "integer", + "minimum": 1, + "x-owner": "consensus" + } + }, + "x-owner": "consensus" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "agent_account_update", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "lifecycleUpdateId", + "objectType", + "operation", + "objectId", + "objectHash", + "status", + "rootfieldId" + ], + "properties": { + "lifecycleUpdateId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "objectType": { + "const": "AgentAccount", + "x-owner": "runtime" + }, + "operation": { + "enum": [ + "create", + "update", + "status_change", + "finalize" + ], + "x-owner": "runtime" + }, + "objectId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "objectHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "status": { + "enum": [ + "active", + "pending", + "verified", + "failed", + "resolved", + "finalized", + "superseded" + ], + "x-owner": "runtime" + }, + "rootfieldId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "sourceReceiptId": { + "anyOf": [ + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + { + "type": "null" + } + ], + "x-owner": "runtime" + }, + "parentObjectId": { + "anyOf": [ + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + { + "type": "null" + } + ], + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "model_passport_update", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "lifecycleUpdateId", + "objectType", + "operation", + "objectId", + "objectHash", + "status", + "rootfieldId" + ], + "properties": { + "lifecycleUpdateId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "objectType": { + "const": "ModelPassport", + "x-owner": "runtime" + }, + "operation": { + "enum": [ + "create", + "update", + "status_change", + "finalize" + ], + "x-owner": "runtime" + }, + "objectId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "objectHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "status": { + "enum": [ + "active", + "pending", + "verified", + "failed", + "resolved", + "finalized", + "superseded" + ], + "x-owner": "runtime" + }, + "rootfieldId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "sourceReceiptId": { + "anyOf": [ + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + { + "type": "null" + } + ], + "x-owner": "runtime" + }, + "parentObjectId": { + "anyOf": [ + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + { + "type": "null" + } + ], + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "work_receipt_update", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "lifecycleUpdateId", + "objectType", + "operation", + "objectId", + "objectHash", + "status", + "rootfieldId" + ], + "properties": { + "lifecycleUpdateId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "objectType": { + "const": "WorkReceipt", + "x-owner": "runtime" + }, + "operation": { + "enum": [ + "create", + "update", + "status_change", + "finalize" + ], + "x-owner": "runtime" + }, + "objectId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "objectHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "status": { + "enum": [ + "active", + "pending", + "verified", + "failed", + "resolved", + "finalized", + "superseded" + ], + "x-owner": "runtime" + }, + "rootfieldId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "sourceReceiptId": { + "anyOf": [ + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + { + "type": "null" + } + ], + "x-owner": "runtime" + }, + "parentObjectId": { + "anyOf": [ + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + { + "type": "null" + } + ], + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "artifact_availability_proof_update", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "lifecycleUpdateId", + "objectType", + "operation", + "objectId", + "objectHash", + "status", + "rootfieldId" + ], + "properties": { + "lifecycleUpdateId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "objectType": { + "const": "ArtifactAvailabilityProof", + "x-owner": "runtime" + }, + "operation": { + "enum": [ + "create", + "update", + "status_change", + "finalize" + ], + "x-owner": "runtime" + }, + "objectId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "objectHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "status": { + "enum": [ + "active", + "pending", + "verified", + "failed", + "resolved", + "finalized", + "superseded" + ], + "x-owner": "runtime" + }, + "rootfieldId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "sourceReceiptId": { + "anyOf": [ + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + { + "type": "null" + } + ], + "x-owner": "runtime" + }, + "parentObjectId": { + "anyOf": [ + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + { + "type": "null" + } + ], + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "verifier_module_update", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "lifecycleUpdateId", + "objectType", + "operation", + "objectId", + "objectHash", + "status", + "rootfieldId" + ], + "properties": { + "lifecycleUpdateId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "objectType": { + "const": "VerifierModule", + "x-owner": "runtime" + }, + "operation": { + "enum": [ + "create", + "update", + "status_change", + "finalize" + ], + "x-owner": "runtime" + }, + "objectId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "objectHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "status": { + "enum": [ + "active", + "pending", + "verified", + "failed", + "resolved", + "finalized", + "superseded" + ], + "x-owner": "runtime" + }, + "rootfieldId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "sourceReceiptId": { + "anyOf": [ + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + { + "type": "null" + } + ], + "x-owner": "runtime" + }, + "parentObjectId": { + "anyOf": [ + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + { + "type": "null" + } + ], + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "verifier_report_update", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "lifecycleUpdateId", + "objectType", + "operation", + "objectId", + "objectHash", + "status", + "rootfieldId" + ], + "properties": { + "lifecycleUpdateId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "objectType": { + "const": "VerifierReport", + "x-owner": "runtime" + }, + "operation": { + "enum": [ + "create", + "update", + "status_change", + "finalize" + ], + "x-owner": "runtime" + }, + "objectId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "objectHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "status": { + "enum": [ + "active", + "pending", + "verified", + "failed", + "resolved", + "finalized", + "superseded" + ], + "x-owner": "runtime" + }, + "rootfieldId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "sourceReceiptId": { + "anyOf": [ + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + { + "type": "null" + } + ], + "x-owner": "runtime" + }, + "parentObjectId": { + "anyOf": [ + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + { + "type": "null" + } + ], + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "memory_cell_update", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "lifecycleUpdateId", + "objectType", + "operation", + "objectId", + "objectHash", + "status", + "rootfieldId" + ], + "properties": { + "lifecycleUpdateId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "objectType": { + "const": "MemoryCell", + "x-owner": "runtime" + }, + "operation": { + "enum": [ + "create", + "update", + "status_change", + "finalize" + ], + "x-owner": "runtime" + }, + "objectId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "objectHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "status": { + "enum": [ + "active", + "pending", + "verified", + "failed", + "resolved", + "finalized", + "superseded" + ], + "x-owner": "runtime" + }, + "rootfieldId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "sourceReceiptId": { + "anyOf": [ + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + { + "type": "null" + } + ], + "x-owner": "runtime" + }, + "parentObjectId": { + "anyOf": [ + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + { + "type": "null" + } + ], + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "challenge_update", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "lifecycleUpdateId", + "objectType", + "operation", + "objectId", + "objectHash", + "status", + "rootfieldId" + ], + "properties": { + "lifecycleUpdateId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "objectType": { + "const": "Challenge", + "x-owner": "runtime" + }, + "operation": { + "enum": [ + "create", + "update", + "status_change", + "finalize" + ], + "x-owner": "runtime" + }, + "objectId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "objectHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "status": { + "enum": [ + "active", + "pending", + "verified", + "failed", + "resolved", + "finalized", + "superseded" + ], + "x-owner": "runtime" + }, + "rootfieldId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "sourceReceiptId": { + "anyOf": [ + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + { + "type": "null" + } + ], + "x-owner": "runtime" + }, + "parentObjectId": { + "anyOf": [ + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + { + "type": "null" + } + ], + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "payloadType", + "payloadId", + "actorAccountId", + "accountNonce", + "details", + "preconditions", + "stateWrites", + "balanceChanges", + "nonceChange", + "emittedEventTypes", + "indexKeys", + "localOnly", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.transaction_payload.v0", + "x-owner": "runtime" + }, + "payloadType": { + "const": "finality_receipt_update", + "x-owner": "runtime" + }, + "payloadId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "actorAccountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "wallet" + }, + "accountNonce": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "details": { + "type": "object", + "additionalProperties": false, + "required": [ + "lifecycleUpdateId", + "objectType", + "operation", + "objectId", + "objectHash", + "status", + "rootfieldId" + ], + "properties": { + "lifecycleUpdateId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "objectType": { + "const": "FinalityReceipt", + "x-owner": "runtime" + }, + "operation": { + "enum": [ + "create", + "update", + "status_change", + "finalize" + ], + "x-owner": "runtime" + }, + "objectId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "objectHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "crypto" + }, + "status": { + "enum": [ + "active", + "pending", + "verified", + "failed", + "resolved", + "finalized", + "superseded" + ], + "x-owner": "runtime" + }, + "rootfieldId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "sourceReceiptId": { + "anyOf": [ + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + { + "type": "null" + } + ], + "x-owner": "runtime" + }, + "parentObjectId": { + "anyOf": [ + { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + { + "type": "null" + } + ], + "x-owner": "runtime" + } + }, + "x-owner": "consensus" + }, + "preconditions": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "stateWrites": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "minItems": 1, + "x-owner": "runtime" + }, + "balanceChanges": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "assetId", + "delta" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "assetId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "delta": { + "type": "string", + "pattern": "^-?(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + } + }, + "x-owner": "runtime" + }, + "nonceChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "accountId", + "before", + "after" + ], + "properties": { + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "runtime" + }, + "before": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + }, + "after": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "runtime" + } + }, + "x-owner": "runtime" + }, + "emittedEventTypes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "x-owner": "indexer" + }, + "indexKeys": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "additionalProperties": false, + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + }, + "value": { + "type": "string", + "minLength": 1, + "x-owner": "indexer" + } + } + }, + "x-owner": "indexer" + }, + "localOnly": { + "const": true, + "x-owner": "hq-review" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + } + } + ], + "$defs": { + "hex32": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + "address": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$" + }, + "publicKey": { + "type": "string", + "pattern": "^0x(02|03)[0-9a-fA-F]{64}$" + }, + "uintString": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "isoTime": { + "type": "string", + "format": "date-time" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ] + }, + "payloadType": { + "type": "string", + "enum": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ] + }, + "eventType": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "stateComponent": { + "type": "string", + "enum": [ + "accounts", + "balances", + "tokens", + "pools", + "lp_positions", + "bridge_credits", + "withdrawals", + "object_store", + "finality", + "validator_state" + ] + } + } +} diff --git a/schemas/flowmemory/production-validator-authority.schema.json b/schemas/flowmemory/production-validator-authority.schema.json new file mode 100644 index 00000000..1bf9651f --- /dev/null +++ b/schemas/flowmemory/production-validator-authority.schema.json @@ -0,0 +1,175 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://flowmemory.local/schemas/flowmemory/production-validator-authority.schema.json", + "title": "FlowChain Validator Authority V0", + "type": "object", + "additionalProperties": false, + "required": [ + "schema", + "authorityId", + "accountId", + "publicKey", + "address", + "authorityType", + "votingPower", + "finalityWeight", + "metadataHash", + "status", + "productionReady" + ], + "properties": { + "schema": { + "const": "flowchain.production_l1.validator_authority.v0", + "x-owner": "consensus" + }, + "authorityId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "accountId": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "publicKey": { + "type": "string", + "pattern": "^0x(02|03)[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "address": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$", + "x-owner": "consensus" + }, + "authorityType": { + "enum": [ + "validator", + "sequencer", + "local-authority", + "finality-voter", + "bridge-release-authority" + ], + "x-owner": "consensus" + }, + "votingPower": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "consensus" + }, + "finalityWeight": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$", + "x-owner": "consensus" + }, + "metadataHash": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$", + "x-owner": "consensus" + }, + "status": { + "enum": [ + "active", + "inactive" + ], + "x-owner": "consensus" + }, + "productionReady": { + "const": false, + "x-owner": "hq-review" + } + }, + "$defs": { + "hex32": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{64}$" + }, + "address": { + "type": "string", + "pattern": "^0x[0-9a-fA-F]{40}$" + }, + "publicKey": { + "type": "string", + "pattern": "^0x(02|03)[0-9a-fA-F]{64}$" + }, + "uintString": { + "type": "string", + "pattern": "^(0|[1-9][0-9]*)$" + }, + "isoTime": { + "type": "string", + "format": "date-time" + }, + "networkProfile": { + "type": "string", + "enum": [ + "flowchain-local-private", + "flowchain-local-multinode", + "flowchain-base8453-pilot" + ] + }, + "payloadType": { + "type": "string", + "enum": [ + "native_transfer", + "faucet_funding", + "bridge_credit", + "token_launch", + "token_mint", + "token_transfer", + "pool_create", + "add_liquidity", + "remove_liquidity", + "swap", + "withdrawal_intent", + "validator_authority_config", + "finality_vote", + "finality_certificate", + "agent_account_update", + "model_passport_update", + "work_receipt_update", + "artifact_availability_proof_update", + "verifier_module_update", + "verifier_report_update", + "memory_cell_update", + "challenge_update", + "finality_receipt_update" + ] + }, + "eventType": { + "type": "string", + "enum": [ + "NativeTransferRecorded", + "FaucetFundingRecorded", + "BridgeCreditApplied", + "TokenLaunched", + "TokenMinted", + "TokenTransferred", + "PoolCreated", + "LiquidityAdded", + "LiquidityRemoved", + "SwapExecuted", + "WithdrawalIntentRecorded", + "ValidatorAuthorityConfigured", + "FinalityVoteRecorded", + "FinalityCertificateRecorded", + "ObjectLifecycleUpdated" + ] + }, + "stateComponent": { + "type": "string", + "enum": [ + "accounts", + "balances", + "tokens", + "pools", + "lp_positions", + "bridge_credits", + "withdrawals", + "object_store", + "finality", + "validator_state" + ] + } + } +}