diff --git a/src/sdk/generated_ts/paths/export.ts b/src/sdk/generated_ts/paths/export.ts index e5020d1f..f6f7304b 100644 --- a/src/sdk/generated_ts/paths/export.ts +++ b/src/sdk/generated_ts/paths/export.ts @@ -1,5 +1,5 @@ import * as ApiCallers from "../lib/api_callers"; -import { address, topic, fourbyte, Appearance, Reconciliation, ListStats, Transaction, Receipt, Log, Trace } from "../types"; +import { address, topic, fourbyte, Appearance, Reconciliation, ListStats, Transaction, Receipt, Log, Trace, Transfer } from "../types"; export function getExport( parameters?: { @@ -10,9 +10,9 @@ export function getExport( receipts?: boolean, logs?: boolean, traces?: boolean, - statements?: boolean, neighbors?: boolean, accounting?: boolean, + statements?: boolean, articulate?: boolean, cache?: boolean, cacheTraces?: boolean, @@ -40,7 +40,7 @@ export function getExport( }, options?: RequestInit, ) { - return ApiCallers.fetch( + return ApiCallers.fetch( { endpoint: '/export', method: 'get', parameters, options, }, diff --git a/src/sdk/generated_ts/paths/list.ts b/src/sdk/generated_ts/paths/list.ts index 8300fa24..a790359f 100644 --- a/src/sdk/generated_ts/paths/list.ts +++ b/src/sdk/generated_ts/paths/list.ts @@ -7,6 +7,10 @@ export function getList( count?: boolean, appearances?: boolean, silent?: boolean, + firstRecord?: number, + maxRecords?: number, + firstBlock?: number, + lastBlock?: number, chain: string, noHeader?: boolean, fmt?: string, diff --git a/src/sdk/generated_ts/paths/monitors.ts b/src/sdk/generated_ts/paths/monitors.ts index a79b1614..2d036e80 100644 --- a/src/sdk/generated_ts/paths/monitors.ts +++ b/src/sdk/generated_ts/paths/monitors.ts @@ -5,6 +5,7 @@ export function getMonitors( parameters?: { addrs?: address[], clean?: boolean, + list?: boolean, watch?: boolean, sleep?: number, delete?: boolean, diff --git a/src/sdk/generated_ts/paths/transactions.ts b/src/sdk/generated_ts/paths/transactions.ts index c509af5d..355aba2b 100644 --- a/src/sdk/generated_ts/paths/transactions.ts +++ b/src/sdk/generated_ts/paths/transactions.ts @@ -1,5 +1,5 @@ import * as ApiCallers from "../lib/api_callers"; -import { tx_id, Transaction } from "../types"; +import { tx_id, Transaction, Transfer } from "../types"; export function getTransactions( parameters?: { @@ -8,7 +8,7 @@ export function getTransactions( trace?: boolean, uniq?: boolean, flow?: 'from' | 'to', - reconcile?: string, + accountFor?: string, cache?: boolean, chain: string, noHeader?: boolean, @@ -23,7 +23,7 @@ export function getTransactions( }, options?: RequestInit, ) { - return ApiCallers.fetch( + return ApiCallers.fetch( { endpoint: '/transactions', method: 'get', parameters, options, }, diff --git a/src/sdk/generated_ts/paths/when.ts b/src/sdk/generated_ts/paths/when.ts index 16e2b83e..28c653cb 100644 --- a/src/sdk/generated_ts/paths/when.ts +++ b/src/sdk/generated_ts/paths/when.ts @@ -6,6 +6,9 @@ export function getWhen( blocks?: string[], list?: boolean, timestamps?: boolean, + count?: boolean, + repair?: boolean, + check?: boolean, chain: string, noHeader?: boolean, fmt?: string, diff --git a/src/sdk/generated_ts/types/base_types.ts b/src/sdk/generated_ts/types/base_types.ts index a97dc665..f705815e 100644 --- a/src/sdk/generated_ts/types/base_types.ts +++ b/src/sdk/generated_ts/types/base_types.ts @@ -1,6 +1,7 @@ export type hash = string; export type blknum = number; export type date = string; +export type Datetime = string; export type address = string; export type timestamp = number; export type wei = string; diff --git a/src/sdk/generated_ts/types/index.ts b/src/sdk/generated_ts/types/index.ts index 843bcecd..e1c40c3c 100644 --- a/src/sdk/generated_ts/types/index.ts +++ b/src/sdk/generated_ts/types/index.ts @@ -14,6 +14,7 @@ export * from './traceResult' export * from './datedBlock' export * from './state' export * from './result' +export * from './transfer' export * from './token' export * from './status' export * from './cache' diff --git a/src/sdk/generated_ts/types/reconciliation.ts b/src/sdk/generated_ts/types/reconciliation.ts index 1da2565e..3f279f68 100644 --- a/src/sdk/generated_ts/types/reconciliation.ts +++ b/src/sdk/generated_ts/types/reconciliation.ts @@ -1,37 +1,45 @@ -import { blknum, timestamp, address, uint64, int256, double } from "../types"; +import { blknum, hash, timestamp, Datetime, address, uint64, double, int256 } from "../types"; export type Reconciliation = { blockNumber: blknum transactionIndex: blknum + logIndex: blknum + transactionHash: hash timestamp: timestamp + date: Datetime assetAddr: address assetSymbol: string decimals: uint64 - prevBlk: blknum - prevBlkBal: int256 + spotPrice: double + priceSource: string + accountedFor: address + sender: address + recipient: address begBal: int256 - begBalDiff: int256 + amountNet: int256 + endBal: int256 + encoding: string + signature: string + reconciliationType: string + reconciled: boolean + totalIn: int256 amountIn: int256 - amountOut: int256 internalIn: int256 - internalOut: int256 selfDestructIn: int256 - selfDestructOut: int256 minerBaseRewardIn: int256 minerNephewRewardIn: int256 minerTxFeeIn: int256 minerUncleRewardIn: int256 prefundIn: int256 - spotPrice: double - priceSource: string - gasCostOut: int256 - endBal: int256 - totalIn: int256 totalOut: int256 + amountOut: int256 + internalOut: int256 + selfDestructOut: int256 + gasOut: int256 totalOutLessGas: int256 - amountNet: int256 - endBalCalc: int256 - reconciliationType: string + prevAppBlk: blknum + prevBal: int256 + begBalDiff: int256 endBalDiff: int256 - reconciled: boolean + endBalCalc: int256 } diff --git a/src/sdk/generated_ts/types/state.ts b/src/sdk/generated_ts/types/state.ts index 48ea68ad..ea1b7e26 100644 --- a/src/sdk/generated_ts/types/state.ts +++ b/src/sdk/generated_ts/types/state.ts @@ -1,12 +1,12 @@ -import { blknum, wei, uint64, bytes, address } from "../types"; +import { blknum, address, wei, uint64, bytes } from "../types"; export type State = { blockNumber: blknum + address: address + proxy: address balance: wei nonce: uint64 code: bytes - storage: bytes - address: address deployed: blknum accttype: string } diff --git a/src/sdk/generated_ts/types/transaction.ts b/src/sdk/generated_ts/types/transaction.ts index 6535a331..c17ce0b6 100644 --- a/src/sdk/generated_ts/types/transaction.ts +++ b/src/sdk/generated_ts/types/transaction.ts @@ -1,7 +1,6 @@ -import { gas, hash, blknum, uint64, timestamp, address, wei, bytes, Receipt, Reconciliation, Function, date } from "../types"; +import { hash, blknum, uint64, timestamp, address, wei, gas, bytes, Receipt, Reconciliation, Function, date } from "../types"; export type Transaction = { - gasPrice: gas hash: hash blockHash: hash blockNumber: blknum @@ -12,6 +11,7 @@ export type Transaction = { to: address value: wei gas: gas + gasPrice: gas input: bytes receipt: Receipt statements: Reconciliation[] diff --git a/src/sdk/generated_ts/types/transfer.ts b/src/sdk/generated_ts/types/transfer.ts new file mode 100644 index 00000000..9be3d3fc --- /dev/null +++ b/src/sdk/generated_ts/types/transfer.ts @@ -0,0 +1,19 @@ +import { blknum, hash, timestamp, Datetime, address, uint64, uint256, double } from "../types"; + +export type Transfer = { + blockNumber: blknum + transactionIndex: blknum + logIndex: blknum + transactionHash: hash + timestamp: timestamp + date: Datetime + sender: address + recipient: address + assetAddr: address + assetSymbol: string + decimals: uint64 + amount: uint256 + spotPrice: double + priceSource: string + encoding: string +} diff --git a/src/sdk/input/base_types.ts b/src/sdk/input/base_types.ts index a97dc665..f705815e 100644 --- a/src/sdk/input/base_types.ts +++ b/src/sdk/input/base_types.ts @@ -1,6 +1,7 @@ export type hash = string; export type blknum = number; export type date = string; +export type Datetime = string; export type address = string; export type timestamp = number; export type wei = string; diff --git a/src/ui/datastore/worker/transactions.ts b/src/ui/datastore/worker/transactions.ts index b133aa8f..c79dc004 100644 --- a/src/ui/datastore/worker/transactions.ts +++ b/src/ui/datastore/worker/transactions.ts @@ -20,7 +20,7 @@ async function fetchTransactions(chain: string, addresses: Address[], loaded: nu // reversed: false, relevant: true, // summarize_by: 'monthly', - firstRecord: loaded, + firstRecord: loaded + 1, maxRecords: (() => { if (loaded < 20) return 10; if (loaded < 800) return 239; @@ -286,7 +286,7 @@ export const getGas = (transactions: Transaction[] | undefined, getNameFor: (add const usesGas = transactions.filter((tx) => { if (!tx.statements) return false; - const stmts = tx.statements.filter((st) => st.gasCostOut); + const stmts = tx.statements.filter((st) => st.gasOut); return stmts.length > 0; }); @@ -301,7 +301,7 @@ export const getGas = (transactions: Transaction[] | undefined, getNameFor: (add toName: getNameFor(tx.to), isError: tx.isError, asset: st.assetSymbol, - gasCostOut: st.gasCostOut, + gasOut: st.gasOut, }))); }; diff --git a/src/ui/modules/filters/sample_transactions.json b/src/ui/modules/filters/sample_transactions.json index de559cb4..e6b28314 100644 --- a/src/ui/modules/filters/sample_transactions.json +++ b/src/ui/modules/filters/sample_transactions.json @@ -253,8 +253,8 @@ "assetAddr": "0xf503017d7baf7fbc0fff7492b751025c6a78179b", "assetSymbol": "ETH", "decimals": 18, - "prevBlk": 12734166, - "prevBlkBal": 36.892758101192445316, + "prevAppBlk": 12734166, + "prevBal": 36.892758101192445316, "begBal": 36.892758101192445316, "endBal": 36.892758101192445316, "amountIn": 0, @@ -268,7 +268,7 @@ "amountOut": 0, "internalOut": 0, "selfDestructOut": 0, - "gasCostOut": 0, + "gasOut": 0, "reconciliationType": "regular", "spotPrice": 2157.84170, "priceSource": "uniswap", @@ -288,8 +288,8 @@ "assetAddr": "0xdac17f958d2ee523a2206206994597c13d831ec7", "assetSymbol": "USDT", "decimals": 6, - "prevBlk": 12734167, - "prevBlkBal": 57.816500000000000000, + "prevAppBlk": 12734167, + "prevBal": 57.816500000000000000, "begBal": 57.816500000000000000, "endBal": 72.816500000000000000, "amountIn": 15.0000000, @@ -303,7 +303,7 @@ "amountOut": 0, "internalOut": 0, "selfDestructOut": 0, - "gasCostOut": 0, + "gasOut": 0, "reconciliationType": "regular", "spotPrice": 1.00000, "priceSource": "stable-coin", diff --git a/src/ui/modules/types/Reconciliation.tsx b/src/ui/modules/types/Reconciliation.tsx index 895f158f..5943c990 100644 --- a/src/ui/modules/types/Reconciliation.tsx +++ b/src/ui/modules/types/Reconciliation.tsx @@ -6,7 +6,7 @@ export const priceReconciliation = (statementIn: Reconciliation, denom: string) const statement: Reconciliation = JSON.parse(JSON.stringify(statementIn)); const properties: Array = [ - 'prevBlkBal', + 'prevBal', 'begBal', 'begBalDiff', 'amountIn', @@ -20,8 +20,8 @@ export const priceReconciliation = (statementIn: Reconciliation, denom: string) 'minerTxFeeIn', 'minerUncleRewardIn', 'prefundIn', - 'gasCostOut', - 'gasCostOut', + 'gasOut', + 'gasOut', 'endBal', 'endBalCalc', 'endBalDiff', diff --git a/src/ui/views/Dashboard/Tabs/Details/SubTabs/HistoryRecons.tsx b/src/ui/views/Dashboard/Tabs/Details/SubTabs/HistoryRecons.tsx index ca33bbaa..849cd0d8 100644 --- a/src/ui/views/Dashboard/Tabs/Details/SubTabs/HistoryRecons.tsx +++ b/src/ui/views/Dashboard/Tabs/Details/SubTabs/HistoryRecons.tsx @@ -107,14 +107,14 @@ const statementBody = (statement: Reconciliation, details: boolean, styles: any) {DividerRow(rowStyle)} {DetailRow(rowStyle, 'assetSymbol', statement.assetSymbol)} {DetailRow(rowStyle, 'decimals', statement.decimals)} - {DetailRow(rowStyle, 'prevBlk', statement.prevBlk.toString())} + {DetailRow(rowStyle, 'prevAppBlk', statement.prevAppBlk.toString())} {DetailRow(rowStyle, 'blockNumber', statement.blockNumber.toString())} {DetailRow(rowStyle, 'transactionIndex', statement.transactionIndex.toString())} {DetailRow(rowStyle, 'timestamp', statement.timestamp.toString())} {DividerRow(rowStyle)} {DetailRow(rowStyle, 'type', statement.reconciliationType)} - {DetailRow(rowStyle, 'prevBlkBal', statement.prevBlkBal)} + {DetailRow(rowStyle, 'prevBal', statement.prevBal)} {DetailRow(rowStyle, 'begBal', statement.begBal)} {DetailRow(rowStyle, 'begBalDiff', statement.begBalDiff)} {DetailRow(rowStyle, 'endBal', statement.endBal)} @@ -146,7 +146,7 @@ const statementBody = (statement: Reconciliation, details: boolean, styles: any) {BodyRow(rowStyle, 'nephewReward', details, ...toNumberArguments(statement.minerNephewRewardIn), 0)} {BodyRow(rowStyle, 'uncleReward', details, ...toNumberArguments(statement.minerUncleRewardIn), 0)} {BodyRow(rowStyle, 'prefund', details, ...toNumberArguments(statement.prefundIn), 0)} - {BodyRow(rowStyle, 'gasCost', details, 0, ...toNumberArguments(statement.gasCostOut))} + {BodyRow(rowStyle, 'gasCost', details, 0, ...toNumberArguments(statement.gasOut))} {BodyRow(rowStyle, 'totalNet', details, 0, 0, ...toNumberArguments(statement.amountNet))} {BodyRow(rowStyle, 'endBal', details, 0, 0, ...toNumberArguments(statement.endBal, statement.endBalDiff))} {detailView} diff --git a/src/ui/views/Dashboard/Tabs/Details/components/Export/ExportText.tsx b/src/ui/views/Dashboard/Tabs/Details/components/Export/ExportText.tsx index 0ce4a40a..b693c24c 100644 --- a/src/ui/views/Dashboard/Tabs/Details/components/Export/ExportText.tsx +++ b/src/ui/views/Dashboard/Tabs/Details/components/Export/ExportText.tsx @@ -48,7 +48,7 @@ export const incomeFields = [ ]; //------------------------------------------------------------------------- -export const outflowFields = ['amountOut', 'internalOut', 'selfDestructOut', 'gasCostOut']; +export const outflowFields = ['amountOut', 'internalOut', 'selfDestructOut', 'gasOut']; //------------------------------------------------------------------------- export const convertToText = (theData: Transaction[], delim: string) => { diff --git a/src/ui/views/Dashboard/Tabs/Details/components/Statement.tsx b/src/ui/views/Dashboard/Tabs/Details/components/Statement.tsx index 4a4a2800..7226db35 100644 --- a/src/ui/views/Dashboard/Tabs/Details/components/Statement.tsx +++ b/src/ui/views/Dashboard/Tabs/Details/components/Statement.tsx @@ -39,7 +39,7 @@ export const Statement = ({ statement }: { statement: Reconciliation }) => { {showValue(pricedRecon.totalOutLessGas.toString())} - {showValue(pricedRecon.gasCostOut.toString(), false, true)} + {showValue(pricedRecon.gasOut.toString(), false, true)} {showValue(pricedRecon.endBal.toString(), true)}