Add models for mapping transaction data.
This commit is contained in:
parent
7ec4a45579
commit
a4c287f9f7
1
src/app/_models/index.ts
Normal file
1
src/app/_models/index.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export * from './transaction';
|
38
src/app/_models/transaction.ts
Normal file
38
src/app/_models/transaction.ts
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
export class BlocksBloom {
|
||||||
|
low: number;
|
||||||
|
blockFilter: string;
|
||||||
|
blocktxFilter: string;
|
||||||
|
alg: string;
|
||||||
|
filterRounds: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Token {
|
||||||
|
address: string;
|
||||||
|
name: string;
|
||||||
|
symbol: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Tx {
|
||||||
|
block: number;
|
||||||
|
success: boolean;
|
||||||
|
timestamp: number;
|
||||||
|
txHash: string;
|
||||||
|
txIndex: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Transaction {
|
||||||
|
from: string;
|
||||||
|
to: string;
|
||||||
|
token: Token;
|
||||||
|
tx: Tx;
|
||||||
|
value: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class Conversion {
|
||||||
|
destinationToken: Token;
|
||||||
|
fromValue: number;
|
||||||
|
sourceToken: Token;
|
||||||
|
toValue: number;
|
||||||
|
trader: string;
|
||||||
|
tx: Tx;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user