Skip to content

Commit

Permalink
added new contract types
Browse files Browse the repository at this point in the history
  • Loading branch information
D4mph1r committed Aug 6, 2024
1 parent 8be66d2 commit 61290a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/handler/evm/utils/listenForLockEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ const listenForLockEvents = (
Bridge__factory.createInterface().getEvent("Locked").topicHash,
],
});

logger.trace(
`From block: ${lastBlock} to: ${latestBlock}. Tx Count ${logs.length}`,
chainIdent,
);
if (!logs.length) {
logger.trace(
`No Transactions found in chain from block: ${lastBlock} to: ${latestBlock}. Waiting for 10 Seconds before looking for new transactions`,
chainIdent,
);
lastBlock = latestBlock + 1;
await em.upsert(Block, {
chain: chainIdent,
Expand All @@ -64,6 +63,7 @@ const listenForLockEvents = (
listenerChain: chainIdent,
});
if (found) {
logger.info("Transaction already processed");
continue;
}
await cb(
Expand Down
4 changes: 2 additions & 2 deletions src/handler/ton/utils/addSelfAsValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default async function addSelfAsValidator(
$$type: "SignerAndSignature",
key: signerPublicKeyBigInt,
signature: beginCell()
.storeBuffer(Buffer.from(item.signature, "hex"))
.storeBuffer(Buffer.from(item.signature.replace("0x", ""), "hex"))
.endCell(),
};
sigs.set(BigInt(index), sig);
Expand All @@ -101,7 +101,7 @@ export default async function addSelfAsValidator(
newValidatorAddress: wallet.address,
sigs,
len: beginCell()
.storeUint(sigs.keys.length, 256)
.storeUint(sigs.size, 256)
.endCell()
.beginParse()
.loadUintBig(256),
Expand Down

0 comments on commit 61290a9

Please sign in to comment.