pyth2wormhole: build + deploy program into local devnet
Change-Id: I82acc6755476229d97ad20e73f4ed08b27d98ecf
This commit is contained in:
parent
8fb9caf606
commit
78cd4ee437
|
@ -1,4 +1,4 @@
|
|||
target
|
||||
bin
|
||||
**/target
|
||||
**/node_modules
|
||||
**/node_modules
|
||||
|
|
|
@ -53,6 +53,9 @@ spec:
|
|||
- --bpf-program
|
||||
- gMYYig2utAxVoXnM9UhtTWrt8e7x2SVBZqsWZJeT5Gw # Derived from pyth_program.json
|
||||
- /opt/solana/deps/pyth_oracle.so
|
||||
- --bpf-program
|
||||
- P2WH424242424242424242424242424242424242424
|
||||
- /opt/solana/deps/pyth2wormhole.so
|
||||
- --log
|
||||
ports:
|
||||
- containerPort: 8001
|
||||
|
|
|
@ -33,6 +33,7 @@ pkgs.mkShell {
|
|||
openssl
|
||||
pkgconfig
|
||||
protobuf
|
||||
python3
|
||||
whcluster
|
||||
whinotify
|
||||
whkube
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
bin
|
||||
**/target
|
||||
**/target
|
||||
|
|
|
@ -38,7 +38,6 @@ RUN tar -xvf *.tar.gz && rm -rf *.tar.gz && mv pyth-client-$PYTH_SRC_REV pyth-cl
|
|||
WORKDIR /usr/src/bridge
|
||||
|
||||
ADD . .
|
||||
|
||||
RUN mkdir -p /opt/solana/deps
|
||||
|
||||
ENV EMITTER_ADDRESS="11111111111111111111111111111115"
|
||||
|
@ -47,15 +46,16 @@ ENV BRIDGE_ADDRESS="Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o"
|
|||
# Build Wormhole Solana progrms
|
||||
RUN --mount=type=cache,target=bridge/target \
|
||||
--mount=type=cache,target=modules/token_bridge/target \
|
||||
--mount=type=cache,target=target \
|
||||
--mount=type=cache,target=bin,from=rust,source=bin \
|
||||
--mount=type=cache,target=pyth2wormhole/target \
|
||||
cargo build-bpf --manifest-path "bridge/program/Cargo.toml" && \
|
||||
cargo build-bpf --manifest-path "bridge/cpi_poster/Cargo.toml" && \
|
||||
cargo build-bpf --manifest-path "modules/token_bridge/program/Cargo.toml" && \
|
||||
cargo build-bpf --manifest-path "pyth2wormhole/program/Cargo.toml" && \
|
||||
cp bridge/target/deploy/bridge.so /opt/solana/deps/bridge.so && \
|
||||
cp bridge/target/deploy/cpi_poster.so /opt/solana/deps/cpi_poster.so && \
|
||||
cp modules/token_bridge/target/deploy/token_bridge.so /opt/solana/deps/token_bridge.so && \
|
||||
cp modules/token_bridge/token-metadata/spl_token_metadata.so /opt/solana/deps/spl_token_metadata.so
|
||||
cp modules/token_bridge/token-metadata/spl_token_metadata.so /opt/solana/deps/spl_token_metadata.so && \
|
||||
cp pyth2wormhole/target/deploy/pyth2wormhole.so /opt/solana/deps/pyth2wormhole.so
|
||||
|
||||
# Build the Pyth Solana program
|
||||
WORKDIR $PYTH_DIR/pyth-client/program
|
||||
|
|
|
@ -29,8 +29,8 @@ retry () {
|
|||
done
|
||||
}
|
||||
|
||||
# Fund our account (as seen in solana-devnet.json).
|
||||
retry solana airdrop 1000 --faucet-port 9900 --faucet-host 127.0.0.1
|
||||
# Fund our account (as defined in solana/keys/solana-devnet.json).
|
||||
retry solana airdrop 1000
|
||||
|
||||
# Create a new SPL token
|
||||
token=$(spl-token create-token -- token.json | grep 'Creating token' | awk '{ print $3 }')
|
||||
|
|
|
@ -9,6 +9,7 @@ crate-type = ["cdylib", "lib"]
|
|||
name = "pyth2wormhole"
|
||||
|
||||
[features]
|
||||
default = ["bridge/no-entrypoint"]
|
||||
client = ["solitaire/client", "solitaire-client", "no-entrypoint"]
|
||||
trace = ["solitaire/trace", "bridge/trace"]
|
||||
no-entrypoint = []
|
||||
|
|
Loading…
Reference in New Issue