@@ -331,38 +331,6 @@ export async function createClient(
331331 } ] ) ,
332332 }
333333 }
334- // Old ABI event that has a typo in the name and a missing non-indexed argument
335- case "GolemBaseStorageEntityBTLExptended" :
336- // Old ABI before renme of TTL -> BTL
337- case "GolemBaseStorageEntityTTLExptended" : {
338- // We need to manually parse the data in this case, since one argument is missing from the signature
339- function parseExtendTTLData ( data : Hex ) : { oldExpirationBlock : bigint , newExpirationBlock : bigint , } {
340- // Take the first 64 bytes by masking the rest (shift 1 to the left 256 positions, then negate the number)
341- // Example:
342- // 0x 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 012f
343- // 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0143
344- // mask this with 0x 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
345- // 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111
346- // to obtain 0x143
347- // and then shift the original number to the right by 256 to obtain 0x12f
348- const dataParsed = BigInt ( data )
349- const newExpirationBlock = dataParsed & ( ( 1n << 256n ) - 1n )
350- const oldExpirationBlock = dataParsed >> 256n
351- return {
352- oldExpirationBlock,
353- newExpirationBlock,
354- }
355- }
356- const expirationBlocks = parseExtendTTLData ( txlog . data )
357- return {
358- ...receipts ,
359- extendEntitiesReceipts : receipts . extendEntitiesReceipts . concat ( [ {
360- entityKey : toHex ( parsed . args . entityKey ) ,
361- newExpirationBlock : Number ( expirationBlocks . newExpirationBlock ) ,
362- oldExpirationBlock : Number ( expirationBlocks . oldExpirationBlock ) ,
363- } ] ) ,
364- }
365- }
366334 }
367335 } ,
368336 {
0 commit comments