Skip to content

Commit 2e16f3e

Browse files
committed
add foundry installation in workflow
1 parent e9d1dbb commit 2e16f3e

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

.github/workflows/build-monorepo.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,26 @@ jobs:
2121
fetch-depth: 0
2222
submodules: 'true'
2323

24-
# handles Node caching
24+
# Set up Node.js environment
2525
- name: Set up Node.js
2626
uses: actions/setup-node@v4
2727
with:
2828
node-version: '>=22.5.0'
2929
cache: 'npm'
3030
cache-dependency-path: '**/package-lock.json'
3131

32+
# Install Foundry (Forge and Cast)
33+
- name: Install Foundry
34+
run: |
35+
curl -L https://foundry.paradigm.xyz | bash
36+
source $HOME/.foundry/bin/foundryup
37+
# Optional: Check if Foundry is installed correctly
38+
foundry --version
39+
40+
# Install Node.js dependencies
3241
- name: Install dependencies
3342
run: npm install
3443

44+
# Build all projects
3545
- name: Build projects
3646
run: npm run build:all

blocklock-agent/index.cjs

+12-15
Original file line numberDiff line numberDiff line change
@@ -68256,11 +68256,18 @@ async function createProviderWithRetry(url, options2 = {}, maxRetries = 20, retr
6825668256
}, "Connection failed. Retrying...", maxRetries, retryDelay);
6825768257
}
6825868258
async function connectDeployer(address, signer) {
68259-
return withTimeout(
68260-
Deployer__factory.connect(address, signer).waitForDeployment(),
68261-
3e4,
68262-
"Deployer did not deploy as expected..."
68263-
);
68259+
const POLL_INTERVAL = 5e3;
68260+
while (true) {
68261+
try {
68262+
const deployer = Deployer__factory.connect(address, signer);
68263+
await deployer.waitForDeployment();
68264+
console.log("Successfully connected to Deployer contract!");
68265+
return deployer;
68266+
} catch (error) {
68267+
console.log("Failed to connect, retrying in 5 seconds...");
68268+
}
68269+
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL));
68270+
}
6826468271
}
6826568272
async function withRetry(fn, retryMessage = "retrying...", maxRetries = 20, retryDelay = 1e3) {
6826668273
try {
@@ -68336,16 +68343,6 @@ async function isDeployed(address, provider) {
6833668343
return code.slice(2).length > 0;
6833768344
}
6833868345

68339-
// ../bls-bn254-js/src/index.ts
68340-
function withTimeout(inner, timeoutMs, message = "timed out") {
68341-
return Promise.race([
68342-
inner,
68343-
new Promise(
68344-
(_, reject) => setTimeout(() => reject(message), timeoutMs)
68345-
)
68346-
]);
68347-
}
68348-
6834968346
// src/deployments.ts
6835068347
var salt = 2345;
6835168348
var BLOCKLOCK_SCHEME_ID = "BN254-BLS-BLOCKLOCK";

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)