@@ -18,7 +18,6 @@ export type ClickhouseTransactionElem = {
1818 value : string ;
1919 method : string ;
2020 flags : number ;
21- timestamp : string ;
2221 outgoing : boolean ;
2322 token : [ string , string ] [ ] ;
2423} ;
@@ -44,7 +43,6 @@ export const TransactionElemSchema = z.object({
4443 value : z . string ( ) ,
4544 method : z . string ( ) ,
4645 flags : z . number ( ) ,
47- timestamp : z . string ( ) ,
4846 outgoing : z . boolean ( ) ,
4947} ) ;
5048
@@ -62,7 +60,6 @@ export const TransactionFullSchema = z.object({
6260 value : z . string ( ) ,
6361 method : z . string ( ) ,
6462 flags : z . number ( ) ,
65- timestamp : z . string ( ) ,
6663 outgoing : z . boolean ( ) ,
6764 token : z . array ( TokenSchema ) ,
6865} ) ;
@@ -84,7 +81,6 @@ gas_used,
8481seqno,
8582value,
8683fee_credit,
87- timestamp,
8884substring(arrayStringConcat(arrayMap(x -> hex(x), data)), 1, 8) as method` ;
8985
9086const fieldsFull = `hex(hash) as hash,
@@ -100,7 +96,6 @@ gas_used,
10096seqno,
10197value,
10298fee_credit,
103- timestamp,
10499arrayStringConcat(arrayMap(x -> hex(x), data)) as method,
105100arrayMap(x -> tuple(hex(tupleElement(x, 1)), tupleElement(x, 2)), token) as token` ;
106101
@@ -119,7 +114,6 @@ export const getTransactionsByBlockHash = async (hash: string): Promise<Transact
119114 ${ fieldsElem }
120115 FROM transactions WHERE block_hash = {hash: String}
121116 ORDER BY
122- timestamp DESC,
123117 block_id DESC,
124118 transaction_index ASC,
125119 seqno DESC,
@@ -146,7 +140,6 @@ export const getTransactionsByBlock = async (
146140 ${ fieldsElem }
147141 FROM transactions WHERE block_id = {id: Int32} AND shard_id = {shard: Int32}
148142 ORDER BY
149- timestamp DESC,
150143 block_id DESC,
151144 transaction_index ASC,
152145 seqno DESC,
@@ -176,15 +169,14 @@ export const getTransactionsByAddress = async (address: string, offset: number,
176169 console . log ( `SELECT
177170 ${ fieldsElem }
178171 FROM transactions
179- WHERE from = {address: String} OR to = {address: String} ORDER BY timestamp DESC LIMIT {limit: Int32} OFFSET {offset: Int32}
172+ WHERE from = {address: String} OR to = {address: String} ORDER BY block_id DESC LIMIT {limit: Int32} OFFSET {offset: Int32}
180173 ` ) ;
181174 const query = await client . query ( {
182175 query : `SELECT
183176 ${ fieldsElem }
184177 FROM transactions
185178 WHERE from = {address: String} OR to = {address: String}
186179 ORDER BY
187- timestamp DESC,
188180 block_id DESC,
189181 seqno DESC,
190182 outgoing ASC
@@ -255,7 +247,6 @@ export const getChildTransactionsByHash = async (hash: string) => {
255247 incoming.seqno as seqno,
256248 incoming.value as value,
257249 incoming.fee_credit as fee_credit,
258- incoming.timestamp as timestamp,
259250 substring(arrayStringConcat(arrayMap(x -> hex(x), incoming.data)), 1, 8) as method
260251FROM transactions as outgoing
261252LEFT OUTER JOIN transactions as incoming
0 commit comments