Skip to content

Commit

Permalink
fix: use seed properly and update docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-bahjati committed Sep 5, 2024
1 parent eb23897 commit 61a233d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN curl -sSL https://install.python-poetry.org | python
ENV PATH="$POETRY_HOME/bin:$PATH"

# Install Solana CLI
RUN sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
RUN sh -c "$(curl -sSfL https://release.solana.com/v1.14.17/install)"
ENV PATH=$PATH:/root/.local/share/solana/install/active_release/bin


Expand Down Expand Up @@ -80,7 +80,7 @@ ARG APP_PATH

# Install Solana CLI, we redo this step because this Docker target
# starts from scratch without the earlier Solana installation
RUN sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
RUN sh -c "$(curl -sSfL https://release.solana.com/v1.14.17/install"
ENV PATH=$PATH:/root/.local/share/solana/install/active_release/bin

ENV \
Expand Down
6 changes: 4 additions & 2 deletions program_admin/publisher_program_instructions.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ def create_buffer_account(
space: int,
lamports: int,
) -> Tuple[PublicKey, TransactionInstruction]:

seed = str(publisher_pubkey)
# The seed should be str but later is used in rust as
# &str and therefore we use latin1 encoding to map byte
# i to char i
seed = bytes(publisher_pubkey).decode("latin-1")
new_account_pubkey = PublicKey.create_with_seed(
base_pubkey,
seed,
Expand Down

0 comments on commit 61a233d

Please sign in to comment.