File tree Expand file tree Collapse file tree 2 files changed +13
-14
lines changed
packages/fasset-indexer-core/src/utils Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change 1-
21export namespace PaymentReference {
3- export const TYPE_SHIFT = BigInt ( 192 )
4- export const LOW_BITS_MASK = ( BigInt ( 1 ) << TYPE_SHIFT ) - BigInt ( 1 )
5- // common prefix 0x464250526641 = hex('FBPRfA' - Flare Bridge Payment Reference / fAsset)
2+ export const TYPE_SHIFT = BigInt ( 192 )
3+ export const LOW_BITS_MASK = ( BigInt ( 1 ) << TYPE_SHIFT ) - BigInt ( 1 )
4+ // common prefix 0x464250526641 = hex('FBPRfA' - Flare Bridge Payment Reference / fAsset)
65
7- export function isValid ( reference : string | null ) : reference is string {
8- return reference != null && / ^ 0 x 4 6 4 2 5 0 5 2 6 6 4 1 [ 0 - 9 a - z A - Z ] { 52 } $ / . test ( reference )
9- }
6+ export function isValid ( reference : string | null ) : reference is string {
7+ return reference != null && / ^ 0 x 4 6 4 2 5 0 5 2 6 6 4 1 [ 0 - 9 a - z A - Z ] { 52 } $ / . test ( reference )
8+ }
109
11- export function decodeId ( reference : string ) {
12- return BigInt ( reference ) & LOW_BITS_MASK
13- }
10+ export function decodeId ( reference : string ) {
11+ return BigInt ( reference ) & LOW_BITS_MASK
12+ }
1413
15- export function decodeType ( reference : string ) {
16- return ( BigInt ( reference ) >> TYPE_SHIFT ) & BigInt ( 0xffff )
17- }
14+ export function decodeType ( reference : string ) {
15+ return ( BigInt ( reference ) >> TYPE_SHIFT ) & BigInt ( 0xffff )
16+ }
1817}
Original file line number Diff line number Diff line change 11import { FIRST_UNHANDLED_EVENT_BLOCK_DB_KEY } from "../config"
2- import { EntityManager , getVar , ORM } from "../orm"
2+ import { EntityManager , getVar } from "../orm"
33
44// back indexer db vars
55export function backUpdateFirstUnhandledBlockName ( updateName : string ) : string {
You can’t perform that action at this time.
0 commit comments