Skip to content

Commit

Permalink
fix program id (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdaviderb committed Aug 4, 2022
1 parent 5617332 commit d61483f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Validate declare_id
run: (grep -rnw './programs' -e 'declare_id!("YOUR_PROGRAM_ID");') || exit 1
- name: Add wallet
run: echo $DEVNET_TEST_WALLET > id.json
env:
Expand All @@ -18,6 +20,11 @@ jobs:
run: echo $ORACLE_PROGRAM_KEYPAIR_TEST > program-keypair.json
env:
ORACLE_PROGRAM_KEYPAIR_TEST: ${{ secrets.ORACLE_PROGRAM_KEYPAIR_TEST }}
- name: Replace declare_id with the right address
uses: jacobtomlinson/gha-find-replace@v2
with:
find: "YOUR_PROGRAM_ID"
replace: "CXCE5fYFEuGShPKXGTYafxr3iChkBzgxCcAx1TABXJ1D"
- name: Anchor Tests
run: docker build -f Dockerfile.ci -t ci . && docker run ci sh ./.ci/tests.sh
deploy-dev:
Expand All @@ -26,6 +33,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Validate declare_id
run: (grep -rnw './programs' -e 'declare_id!("YOUR_PROGRAM_ID");') || exit 1
- name: Add wallet
run: echo $DEVNET_DEV_WALLET > id.json
env:
Expand All @@ -34,5 +43,10 @@ jobs:
run: echo $ORACLE_PROGRAM_KEYPAIR_DEV > program-keypair.json
env:
ORACLE_PROGRAM_KEYPAIR_DEV: ${{ secrets.ORACLE_PROGRAM_KEYPAIR_DEV }}
- name: Replace declare_id with the right address
uses: jacobtomlinson/gha-find-replace@v2
with:
find: "YOUR_PROGRAM_ID"
replace: "BFGzZeqA47Kgxv7x1D1bZ7RENbjgV1FjrDd3z7Pse9Q4"
- name: Deploy to Devnet
run: docker build -f Dockerfile.ci -t ci . && docker run ci sh ./.ci/deploy-dev.sh
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Devnet program:
BFGzZeqA47Kgxv7x1D1bZ7RENbjgV1FjrDd3z7Pse9Q4
Devnet Program (Testing): CXCE5fYFEuGShPKXGTYafxr3iChkBzgxCcAx1TABXJ1D (we use this address to run the integration tests)
Devnet program: BFGzZeqA47Kgxv7x1D1bZ7RENbjgV1FjrDd3z7Pse9Q4
2 changes: 1 addition & 1 deletion programs/oracle/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anchor_lang::prelude::*;
use chainlink_solana as chainlink;

declare_id!("CXCE5fYFEuGShPKXGTYafxr3iChkBzgxCcAx1TABXJ1D");
declare_id!("YOUR_PROGRAM_ID");

#[account]
pub struct Decimal {
Expand Down

0 comments on commit d61483f

Please sign in to comment.