File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,12 @@ CLONED_MAINNET_PROGRAMS=\
7
7
ts/tests/artifacts/mainnet_cctp_token_messenger_minter.so \
8
8
ts/tests/artifacts/mainnet_cctp_message_transmitter.so
9
9
10
+ PROGRAM_NAMES =matching_engine token_router upgrade_manager
11
+
12
+ # ## Building the IDL requires a nightly build. We arbitrarily chose the same
13
+ # ## date as the release of Anchor 0.30.1.
14
+ IDL_TOOLCHAIN =nightly-2024-06-20
15
+
10
16
.PHONY : all
11
17
all : check
12
18
@@ -47,12 +53,10 @@ anchor-test-setup: node_modules ts/tests/artifacts $(CLONED_MAINNET_PROGRAMS)
47
53
.PHONY : idl
48
54
idl :
49
55
mkdir -p target/idl target/types
50
- RUSTUP_TOOLCHAIN=nightly-2024-06-20 anchor idl build -p matching-engine -o target/idl/matching_engine.json
51
- anchor idl type -o target/types/matching_engine.ts target/idl/matching_engine.json
52
- RUSTUP_TOOLCHAIN=nightly-2024-06-20 anchor idl build -p token-router -o target/idl/token_router.json
53
- anchor idl type -o target/types/token_router.ts target/idl/token_router.json
54
- RUSTUP_TOOLCHAIN=nightly-2024-06-20 anchor idl build -p upgrade-manager -o target/idl/upgrade_manager.json
55
- anchor idl type -o target/types/upgrade_manager.ts target/idl/upgrade_manager.json
56
+ for program in $( PROGRAM_NAMES) ; do \
57
+ RUSTUP_TOOLCHAIN=$(IDL_TOOLCHAIN ) anchor idl build -p $$ program -o target/idl/$$ program.json; \
58
+ anchor idl type -o target/types/$$ program.ts target/idl/$$ program.json; \
59
+ done
56
60
mkdir -p ts/src/idl/json
57
61
mkdir -p ts/src/idl/ts
58
62
cp -r target/idl/* ts/src/idl/json/
You can’t perform that action at this time.
0 commit comments