Skip to content

Commit

Permalink
added pyth accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
kristinaNikolaevaa committed Nov 22, 2024
1 parent 01731f3 commit c16a299
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

DOCKER_USER = os.environ.get("DHUBU")
DOCKER_PASSWORD = os.environ.get("DHUBP")
DEVNET_SOLANA_URL = os.environ.get("DEVNET_SOLANA_URL")
IMAGE_NAME = os.environ.get("IMAGE_NAME", "evm_loader")
RUN_LINK_REPO = os.environ.get("RUN_LINK_REPO")
DOCKERHUB_ORG_NAME = os.environ.get("DOCKERHUB_ORG_NAME")
Expand Down Expand Up @@ -126,7 +127,8 @@ def build_docker_image(evm_sha_tag):
buildargs = {"REVISION": evm_sha_tag,
"SOLANA_IMAGE": solana_image,
"SOLANA_BPF_VERSION": SOLANA_BPF_VERSION,
"DOCKERHUB_ORG_NAME": DOCKERHUB_ORG_NAME}
"DOCKERHUB_ORG_NAME": DOCKERHUB_ORG_NAME,
"DEVNET_SOLANA_URL": DEVNET_SOLANA_URL}

tag = f"{DOCKERHUB_ORG_NAME}/{IMAGE_NAME}:{evm_sha_tag}"
click.echo("start build")
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
env:
DHUBU: ${{secrets.DHUBU}}
DHUBP: ${{secrets.DHUBP}}
DEVNET_SOLANA_URL: ${{secrets.DEVNET_SOLANA_URL}}
PROXY_ENDPOINT: "https://api.github.com/repos/${{ github.repository_owner }}/neon-proxy.py"
NEON_TESTS_ENDPOINT: ${{vars.NEON_TESTS_ENDPOINT}}
DOCKERHUB_ORG_NAME: ${{vars.DOCKERHUB_ORG_NAME}}
Expand Down
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,15 @@ FROM ${DOCKERHUB_ORG_NAME}/neon_test_programs:latest AS neon_test_programs

# Define solana-image that contains utility
FROM builder AS base

ARG DEVNET_SOLANA_URL
RUN solana program dump metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s /opt/metaplex.so --url mainnet-beta
RUN solana account 7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE --output-file pyth_sol.json --output json-compact --url ${DEVNET_SOLANA_URL}
RUN solana account F2VfCymdNQiCa8Vyg5E7BwEv9UPwfm8cVN6eqQLqXiGo --output-file pyth_neon.json --output json-compact --url ${DEVNET_SOLANA_URL}
RUN solana account 42amVS4KgzR9rA28tkVYqVXjq9Qa8dcZQMbH5EYFX6XC --output-file pyth_eth.json --output json-compact --url ${DEVNET_SOLANA_URL}
RUN solana account Dpw1EAVrSB1ibxiDQyTAW6Zip3J4Btk2x4SgApQCeFbX --output-file pyth_usdc.json --output json-compact --url ${DEVNET_SOLANA_URL}
RUN solana account HT2PLQBcG5EiCcNSaMHAjSgd9F98ecpATbk4Sk5oYuM --output-file pyth_usdt.json --output json-compact --url ${DEVNET_SOLANA_URL}



COPY --from=evm-loader-builder /opt/neon-evm/evm_loader/target/deploy/evm_loader*.so /opt/
COPY --from=evm-loader-builder /opt/neon-evm/evm_loader/target/deploy/evm_loader-dump.txt /opt/
Expand Down
16 changes: 16 additions & 0 deletions ci/solana-run-neon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ EVM_LOADER_PATH=${NEON_BIN}/evm_loader.so
METAPLEX=metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s
METAPLEX_PATH=${NEON_BIN}/metaplex.so

PYTH_SOL_ID=7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE
PYTH_NEON_ID=F2VfCymdNQiCa8Vyg5E7BwEv9UPwfm8cVN6eqQLqXiGo
PYTH_ETH_ID=42amVS4KgzR9rA28tkVYqVXjq9Qa8dcZQMbH5EYFX6XC
PUTH_USDC_ID=Dpw1EAVrSB1ibxiDQyTAW6Zip3J4Btk2x4SgApQCeFbX
PUTH_USDT_ID=HT2PLQBcG5EiCcNSaMHAjSgd9F98ecpATbk4Sk5oYuM
PYTH_SOL_PATH=${NEON_BIN}/pyth_sol.json
PYTH_NEON_PATH=${NEON_BIN}/pyth_neon.json
PYTH_ETH_PATH=${NEON_BIN}/pyth_eth.json
PUTH_USDC_PATH=${NEON_BIN}/pyth_usdc.json
PUTH_USDT_PATH=${NEON_BIN}/pyth_usdt.json


VALIDATOR_ARGS=(
--reset
Expand All @@ -20,6 +31,11 @@ VALIDATOR_ARGS=(
--ticks-per-slot 16
--upgradeable-program ${EVM_LOADER} ${EVM_LOADER_PATH} ${EVM_LOADER_AUTHORITY_KEYPAIR}
--bpf-program ${METAPLEX} ${METAPLEX_PATH}
--account ${PYTH_SOL_ID} ${PYTH_SOL_PATH}
--account ${PYTH_NEON_ID} ${PYTH_NEON_PATH}
--account ${PYTH_ETH_ID} ${PYTH_ETH_PATH}
--account ${PUTH_USDC_ID} ${PUTH_USDC_PATH}
--account ${PUTH_USDT_ID} ${PUTH_USDT_PATH}
--limit-ledger-size 400000000
)

Expand Down

0 comments on commit c16a299

Please sign in to comment.