Skip to content

Commit 96c9244

Browse files
authored
Merge pull request #17 from Golem-Base/rvdp/dev
chore: remove now-unused ABI events
2 parents 327a967 + 2a08d1b commit 96c9244

File tree

2 files changed

+0
-37
lines changed

2 files changed

+0
-37
lines changed

src/client.ts

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -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
{

src/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ export const golemBaseABI = parseAbi([
1515
"event GolemBaseStorageEntityUpdated(uint256 indexed entityKey, uint256 expirationBlock)",
1616
"event GolemBaseStorageEntityDeleted(uint256 indexed entityKey)",
1717
"event GolemBaseStorageEntityBTLExtended(uint256 indexed entityKey, uint256 oldExpirationBlock, uint256 newExpirationBlock)",
18-
// Old ABI event that has a typo in the name and a missing non-indexed argument.
19-
// This can be removed once we retire the kaolin network (the only one using this event hash).
20-
"event GolemBaseStorageEntityBTLExptended(uint256 indexed entityKey, uint256 expirationBlock)",
21-
// Old ABI before renme of TTL -> BTL
22-
"event GolemBaseStorageEntityTTLExptended(uint256 indexed entityKey, uint256 expirationBlock)",
2318
])
2419

2520
// Golem Base event signatures

0 commit comments

Comments
 (0)