From 75ec089a8f3d87f97ccd8e5dfe007a29817d7abf Mon Sep 17 00:00:00 2001 From: Didac Semente Fernandez Date: Tue, 28 Apr 2026 16:40:40 +0200 Subject: [PATCH 1/3] Updates USC SDK + add extra timeout --- package.json | 2 +- utils/index.ts | 2 +- yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 3253a20..028a60d 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "tsx": "^4.20.3" }, "dependencies": { - "@gluwa/usc-sdk": "0.9.0", + "@gluwa/usc-sdk": "0.11.0", "@openzeppelin/contracts": "5.4.0", "@types/node": "25.6.0", "dotenv": "17.4.2", diff --git a/utils/index.ts b/utils/index.ts index 3273a77..907cdc3 100644 --- a/utils/index.ts +++ b/utils/index.ts @@ -46,7 +46,7 @@ export async function generateProofFor( // We wait for at most 20 minutes for the attestation to be available // In practice this should take about 8 minutes, but we're being conservative to make the examples robust. - await info.waitUntilHeightAttested(chainKey, blockNumber + 10, 5_000, 1_200_000); + await info.waitUntilHeightAttested(chainKey, blockNumber + 10, 5_000, 1_200_000, 15_000); console.log(`Block ${blockNumber} attested! Generating proof...`); diff --git a/yarn.lock b/yarn.lock index 659e2cd..121edeb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -169,10 +169,10 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2" integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== -"@gluwa/usc-sdk@0.9.0": - version "0.9.0" - resolved "https://registry.yarnpkg.com/@gluwa/usc-sdk/-/usc-sdk-0.9.0.tgz#ad8cbf16e4ac7953aead9d9ed86ebb6647c6fcb7" - integrity sha512-O1ziQTi5cLoP1ruaVxgbXzPBGlkil6jqo9VyWdjbYrtm9X0DtDz7OxZ9wVR7m0bkGKutF0pRbaAvKGI0E6R3LA== +"@gluwa/usc-sdk@0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@gluwa/usc-sdk/-/usc-sdk-0.11.0.tgz#487acb6e627ece6c6b11d8d7c301f880aee66f0b" + integrity sha512-TygYUJjE3/VBARtAET+Rb5D4eCYkkmcR9H9RMt6DJVgMoB+knb5LKqPkeS3qG0Js1keZelGW8fafDvgaOX+Aqw== dependencies: axios "^1.13.2" dotenv "^17.2.3" From 4f58776875635381b98fa2bf34e61133c9be05c9 Mon Sep 17 00:00:00 2001 From: Didac Semente Fernandez Date: Tue, 28 Apr 2026 18:29:11 +0200 Subject: [PATCH 2/3] Increase wait --- .github/workflows/bridge-offchain-worker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bridge-offchain-worker.yml b/.github/workflows/bridge-offchain-worker.yml index 98a1172..d3751c0 100644 --- a/.github/workflows/bridge-offchain-worker.yml +++ b/.github/workflows/bridge-offchain-worker.yml @@ -281,7 +281,7 @@ jobs: # wait for attestations for the source block where we burned the tokens echo "INFO: Wait for mint query to be processed by the USC contract" - sleep 480 + sleep 500 grep "Tokens minted!" /var/tmp/bridge-offchain-worker-logs/offchain-worker.log echo "INFO: Verify bridged tokens" From 8d1c25f41c9e25bb7e2d725353f07d39b7092af7 Mon Sep 17 00:00:00 2001 From: Didac Semente Fernandez Date: Tue, 28 Apr 2026 20:43:28 +0200 Subject: [PATCH 3/3] Replace sleep with unit loop --- .github/workflows/bridge-offchain-worker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bridge-offchain-worker.yml b/.github/workflows/bridge-offchain-worker.yml index d3751c0..a0c41c2 100644 --- a/.github/workflows/bridge-offchain-worker.yml +++ b/.github/workflows/bridge-offchain-worker.yml @@ -281,7 +281,7 @@ jobs: # wait for attestations for the source block where we burned the tokens echo "INFO: Wait for mint query to be processed by the USC contract" - sleep 500 + timeout 1080 bash -c 'until grep -q "Tokens minted!" /var/tmp/bridge-offchain-worker-logs/offchain-worker.log; do sleep 5; done' grep "Tokens minted!" /var/tmp/bridge-offchain-worker-logs/offchain-worker.log echo "INFO: Verify bridged tokens"