Skip to content

Commit de4d378

Browse files
authored
fix: enable corepack in github actions (#115)
* fix: enable corepack in github actions * chore: add missing corepack in github actions * fix: add missing dep * fix: remove broken links, add todos * chore: correct example path
1 parent 9750930 commit de4d378

File tree

10 files changed

+195
-15
lines changed

10 files changed

+195
-15
lines changed

.github/workflows/build.yml

+7
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,18 @@ jobs:
2020
uses: styfle/[email protected]
2121
with:
2222
access_token: ${{ secrets.GITHUB_TOKEN }}
23+
2324
- uses: actions/checkout@v3
25+
26+
- name: Enable corepack
27+
run: |
28+
corepack enable
29+
2430
- name: Use Node.js ${{ matrix.node-version }}
2531
uses: actions/setup-node@v3
2632
with:
2733
node-version: ${{ matrix.node-version }}
34+
2835
- name: build
2936
run: |
3037
yarn install

.github/workflows/checks.yml

+20
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,18 @@ jobs:
1818
uses: styfle/[email protected]
1919
with:
2020
access_token: ${{ secrets.GITHUB_TOKEN }}
21+
2122
- uses: actions/checkout@v3
23+
24+
- name: Enable corepack
25+
run: |
26+
corepack enable
27+
2228
- name: Use Node.js ${{ matrix.node-version }}
2329
uses: actions/setup-node@v3
2430
with:
2531
node-version: ${{ matrix.node-version }}
32+
2633
- name: lint
2734
run: |
2835
yarn install
@@ -39,11 +46,18 @@ jobs:
3946
uses: styfle/[email protected]
4047
with:
4148
access_token: ${{ secrets.GITHUB_TOKEN }}
49+
4250
- uses: actions/checkout@v3
51+
52+
- name: Enable corepack
53+
run: |
54+
corepack enable
55+
4356
- name: Use Node.js ${{ matrix.node-version }}
4457
uses: actions/setup-node@v3
4558
with:
4659
node-version: ${{ matrix.node-version }}
60+
4761
- name: prettier
4862
run: |
4963
yarn install
@@ -57,7 +71,13 @@ jobs:
5771
uses: styfle/[email protected]
5872
with:
5973
access_token: ${{ secrets.GITHUB_TOKEN }}
74+
6075
- uses: actions/checkout@v3
76+
77+
- name: Enable corepack
78+
run: |
79+
corepack enable
80+
6181
- name: Link Checker
6282
uses: lycheeverse/[email protected]
6383
with:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ out
1818
.dccache
1919
*.code-workspace
2020
.direnv
21+
._*

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"@polkadot/util-crypto": "^12.6.2",
2626
"@radix-ui/react-slot": "^1.0.2",
2727
"@radix-ui/react-switch": "^1.0.3",
28+
"@radix-ui/react-tabs": "^1.1.3",
2829
"@radix-ui/react-tooltip": "^1.0.7",
2930
"@react-aria/ssr": "3.4.0",
3031
"@sentry/nextjs": "^7.27.0",

pages/developers/blueprint-contexts/eigenlayer-context.mdx

+9-3
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ The `EigenlayerContext` trait provides access to core Eigenlayer services and fu
4545

4646
First, define your context struct that implements the `EigenlayerContext` trait:
4747

48+
{/* TODO: Add URL */}
49+
4850
<GithubFileReaderDisplay
49-
url="https://github.com/tangle-network/blueprint/blob/main/blueprints/incredible-squaring-eigenlayer/src/contexts/aggregator.rs"
51+
url=""
5052
fromLine={39}
5153
toLine={52}
5254
title="Aggregator Context Definition"
@@ -56,8 +58,10 @@ First, define your context struct that implements the `EigenlayerContext` trait:
5658

5759
You can then use this context in your jobs to access Eigenlayer functionality:
5860

61+
{/* TODO: Add URL */}
62+
5963
<GithubFileReaderDisplay
60-
url="https://github.com/tangle-network/blueprint/blob/main/blueprints/incredible-squaring-eigenlayer/src/jobs/initialize_task.rs"
64+
url=""
6165
fromLine={13}
6266
toLine={52}
6367
title="Using EigenlayerContext in Jobs"
@@ -67,8 +71,10 @@ You can then use this context in your jobs to access Eigenlayer functionality:
6771

6872
Finally, instantiate your context in your main runner:
6973

74+
{/* TODO: Add URL */}
75+
7076
<GithubFileReaderDisplay
71-
url="https://github.com/tangle-network/blueprint/blob/main/blueprints/incredible-squaring-eigenlayer/src/main.rs"
77+
url=""
7278
fromLine={27}
7379
toLine={53}
7480
title="Instantiating the Context"

pages/developers/blueprints/use-cases.mdx

+6-2
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,21 @@ Tangle Network enables developers to rapidly build and deploy secure multi-party
2121
displayStyle="row"
2222
/>
2323

24+
{/* TODO: Add URL */}
25+
2426
<GithubRepoCard
27+
url=""
2528
name="hyperlane-ism-blueprint-template"
2629
description="Template for creating Hyperlane Interchain Security Module blueprints"
27-
url="https://github.com/tangle-network/hyperlane-ism-blueprint-template"
2830
displayStyle="row"
2931
/>
3032

33+
{/* TODO: Add URL */}
34+
3135
<GithubRepoCard
36+
url=""
3237
name="hyperbridge-relayer-blueprint"
3338
description="Blueprint for implementing Hyperbridge relayer functionality"
34-
url="https://github.com/tangle-network/hyperbridge-relayer-blueprint"
3539
displayStyle="row"
3640
/>
3741

pages/developers/eigenlayer-avs/incredible-squaring-avs.mdx

+19-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import GithubFileReaderDisplay from "/components/GithubFileReaderDisplay";
99
## Introduction
1010

1111
This will guide you through setting up and using EVM event listeners for EigenLayer AVSes, using examples from the
12-
[Incredible Squaring blueprint implementation](https://github.com/tangle-network/blueprint/tree/main/blueprints/incredible-squaring-eigenlayer).
12+
[Incredible Squaring blueprint implementation](https://github.com/tangle-network/blueprint/tree/main/examples/incredible-squaring-eigenlayer).
1313

1414
EVM event listeners are crucial for interacting with smart contracts on Ethereum-compatible networks.
1515
In the context of EigenLayer and the blueprint macro system, these listeners allow your Gadget to respond to specific
@@ -21,8 +21,10 @@ events emitted by EigenLayer contracts.
2121

2222
First, define the contract interface using the `sol!` and `load_abi!` macros. This generates Rust bindings for your smart contract.
2323

24+
{/* TODO: Add URL */}
25+
2426
<GithubFileReaderDisplay
25-
url="https://github.com/tangle-network/blueprint/blob/main/blueprints/incredible-squaring-eigenlayer/src/lib.rs"
27+
url=""
2628
fromLine={48}
2729
toLine={59}
2830
title="incredible-squaring-eigenlayer/src/lib.rs"
@@ -32,8 +34,10 @@ First, define the contract interface using the `sol!` and `load_abi!` macros. Th
3234

3335
Use the [`#[job]`](/developers/blueprint-macros/jobs) macro to define a function that will handle specific events. Include the `event_listener` attribute to specify the event details:
3436

37+
{/* TODO: Add URL */}
38+
3539
<GithubFileReaderDisplay
36-
url="https://github.com/tangle-network/blueprint/blob/main/blueprints/incredible-squaring-eigenlayer/src/jobs/initialize_task.rs"
40+
url=""
3741
fromLine={13}
3842
toLine={52}
3943
title="incredible-squaring-eigenlayer/src/jobs/initialize_task.rs"
@@ -43,8 +47,10 @@ Use the [`#[job]`](/developers/blueprint-macros/jobs) macro to define a function
4347

4448
Implement a preprocessor function to convert the event data into the format expected by your job function:
4549

50+
{/* TODO: Add URL */}
51+
4652
<GithubFileReaderDisplay
47-
url="https://github.com/tangle-network/blueprint/blob/main/blueprints/incredible-squaring-eigenlayer/src/jobs/initialize_task.rs"
53+
url=""
4854
fromLine={54}
4955
toLine={67}
5056
title="Event converter pre processor function"
@@ -56,8 +62,10 @@ Implement a preprocessor function to convert the event data into the format expe
5662

5763
Create an HTTP provider to connect to the Ethereum network w/ a wallet enabled for transacting:
5864

65+
{/* TODO: Add URL */}
66+
5967
<GithubFileReaderDisplay
60-
url="https://github.com/tangle-network/blueprint/blob/main/blueprints/incredible-squaring-eigenlayer/src/main.rs"
68+
url=""
6169
fromLine={20}
6270
toLine={24}
6371
title="Provider setup"
@@ -67,8 +75,10 @@ Create an HTTP provider to connect to the Ethereum network w/ a wallet enabled f
6775

6876
Instantiate the contract using the generated bindings:
6977

78+
{/* TODO: Add URL */}
79+
7080
<GithubFileReaderDisplay
71-
url="https://github.com/tangle-network/blueprint/blob/main/blueprints/incredible-squaring-eigenlayer/src/main.rs"
81+
url=""
7282
fromLine={36}
7383
toLine={44}
7484
title="Contract creation and event listener setup"
@@ -78,8 +88,10 @@ Instantiate the contract using the generated bindings:
7888

7989
Use the `BlueprintRunner` to execute the jobs and background services:
8090

91+
{/* TODO: Add URL */}
92+
8193
<GithubFileReaderDisplay
82-
url="https://github.com/tangle-network/blueprint/blob/main/blueprints/incredible-squaring-eigenlayer/src/main.rs"
94+
url=""
8395
fromLine={47}
8496
toLine={56}
8597
title="BlueprintRunner setup"

pages/developers/tangle-avs.mdx

+6-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ This file contains the core logic of your Blueprint, including job definitions,
3535

3636
Here's a basic example incorporating these elements:
3737

38+
{/* TODO: Add URL */}
39+
3840
<GithubFileReaderDisplay
39-
url="https://github.com/tangle-network/blueprint-template/blob/main/src/lib.rs"
41+
url=""
4042
fromLine={20}
4143
toLine={36}
4244
title="Example Blueprint Job with Tangle JobCalled Event Listener"
@@ -54,8 +56,10 @@ This file serves as the entry point for your Actively Validated Service (AVS) no
5456
4. **Event Handler Creation**: It instantiates the event handler for the `say_hello` job.
5557
5. **Event Watcher**: It starts the Substrate event watcher, which listens for relevant events on the Tangle Network.
5658

59+
{/* TODO: Add URL */}
60+
5761
<GithubFileReaderDisplay
58-
url="https://github.com/tangle-network/blueprint-template/blob/main/src/main.rs"
62+
url=""
5963
fromLine={6}
6064
toLine={27}
6165
title="Example Blueprint `main.rs` Entry Point"

pages/developers/troubleshooting.mdx

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ Caused by:
3838
3939
2. Verify that your blueprint's jobs and reports are implemented correctly. Occasionally, our SDK may have breaking changes to the error reporting. You will want to consider commenting out metadata generation and then rebuilding to check for errors in the blueprint.
4040

41+
{/* TODO: Add URL */}
42+
4143
<GithubFileReaderDisplay
42-
url="https://github.com/tangle-network/blueprint-template/blob/main/build.rs"
44+
url=""
4345
startLine={3}
4446
endLine={11}
4547
title="Comment out metadata generation to assess blueprint implementation errors"

0 commit comments

Comments
 (0)