Switch between json log parsing and anchor event parsing using transaction slot.

This commit is contained in:
Nicholas Clarke 2021-10-17 21:50:48 -07:00
parent 05eb106a77
commit 2de3415975
6 changed files with 2417 additions and 2472 deletions

1000
src/anchorParsers.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@ -110,7 +110,7 @@ async function processMangoTransactions(
let res;
try {
res = await client.query(
'select transaction, signature from ' +
'select transaction, slot, signature from ' +
schema +
".transactions where process_state = 'ready for parsing' and program_pk = $1 limit $2",
[address, limit],

1402
src/jsonParsers.ts Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -63,6 +63,10 @@ async function processMangoTransactions(rawTransactionsPool, schema, limit) {
mangoProgramId,
);
let errorProcessStates = processStates.filter(e => e.process_state === 'parsing error');
console.log(errorProcessStates.length + ' parsing errors')
// Set a breakpoint here to examine parsed transactions
console.log(parsedTransactions);
}