Skip to content

Commit 3296159

Browse files
authored
feat: use separate program id for dev env (#87)
1 parent 72c0780 commit 3296159

File tree

4 files changed

+7
-0
lines changed

4 files changed

+7
-0
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v4
11+
- name: cargo install avm
12+
run: cargo install --git https://github.com/coral-xyz/anchor avm
1113
- uses: metadaoproject/[email protected]
1214
with:
1315
anchor-version: '0.30.1'

Anchor.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[toolchain]
2+
anchor_version = "0.30.1-ca7fcee6b8269b732b66536f72ff3fb48cf1b5f9"
23

34
[workspace]
45
members = [

programs/gateway/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ no-entrypoint = []
1515
no-idl = []
1616
no-log-ix-name = []
1717
idl-build = ["anchor-lang/idl-build"]
18+
dev = []
1819

1920
[dependencies]
2021
anchor-lang = { version = "=0.30.0" }

programs/gateway/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ enum InstructionId {
4646
IncrementNonce = 7,
4747
}
4848

49+
#[cfg(feature = "dev")]
50+
declare_id!("94U5AHQMKkV5txNJ17QPXWoh474PheGou6cNP2FEuL1d");
51+
#[cfg(not(feature = "dev"))]
4952
declare_id!("ZETAjseVjuFsxdRxo6MmTCvqFwb3ZHUx56Co3vCmGis");
5053

5154
#[repr(C)]

0 commit comments

Comments
 (0)