Skip to content

Commit

Permalink
rebase and add internal command usage
Browse files Browse the repository at this point in the history
  • Loading branch information
harrysolovay committed Oct 3, 2024
1 parent f6cea97 commit 9d2e306
Show file tree
Hide file tree
Showing 6 changed files with 127 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
DATABASE_URL=postgres://mina:whatever@localhost:5432/archive # TODO: we only need this one during development

MINAMESH_ARCHIVE_DATABASE_URL=postgres://mina:whatever@localhost:5432/archive
MINAMESH_GENESIS_BLOCK_IDENTIFIER_STATE_HASH=3NK4BpDSekaqsG6tx8Nse2zJchRft2JpnbvMiog55WCr5xJZaKeP
MINAMESH_GENESIS_BLOCK_IDENTIFIER_HEIGHT=359605
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sql/internal_commands.sql
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ WITH
SELECT
ic.command_type AS "command_type: InternalCommandType",
ic.hash,
ic.creation_fee,
ic.creation_fee AS "creation_fee?",
ic.receiver,
ic.sequence_no,
ic.secondary_sequence_no,
Expand Down
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Wrapper<Option<serde_json::Value>> {
}

// cspell:disable-next-line
const DEFAULT_TOKEN_ID: &str = "wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf";
pub const DEFAULT_TOKEN_ID: &str = "wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf";

pub fn default_mina_proxy_url() -> String {
"https://mainnet.minaprotocol.network/graphql".to_string()
Expand Down
120 changes: 120 additions & 0 deletions tests/snapshots/block__specified.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2567,6 +2567,126 @@ Some(
related_transactions: None,
metadata: None,
},
Transaction {
transaction_identifier: TransactionIdentifier {
hash: "5JtyT69gceMuEzmyjbEMZ6E9oTiQwaDjoVyZRM7Ggfm8mbtdGceK",
},
operations: [
Operation {
operation_identifier: OperationIdentifier {
index: 2,
network_index: None,
},
related_operations: None,
type: "fee_receiver_inc",
status: Some(
"Success",
),
account: Some(
AccountIdentifier {
address: "B62qktPtDFWG8ciSsd6eEPr7S7HuiGaouqDhfPT7H84DPp9mCgTHjwE",
sub_account: None,
metadata: None,
},
),
amount: Some(
Amount {
value: "232055000",
currency: Currency {
symbol: "mina",
decimals: 9,
metadata: None,
},
metadata: None,
},
),
coin_change: None,
metadata: None,
},
],
related_transactions: None,
metadata: None,
},
Transaction {
transaction_identifier: TransactionIdentifier {
hash: "5Ju2teejDK5Q2ea1P21dPTdnnqt5c8QmSL1Tpf8PVr2SmLQzA3KY",
},
operations: [
Operation {
operation_identifier: OperationIdentifier {
index: 2,
network_index: None,
},
related_operations: None,
type: "coinbase_inc",
status: Some(
"Success",
),
account: Some(
AccountIdentifier {
address: "B62qktPtDFWG8ciSsd6eEPr7S7HuiGaouqDhfPT7H84DPp9mCgTHjwE",
sub_account: None,
metadata: None,
},
),
amount: Some(
Amount {
value: "720000000000",
currency: Currency {
symbol: "mina",
decimals: 9,
metadata: None,
},
metadata: None,
},
),
coin_change: None,
metadata: None,
},
],
related_transactions: None,
metadata: None,
},
Transaction {
transaction_identifier: TransactionIdentifier {
hash: "5JuMZ2QrMWkpQuCFEw9iPVS8zXQkmR1g3LHg4a33xdmUCHEJRQho",
},
operations: [
Operation {
operation_identifier: OperationIdentifier {
index: 2,
network_index: None,
},
related_operations: None,
type: "fee_receiver_inc",
status: Some(
"Success",
),
account: Some(
AccountIdentifier {
address: "B62qktPtDFWG8ciSsd6eEPr7S7HuiGaouqDhfPT7H84DPp9mCgTHjwE",
sub_account: None,
metadata: None,
},
),
amount: Some(
Amount {
value: "715607016",
currency: Currency {
symbol: "mina",
decimals: 9,
metadata: None,
},
metadata: None,
},
),
coin_change: None,
metadata: None,
},
],
related_transactions: None,
metadata: None,
},
],
metadata: None,
},
Expand Down
12 changes: 0 additions & 12 deletions tests/snapshots/block__specified.snap.new

This file was deleted.

0 comments on commit 9d2e306

Please sign in to comment.