Skip to content

Commit

Permalink
main:
Browse files Browse the repository at this point in the history
  • Loading branch information
akhercha committed Oct 22, 2024
1 parent 7d4c7d7 commit 20c2f78
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion examples/pragma/pragma-devnet/devnet-script-dispatch.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hash } from "https://esm.run/[email protected]";

const HYPERLANE_MAILBOX_CONTRACT =
"0x5bfb1a565a1fa2eb33c5d8e587a7aeb5e6846d3aadf9fecb529ace1e3457096";
"0x064bb5e29a7e9fc67dedabb6d1c385050feef028563078daa9025dd8b218e596";
const FEED_ID_SIZE = 64;

const filter = {
Expand Down Expand Up @@ -52,6 +52,7 @@ function decodeFeedsUpdatedFromHyperlaneMessage(hexData) {
return trimmed === "" ? "" : trimmed;
});
data = data.join("");
console.log(data);

const numberOfUpdates = Number(data.slice(0, 4));
data = data.slice(4);
Expand All @@ -73,6 +74,7 @@ export function decodeTransfersInBlock({ header, events }) {
const transactionHash = transaction.meta.hash;
const hyperlaneMessageNonce = parseInt(event.data[6], 16);
const messageBody = event.data.slice(15);
console.log(messageBody);
const feedsUpdated = decodeFeedsUpdatedFromHyperlaneMessage(messageBody);

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const filter = {
events: [
{
fromAddress:
"0x753034396b7e59f3579e2beba2f408dd2ed12974e054a1348234bea4b10bd30",
"0x60240f2bccef7e64f920eec05c5bfffbc48c6ceaa4efca8748772b60cbafc3",
keys: [hash.getSelectorFromName("CheckpointSpotEntry")],
includeTransaction: true,
includeReceipt: false,
Expand Down
2 changes: 1 addition & 1 deletion examples/pragma/pragma-devnet/devnet-script-spot.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const filter = {
events: [
{
fromAddress:
"0x753034396b7e59f3579e2beba2f408dd2ed12974e054a1348234bea4b10bd30",
"0x60240f2bccef7e64f920eec05c5bfffbc48c6ceaa4efca8748772b60cbafc3",
keys: [hash.getSelectorFromName("SubmittedSpotEntry")],
includeTransaction: true,
includeReceipt: false,
Expand Down

0 comments on commit 20c2f78

Please sign in to comment.