solana: bump: Rust nightly-2022-07-12, SOL SDK v1.10.31, rust container 1.60
solana: use prebuild docker image for 1.10.31 solana: use the right rust version from https://github.com/solana-labs/solana/blob/v1.10.31/ci/rust-version.sh nft_bridge: TransportError -> BanksClientError solana/Dockerfile.wasm: Use rust-toolchain instead of rustup
This commit is contained in:
parent
2092484e73
commit
18eac4e3d3
|
@ -1,18 +1,13 @@
|
||||||
#syntax=docker/dockerfile:1.2@sha256:e2a8561e419ab1ba6b2fe6cbdf49fd92b95912df1cf7d313c3e2230a333fdbcc
|
#syntax=docker/dockerfile:1.2@sha256:e2a8561e419ab1ba6b2fe6cbdf49fd92b95912df1cf7d313c3e2230a333fdbcc
|
||||||
FROM docker.io/library/rust:1.49@sha256:a50165ea96983c21832578afb1c8c028674c965bc1ed43b607871b1f362e06a5
|
FROM ghcr.io/certusone/solana:1.10.31@sha256:d31e8db926a1d3fbaa9d9211d9979023692614b7b64912651aba0383e8c01bad AS solana
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -yq libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang ncat
|
# libudev is needed by spl-token-cli, and ncat is needed by the devnet setup
|
||||||
|
# script to be able to signal a health status for tilt
|
||||||
|
RUN apt-get update && apt-get install -yq libudev-dev ncat
|
||||||
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
|
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
|
||||||
RUN curl -sSfL https://release.solana.com/v1.9.4/install | sh
|
|
||||||
|
|
||||||
RUN rustup default nightly-2022-01-02
|
|
||||||
RUN rustup component add rustfmt
|
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache \
|
RUN --mount=type=cache,target=/root/.cache \
|
||||||
cargo install --version =2.0.12 spl-token-cli
|
cargo install --version =2.0.12 --locked spl-token-cli
|
||||||
|
|
||||||
ENV SOLANA_BIN_PATH="/root/.local/share/solana/install/active_release/bin"
|
|
||||||
ENV PATH="$SOLANA_BIN_PATH:$PATH"
|
|
||||||
|
|
||||||
WORKDIR /usr/src/clients/js
|
WORKDIR /usr/src/clients/js
|
||||||
COPY clients/js/package.json clients/js/package-lock.json ./
|
COPY clients/js/package.json clients/js/package-lock.json ./
|
||||||
|
|
|
@ -34,13 +34,13 @@ opt-level = 3
|
||||||
lto = "thin"
|
lto = "thin"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
borsh = { version="=0.9.1" }
|
borsh = { version="=0.9.3" }
|
||||||
nom = { version="7", default-features=false, features=["alloc"] }
|
nom = { version="7", default-features=false, features=["alloc"] }
|
||||||
primitive-types = { version = "0.9.0", default-features = false }
|
primitive-types = { version = "0.9.0", default-features = false }
|
||||||
wormhole-core = { path="../core", version="0.1.0" }
|
wormhole-core = { path="../core", version="0.1.0" }
|
||||||
|
|
||||||
# Solana Specific
|
# Solana Specific
|
||||||
solana-program = { version="=1.9.4", optional=true }
|
solana-program = { version="=1.10.31", optional=true }
|
||||||
|
|
||||||
# Terra Specific
|
# Terra Specific
|
||||||
cosmwasm-std = { version = "0.16.0", optional=true }
|
cosmwasm-std = { version = "0.16.0", optional=true }
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3,16 +3,16 @@
|
||||||
To speed up builds and ensure that upstream dependencies remain available, we
|
To speed up builds and ensure that upstream dependencies remain available, we
|
||||||
publish prebuilt docker images to https://github.com/orgs/certusone/packages.
|
publish prebuilt docker images to https://github.com/orgs/certusone/packages.
|
||||||
|
|
||||||
The base images have names ending in `*.base`, such as `Dockerfile.base` and
|
The base images have names ending in `*.base`, such as `Dockerfile.base`.
|
||||||
`Dockerfile.wasm.base`. To push a new image:
|
To push a new image:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# first build the image
|
# first build the image
|
||||||
DOCKER_BUILDKIT=1 docker build -f Dockerfile.wasm.base -t wasm-pack .
|
DOCKER_BUILDKIT=1 docker build -f Dockerfile.base -t solana .
|
||||||
# tag the image with the appropriate version
|
# tag the image with the appropriate version
|
||||||
docker tag wasm-pack:latest ghcr.io/certusone/wasm-pack:0.9.1
|
docker tag solana:latest ghcr.io/certusone/solana:1.10.31
|
||||||
# push to ghcr
|
# push to ghcr
|
||||||
docker push ghcr.io/certusone/wasm-pack:0.9.1
|
docker push ghcr.io/certusone/solana:1.10.31
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, modify the reference in `Dockerfile.wasm` (make sure to update the sha256 hash too).
|
Finally, modify the reference in `Dockerfile` (make sure to update the sha256 hash too).
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#syntax=docker/dockerfile:1.2@sha256:e2a8561e419ab1ba6b2fe6cbdf49fd92b95912df1cf7d313c3e2230a333fdbcc
|
#syntax=docker/dockerfile:1.2@sha256:e2a8561e419ab1ba6b2fe6cbdf49fd92b95912df1cf7d313c3e2230a333fdbcc
|
||||||
FROM ghcr.io/certusone/solana:1.9.4@sha256:5389eccba0ba59ae119bc1438b61be8904707e26df8f0732116a8dce0f64eb52 AS solana
|
FROM ghcr.io/certusone/solana:1.10.31@sha256:d31e8db926a1d3fbaa9d9211d9979023692614b7b64912651aba0383e8c01bad AS solana
|
||||||
|
|
||||||
# Support additional root CAs
|
# Support additional root CAs
|
||||||
COPY cert.pem* /certs/
|
COPY cert.pem* /certs/
|
||||||
|
@ -49,20 +49,24 @@ RUN [ -n "${BRIDGE_ADDRESS}" ]
|
||||||
|
|
||||||
# This is a pre-built contract.
|
# This is a pre-built contract.
|
||||||
RUN --mount=type=cache,target=target,id=test \
|
RUN --mount=type=cache,target=target,id=test \
|
||||||
|
--mount=type=cache,target=/usr/local/cargo/registry,id=cargo_registry \
|
||||||
mkdir -p target/deploy && \
|
mkdir -p target/deploy && \
|
||||||
cp modules/token_bridge/token-metadata/spl_token_metadata.so target/deploy/
|
cp modules/token_bridge/token-metadata/spl_token_metadata.so target/deploy/
|
||||||
|
|
||||||
RUN --mount=type=cache,target=target,id=test \
|
RUN --mount=type=cache,target=target,id=test \
|
||||||
|
--mount=type=cache,target=/usr/local/cargo/registry,id=cargo_registry \
|
||||||
cargo test-bpf \
|
cargo test-bpf \
|
||||||
--manifest-path bridge/program/Cargo.toml \
|
--manifest-path bridge/program/Cargo.toml \
|
||||||
--features trace,instructions
|
--features trace,instructions
|
||||||
|
|
||||||
RUN --mount=type=cache,target=target,id=test \
|
RUN --mount=type=cache,target=target,id=test \
|
||||||
|
--mount=type=cache,target=/usr/local/cargo/registry,id=cargo_registry \
|
||||||
cargo test-bpf \
|
cargo test-bpf \
|
||||||
--manifest-path modules/token_bridge/program/Cargo.toml \
|
--manifest-path modules/token_bridge/program/Cargo.toml \
|
||||||
--features trace,instructions
|
--features trace,instructions
|
||||||
|
|
||||||
RUN --mount=type=cache,target=target,id=test \
|
RUN --mount=type=cache,target=target,id=test \
|
||||||
|
--mount=type=cache,target=/usr/local/cargo/registry,id=cargo_registry \
|
||||||
cargo test-bpf \
|
cargo test-bpf \
|
||||||
--manifest-path modules/nft_bridge/program/Cargo.toml \
|
--manifest-path modules/nft_bridge/program/Cargo.toml \
|
||||||
--features trace,instructions
|
--features trace,instructions
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#syntax=docker/dockerfile:1.2@sha256:e2a8561e419ab1ba6b2fe6cbdf49fd92b95912df1cf7d313c3e2230a333fdbcc
|
#syntax=docker/dockerfile:1.2@sha256:e2a8561e419ab1ba6b2fe6cbdf49fd92b95912df1cf7d313c3e2230a333fdbcc
|
||||||
FROM docker.io/library/rust:1.49@sha256:a50165ea96983c21832578afb1c8c028674c965bc1ed43b607871b1f362e06a5 AS solana
|
FROM docker.io/library/rust:1.60.0@sha256:9fe1f39bec70576e2bd568fafb194b2a532a6f2928bc0b951ac2c0a69a2be9fe as solana
|
||||||
|
|
||||||
RUN sh -c "$(curl -sSfL https://release.solana.com/v1.9.4/install)"
|
RUN sh -c "$(curl -sSfL https://release.solana.com/v1.10.31/install)"
|
||||||
|
|
||||||
ENV PATH="/root/.local/share/solana/install/active_release/bin:$PATH"
|
ENV PATH="/root/.local/share/solana/install/active_release/bin:$PATH"
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ FROM docker.io/library/rust:1.49@sha256:a50165ea96983c21832578afb1c8c028674c965b
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang
|
RUN apt-get update && apt-get install -y libssl-dev libudev-dev pkg-config zlib1g-dev llvm clang
|
||||||
RUN rustup component add rustfmt
|
RUN rustup component add rustfmt
|
||||||
RUN rustup default nightly-2022-01-02
|
|
||||||
|
|
||||||
WORKDIR /usr/src/bridge
|
WORKDIR /usr/src/bridge
|
||||||
|
|
||||||
|
@ -18,6 +17,7 @@ ENV RUST_LOG="solana_runtime::system_instruction_processor=trace,solana_runtime:
|
||||||
ENV EMITTER_ADDRESS="11111111111111111111111111111115"
|
ENV EMITTER_ADDRESS="11111111111111111111111111111115"
|
||||||
ENV BRIDGE_ADDRESS="Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o"
|
ENV BRIDGE_ADDRESS="Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o"
|
||||||
|
|
||||||
|
COPY rust-toolchain .
|
||||||
COPY bridge bridge
|
COPY bridge bridge
|
||||||
COPY modules modules
|
COPY modules modules
|
||||||
COPY solitaire solitaire
|
COPY solitaire solitaire
|
||||||
|
|
|
@ -6,16 +6,16 @@ edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.40"
|
anyhow = "1.0.40"
|
||||||
borsh = "=0.9.1"
|
borsh = "=0.9.3"
|
||||||
clap = "2.33.0"
|
clap = "2.33.0"
|
||||||
cpi-poster = { path = "../cpi_poster", features = ["no-entrypoint"] }
|
cpi-poster = { path = "../cpi_poster", features = ["no-entrypoint"] }
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
rand = "0.7.3"
|
rand = "0.7.3"
|
||||||
shellexpand = "2.1.0"
|
shellexpand = "2.1.0"
|
||||||
solana-client = "=1.9.4"
|
solana-client = "=1.10.31"
|
||||||
solana-program = "=1.9.4"
|
solana-program = "=1.10.31"
|
||||||
solana-sdk = "=1.9.4"
|
solana-sdk = "=1.10.31"
|
||||||
solana-cli-config = "=1.9.4"
|
solana-cli-config = "=1.10.31"
|
||||||
solana-clap-utils = "=1.9.4"
|
solana-clap-utils = "=1.10.31"
|
||||||
solitaire = { path = "../../solitaire/program" }
|
solitaire = { path = "../../solitaire/program" }
|
||||||
wormhole-bridge-solana = { path = "../program", features = ["client"] }
|
wormhole-bridge-solana = { path = "../program", features = ["client"] }
|
||||||
|
|
|
@ -426,6 +426,7 @@ fn main() {
|
||||||
preflight_commitment: None,
|
preflight_commitment: None,
|
||||||
encoding: None,
|
encoding: None,
|
||||||
max_retries: None,
|
max_retries: None,
|
||||||
|
min_context_slot: None,
|
||||||
},
|
},
|
||||||
)?;
|
)?;
|
||||||
println!("Signature: {}", signature);
|
println!("Signature: {}", signature);
|
||||||
|
|
|
@ -16,11 +16,11 @@ no-entrypoint = ["solitaire/no-entrypoint"]
|
||||||
trace = ["solitaire/trace"]
|
trace = ["solitaire/trace"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
borsh = "=0.9.1"
|
borsh = "=0.9.3"
|
||||||
byteorder = "1.4.3"
|
byteorder = "1.4.3"
|
||||||
primitive-types = { version = "0.9.0", default-features = false }
|
primitive-types = { version = "0.9.0", default-features = false }
|
||||||
sha3 = "0.9.1"
|
sha3 = "0.9.1"
|
||||||
solana-program = "=1.9.4"
|
solana-program = "=1.10.31"
|
||||||
wormhole-bridge-solana = { path = "../program", features = ["no-entrypoint"] }
|
wormhole-bridge-solana = { path = "../program", features = ["no-entrypoint"] }
|
||||||
solitaire = { path = "../../solitaire/program" }
|
solitaire = { path = "../../solitaire/program" }
|
||||||
|
|
||||||
|
@ -29,5 +29,5 @@ hex = "*"
|
||||||
rand = "0.7.3"
|
rand = "0.7.3"
|
||||||
hex-literal = "0.3.1"
|
hex-literal = "0.3.1"
|
||||||
libsecp256k1 = { version = "0.6.0", features = [] }
|
libsecp256k1 = { version = "0.6.0", features = [] }
|
||||||
solana-client = "=1.9.4"
|
solana-client = "=1.10.31"
|
||||||
solana-sdk = "=1.9.4"
|
solana-sdk = "=1.10.31"
|
||||||
|
|
|
@ -18,19 +18,20 @@ trace = ["solitaire/trace"]
|
||||||
instructions = []
|
instructions = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
borsh = "=0.9.1"
|
borsh = "=0.9.3"
|
||||||
byteorder = "1.4.3"
|
byteorder = "1.4.3"
|
||||||
primitive-types = { version = "0.9.0", default-features = false }
|
primitive-types = { version = "0.9.0", default-features = false }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
sha3 = "0.9.1"
|
sha3 = "0.9.1"
|
||||||
solana-program = "=1.9.4"
|
solana-program = "=1.10.31"
|
||||||
solitaire = { path = "../../solitaire/program" }
|
solitaire = { path = "../../solitaire/program" }
|
||||||
wasm-bindgen = { version = "0.2.74", features = ["serde-serialize"], optional = true }
|
wasm-bindgen = { version = "0.2.74", features = ["serde-serialize"], optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
hex = "*"
|
hex = "*"
|
||||||
rand = "0.7.3"
|
rand = "0.7.3"
|
||||||
|
getrandom = {version = "0.2.6", features = ["custom"]}
|
||||||
hex-literal = "0.3.1"
|
hex-literal = "0.3.1"
|
||||||
libsecp256k1 = { version = "0.6.0", features = [] }
|
libsecp256k1 = { version = "0.6.0", features = [] }
|
||||||
solana-program-test = "=1.9.4"
|
solana-program-test = "=1.10.31"
|
||||||
solana-sdk = "=1.9.4"
|
solana-sdk = "=1.10.31"
|
||||||
|
|
|
@ -17,6 +17,7 @@ use solana_program::{
|
||||||
use solana_program_test::{
|
use solana_program_test::{
|
||||||
BanksClient,
|
BanksClient,
|
||||||
ProgramTest,
|
ProgramTest,
|
||||||
|
BanksClientError,
|
||||||
};
|
};
|
||||||
use solana_sdk::{
|
use solana_sdk::{
|
||||||
commitment_config::CommitmentLevel,
|
commitment_config::CommitmentLevel,
|
||||||
|
@ -27,7 +28,6 @@ use solana_sdk::{
|
||||||
},
|
},
|
||||||
signers::Signers,
|
signers::Signers,
|
||||||
transaction::Transaction,
|
transaction::Transaction,
|
||||||
transport::TransportError,
|
|
||||||
};
|
};
|
||||||
use std::{
|
use std::{
|
||||||
env,
|
env,
|
||||||
|
@ -58,7 +58,7 @@ pub async fn execute<T: Signers>(
|
||||||
signers: &T,
|
signers: &T,
|
||||||
instructions: &[Instruction],
|
instructions: &[Instruction],
|
||||||
commitment_level: CommitmentLevel,
|
commitment_level: CommitmentLevel,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let mut transaction = Transaction::new_with_payer(instructions, Some(&payer.pubkey()));
|
let mut transaction = Transaction::new_with_payer(instructions, Some(&payer.pubkey()));
|
||||||
let recent_blockhash = client.get_latest_blockhash().await?;
|
let recent_blockhash = client.get_latest_blockhash().await?;
|
||||||
transaction.sign(signers, recent_blockhash);
|
transaction.sign(signers, recent_blockhash);
|
||||||
|
@ -208,7 +208,7 @@ mod helpers {
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
initial_guardians: &[[u8; 20]],
|
initial_guardians: &[[u8; 20]],
|
||||||
fee: u64,
|
fee: u64,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
execute(
|
execute(
|
||||||
client,
|
client,
|
||||||
payer,
|
payer,
|
||||||
|
@ -236,7 +236,7 @@ mod helpers {
|
||||||
nonce: u32,
|
nonce: u32,
|
||||||
data: Vec<u8>,
|
data: Vec<u8>,
|
||||||
fee: u64,
|
fee: u64,
|
||||||
) -> Result<Pubkey, TransportError> {
|
) -> Result<Pubkey, BanksClientError> {
|
||||||
// Transfer money into the fee collector as it needs a balance/must exist.
|
// Transfer money into the fee collector as it needs a balance/must exist.
|
||||||
let fee_collector = FeeCollector::<'_>::key(None, program);
|
let fee_collector = FeeCollector::<'_>::key(None, program);
|
||||||
|
|
||||||
|
@ -283,7 +283,7 @@ mod helpers {
|
||||||
nonce: u32,
|
nonce: u32,
|
||||||
data: Vec<u8>,
|
data: Vec<u8>,
|
||||||
fee: u64,
|
fee: u64,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
// Transfer money into the fee collector as it needs a balance/must exist.
|
// Transfer money into the fee collector as it needs a balance/must exist.
|
||||||
let fee_collector = FeeCollector::<'_>::key(None, program);
|
let fee_collector = FeeCollector::<'_>::key(None, program);
|
||||||
|
|
||||||
|
@ -319,7 +319,7 @@ mod helpers {
|
||||||
body: [u8; 32],
|
body: [u8; 32],
|
||||||
secret_keys: &[SecretKey],
|
secret_keys: &[SecretKey],
|
||||||
guardian_set_version: u32,
|
guardian_set_version: u32,
|
||||||
) -> Result<Pubkey, TransportError> {
|
) -> Result<Pubkey, BanksClientError> {
|
||||||
let signature_set = Keypair::new();
|
let signature_set = Keypair::new();
|
||||||
let tx_signers = [payer, &signature_set];
|
let tx_signers = [payer, &signature_set];
|
||||||
// Push Secp256k1 instructions for each signature we want to verify.
|
// Push Secp256k1 instructions for each signature we want to verify.
|
||||||
|
@ -357,7 +357,7 @@ mod helpers {
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
signature_set: Pubkey,
|
signature_set: Pubkey,
|
||||||
vaa: PostVAAData,
|
vaa: PostVAAData,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
execute(
|
execute(
|
||||||
client,
|
client,
|
||||||
payer,
|
payer,
|
||||||
|
@ -383,7 +383,7 @@ mod helpers {
|
||||||
old_index: u32,
|
old_index: u32,
|
||||||
new_index: u32,
|
new_index: u32,
|
||||||
sequence: u64,
|
sequence: u64,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
execute(
|
execute(
|
||||||
client,
|
client,
|
||||||
payer,
|
payer,
|
||||||
|
@ -412,7 +412,7 @@ mod helpers {
|
||||||
new_contract: Pubkey,
|
new_contract: Pubkey,
|
||||||
spill: Pubkey,
|
spill: Pubkey,
|
||||||
sequence: u64,
|
sequence: u64,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
execute(
|
execute(
|
||||||
client,
|
client,
|
||||||
payer,
|
payer,
|
||||||
|
@ -438,7 +438,7 @@ mod helpers {
|
||||||
message: Pubkey,
|
message: Pubkey,
|
||||||
emitter: Pubkey,
|
emitter: Pubkey,
|
||||||
sequence: u64,
|
sequence: u64,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
execute(
|
execute(
|
||||||
client,
|
client,
|
||||||
payer,
|
payer,
|
||||||
|
@ -463,7 +463,7 @@ mod helpers {
|
||||||
emitter: Pubkey,
|
emitter: Pubkey,
|
||||||
recipient: Pubkey,
|
recipient: Pubkey,
|
||||||
sequence: u64,
|
sequence: u64,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
execute(
|
execute(
|
||||||
client,
|
client,
|
||||||
payer,
|
payer,
|
||||||
|
|
|
@ -16,11 +16,11 @@ no-entrypoint = ["solitaire/no-entrypoint"]
|
||||||
trace = ["solitaire/trace"]
|
trace = ["solitaire/trace"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
borsh = "=0.9.1"
|
borsh = "=0.9.3"
|
||||||
byteorder = "1.4.3"
|
byteorder = "1.4.3"
|
||||||
primitive-types = { version = "0.9.0", default-features = false }
|
primitive-types = { version = "0.9.0", default-features = false }
|
||||||
sha3 = "0.9.1"
|
sha3 = "0.9.1"
|
||||||
solana-program = "=1.9.4"
|
solana-program = "=1.10.31"
|
||||||
solitaire = { path = "../../solitaire/program" }
|
solitaire = { path = "../../solitaire/program" }
|
||||||
wormhole-bridge-solana = { path = "../program", features = ["no-entrypoint"] }
|
wormhole-bridge-solana = { path = "../program", features = ["no-entrypoint"] }
|
||||||
|
|
||||||
|
@ -29,5 +29,5 @@ hex = "*"
|
||||||
rand = "0.7.3"
|
rand = "0.7.3"
|
||||||
hex-literal = "0.3.1"
|
hex-literal = "0.3.1"
|
||||||
libsecp256k1 = { version = "0.6.0", features = [] }
|
libsecp256k1 = { version = "0.6.0", features = [] }
|
||||||
solana-client = "=1.9.4"
|
solana-client = "=1.10.31"
|
||||||
solana-sdk = "=1.9.4"
|
solana-sdk = "=1.10.31"
|
||||||
|
|
|
@ -17,13 +17,13 @@ cpi = ["no-entrypoint"]
|
||||||
default = []
|
default = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
borsh = "=0.9.1"
|
borsh = "=0.9.3"
|
||||||
byteorder = "1.4.3"
|
byteorder = "1.4.3"
|
||||||
rocksalt = { path = "../solitaire/rocksalt" }
|
rocksalt = { path = "../solitaire/rocksalt" }
|
||||||
solitaire = { path = "../solitaire/program" }
|
solitaire = { path = "../solitaire/program" }
|
||||||
sha3 = "0.9.1"
|
sha3 = "0.9.1"
|
||||||
solana-program = "*"
|
solana-program = "*"
|
||||||
spl-token = { version = "=3.2.0", features = ["no-entrypoint"] }
|
spl-token = { version = "=3.3.0", features = ["no-entrypoint"] }
|
||||||
wasm-bindgen = { version = "0.2.74", features = ["serde-serialize"], optional = true }
|
wasm-bindgen = { version = "0.2.74", features = ["serde-serialize"], optional = true }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
rand = { version = "0.7.3", optional = true }
|
rand = { version = "0.7.3", optional = true }
|
||||||
|
@ -32,6 +32,6 @@ rand = { version = "0.7.3", optional = true }
|
||||||
hex = "*"
|
hex = "*"
|
||||||
hex-literal = "0.3.1"
|
hex-literal = "0.3.1"
|
||||||
libsecp256k1 = { version = "0.6.0", features = [] }
|
libsecp256k1 = { version = "0.6.0", features = [] }
|
||||||
solana-client = "=1.9.4"
|
solana-client = "=1.10.31"
|
||||||
solana-sdk = "=1.9.4"
|
solana-sdk = "=1.10.31"
|
||||||
spl-token = { version = "=3.2.0", features = ["no-entrypoint"] }
|
spl-token = { version = "=3.3.0", features = ["no-entrypoint"] }
|
||||||
|
|
|
@ -19,14 +19,14 @@ default = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
wormhole-bridge-solana = { path = "../../../bridge/program", features = ["no-entrypoint", "cpi"] }
|
wormhole-bridge-solana = { path = "../../../bridge/program", features = ["no-entrypoint", "cpi"] }
|
||||||
borsh = "=0.9.1"
|
borsh = "=0.9.3"
|
||||||
bstr = "0.2.16"
|
bstr = "0.2.16"
|
||||||
byteorder = "1.4.3"
|
byteorder = "1.4.3"
|
||||||
rocksalt = { path = "../../../solitaire/rocksalt" }
|
rocksalt = { path = "../../../solitaire/rocksalt" }
|
||||||
solitaire = { path = "../../../solitaire/program" }
|
solitaire = { path = "../../../solitaire/program" }
|
||||||
sha3 = "0.9.1"
|
sha3 = "0.9.1"
|
||||||
solana-program = "*"
|
solana-program = "*"
|
||||||
spl-token = { version = "=3.2.0", features = ["no-entrypoint"] }
|
spl-token = { version = "=3.3.0", features = ["no-entrypoint"] }
|
||||||
spl-associated-token-account = { version = "1.0.2", features = ["no-entrypoint"] }
|
spl-associated-token-account = { version = "1.0.2", features = ["no-entrypoint"] }
|
||||||
primitive-types = { version = "0.9.0", default-features = false }
|
primitive-types = { version = "0.9.0", default-features = false }
|
||||||
spl-token-metadata = { path = "../../token_bridge/token-metadata" }
|
spl-token-metadata = { path = "../../token_bridge/token-metadata" }
|
||||||
|
@ -39,7 +39,7 @@ hex = "*"
|
||||||
hex-literal = "0.3.1"
|
hex-literal = "0.3.1"
|
||||||
libsecp256k1 = { version = "0.6.0", features = [] }
|
libsecp256k1 = { version = "0.6.0", features = [] }
|
||||||
rand = "0.7.3"
|
rand = "0.7.3"
|
||||||
solana-program-test = "=1.9.4"
|
solana-program-test = "=1.10.31"
|
||||||
solana-sdk = "=1.9.4"
|
solana-sdk = "=1.10.31"
|
||||||
spl-token = { version = "=3.2.0", features = ["no-entrypoint"] }
|
spl-token = { version = "=3.3.0", features = ["no-entrypoint"] }
|
||||||
spl-token-metadata = { path = "../../token_bridge/token-metadata" }
|
spl-token-metadata = { path = "../../token_bridge/token-metadata" }
|
||||||
|
|
|
@ -18,6 +18,7 @@ use solana_program::{
|
||||||
};
|
};
|
||||||
use solana_program_test::{
|
use solana_program_test::{
|
||||||
BanksClient,
|
BanksClient,
|
||||||
|
BanksClientError,
|
||||||
ProgramTest,
|
ProgramTest,
|
||||||
};
|
};
|
||||||
use solana_sdk::{
|
use solana_sdk::{
|
||||||
|
@ -30,7 +31,6 @@ use solana_sdk::{
|
||||||
},
|
},
|
||||||
signers::Signers,
|
signers::Signers,
|
||||||
transaction::Transaction,
|
transaction::Transaction,
|
||||||
transport::TransportError,
|
|
||||||
};
|
};
|
||||||
use solitaire::processors::seeded::Seeded;
|
use solitaire::processors::seeded::Seeded;
|
||||||
use std::{
|
use std::{
|
||||||
|
@ -56,7 +56,7 @@ pub async fn execute<T: Signers>(
|
||||||
signers: &T,
|
signers: &T,
|
||||||
instructions: &[Instruction],
|
instructions: &[Instruction],
|
||||||
commitment_level: CommitmentLevel,
|
commitment_level: CommitmentLevel,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let mut transaction = Transaction::new_with_payer(instructions, Some(&payer.pubkey()));
|
let mut transaction = Transaction::new_with_payer(instructions, Some(&payer.pubkey()));
|
||||||
let recent_blockhash = client.get_latest_blockhash().await?;
|
let recent_blockhash = client.get_latest_blockhash().await?;
|
||||||
transaction.sign(signers, recent_blockhash);
|
transaction.sign(signers, recent_blockhash);
|
||||||
|
@ -163,7 +163,7 @@ mod helpers {
|
||||||
program: Pubkey,
|
program: Pubkey,
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
initial_guardians: &[[u8; 20]],
|
initial_guardians: &[[u8; 20]],
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
execute(
|
execute(
|
||||||
client,
|
client,
|
||||||
payer,
|
payer,
|
||||||
|
@ -186,7 +186,7 @@ mod helpers {
|
||||||
program: Pubkey,
|
program: Pubkey,
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
bridge: Pubkey,
|
bridge: Pubkey,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let instruction = instructions::initialize(program, payer.pubkey(), bridge)
|
let instruction = instructions::initialize(program, payer.pubkey(), bridge)
|
||||||
.expect("Could not create Initialize instruction");
|
.expect("Could not create Initialize instruction");
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ mod helpers {
|
||||||
from: &Keypair,
|
from: &Keypair,
|
||||||
from_owner: &Keypair,
|
from_owner: &Keypair,
|
||||||
mint: Pubkey,
|
mint: Pubkey,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let instruction = instructions::transfer_native(
|
let instruction = instructions::transfer_native(
|
||||||
program,
|
program,
|
||||||
bridge,
|
bridge,
|
||||||
|
@ -259,7 +259,7 @@ mod helpers {
|
||||||
token_chain: u16,
|
token_chain: u16,
|
||||||
token_address: Address,
|
token_address: Address,
|
||||||
token_id: U256,
|
token_id: U256,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let instruction = instructions::transfer_wrapped(
|
let instruction = instructions::transfer_wrapped(
|
||||||
program,
|
program,
|
||||||
bridge,
|
bridge,
|
||||||
|
@ -307,7 +307,7 @@ mod helpers {
|
||||||
vaa: PostVAAData,
|
vaa: PostVAAData,
|
||||||
payload: PayloadGovernanceRegisterChain,
|
payload: PayloadGovernanceRegisterChain,
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let instruction = instructions::register_chain(
|
let instruction = instructions::register_chain(
|
||||||
program,
|
program,
|
||||||
bridge,
|
bridge,
|
||||||
|
@ -340,7 +340,7 @@ mod helpers {
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
to_authority: Pubkey,
|
to_authority: Pubkey,
|
||||||
mint: Pubkey,
|
mint: Pubkey,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let instruction = instructions::complete_native(
|
let instruction = instructions::complete_native(
|
||||||
program,
|
program,
|
||||||
bridge,
|
bridge,
|
||||||
|
@ -373,7 +373,7 @@ mod helpers {
|
||||||
payload: PayloadTransfer,
|
payload: PayloadTransfer,
|
||||||
to: Pubkey,
|
to: Pubkey,
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let instruction = instructions::complete_wrapped(
|
let instruction = instructions::complete_wrapped(
|
||||||
program,
|
program,
|
||||||
bridge,
|
bridge,
|
||||||
|
@ -404,7 +404,7 @@ mod helpers {
|
||||||
vaa: PostVAAData,
|
vaa: PostVAAData,
|
||||||
payload: PayloadTransfer,
|
payload: PayloadTransfer,
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let instruction = instructions::complete_wrapped_meta(
|
let instruction = instructions::complete_wrapped_meta(
|
||||||
program,
|
program,
|
||||||
bridge,
|
bridge,
|
||||||
|
@ -431,7 +431,7 @@ mod helpers {
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
mint_authority: &Pubkey,
|
mint_authority: &Pubkey,
|
||||||
mint: &Keypair,
|
mint: &Keypair,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let mint_key = mint.pubkey();
|
let mint_key = mint.pubkey();
|
||||||
execute(
|
execute(
|
||||||
client,
|
client,
|
||||||
|
@ -465,7 +465,7 @@ mod helpers {
|
||||||
token_acc: &Keypair,
|
token_acc: &Keypair,
|
||||||
token_authority: &Pubkey,
|
token_authority: &Pubkey,
|
||||||
mint: &Pubkey,
|
mint: &Pubkey,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let token_key = token_acc.pubkey();
|
let token_key = token_acc.pubkey();
|
||||||
execute(
|
execute(
|
||||||
client,
|
client,
|
||||||
|
@ -503,7 +503,7 @@ mod helpers {
|
||||||
name: String,
|
name: String,
|
||||||
symbol: String,
|
symbol: String,
|
||||||
uri: String,
|
uri: String,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
execute(
|
execute(
|
||||||
client,
|
client,
|
||||||
payer,
|
payer,
|
||||||
|
@ -535,7 +535,7 @@ mod helpers {
|
||||||
mint: &Keypair,
|
mint: &Keypair,
|
||||||
token_account: &Pubkey,
|
token_account: &Pubkey,
|
||||||
amount: u64,
|
amount: u64,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
execute(
|
execute(
|
||||||
client,
|
client,
|
||||||
payer,
|
payer,
|
||||||
|
@ -616,7 +616,7 @@ mod helpers {
|
||||||
body: [u8; 32],
|
body: [u8; 32],
|
||||||
secret_keys: &[SecretKey],
|
secret_keys: &[SecretKey],
|
||||||
guardian_set_version: u32,
|
guardian_set_version: u32,
|
||||||
) -> Result<Pubkey, TransportError> {
|
) -> Result<Pubkey, BanksClientError> {
|
||||||
let signature_set = Keypair::new();
|
let signature_set = Keypair::new();
|
||||||
let tx_signers = [payer, &signature_set];
|
let tx_signers = [payer, &signature_set];
|
||||||
// Push Secp256k1 instructions for each signature we want to verify.
|
// Push Secp256k1 instructions for each signature we want to verify.
|
||||||
|
@ -654,7 +654,7 @@ mod helpers {
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
signature_set: Pubkey,
|
signature_set: Pubkey,
|
||||||
vaa: PostVAAData,
|
vaa: PostVAAData,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let instruction =
|
let instruction =
|
||||||
bridge::instructions::post_vaa(program, payer.pubkey(), signature_set, vaa);
|
bridge::instructions::post_vaa(program, payer.pubkey(), signature_set, vaa);
|
||||||
|
|
||||||
|
@ -680,7 +680,7 @@ mod helpers {
|
||||||
nonce: u32,
|
nonce: u32,
|
||||||
data: Vec<u8>,
|
data: Vec<u8>,
|
||||||
fee: u64,
|
fee: u64,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
// Transfer money into the fee collector as it needs a balance/must exist.
|
// Transfer money into the fee collector as it needs a balance/must exist.
|
||||||
let fee_collector = FeeCollector::<'_>::key(None, &program);
|
let fee_collector = FeeCollector::<'_>::key(None, &program);
|
||||||
|
|
||||||
|
|
|
@ -5,16 +5,16 @@ edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.40"
|
anyhow = "1.0.40"
|
||||||
borsh = "=0.9.1"
|
borsh = "=0.9.3"
|
||||||
token-bridge = { path = "../program", features = ["client"] }
|
token-bridge = { path = "../program", features = ["client"] }
|
||||||
clap = "2.33.0"
|
clap = "2.33.0"
|
||||||
rand = "0.7.3"
|
rand = "0.7.3"
|
||||||
shellexpand = "2.1.0"
|
shellexpand = "2.1.0"
|
||||||
solana-client = "=1.9.4"
|
solana-client = "=1.10.31"
|
||||||
solana-program = "=1.9.4"
|
solana-program = "=1.10.31"
|
||||||
solana-sdk = "=1.9.4"
|
solana-sdk = "=1.10.31"
|
||||||
solana-cli-config = "=1.9.4"
|
solana-cli-config = "=1.10.31"
|
||||||
solitaire = { path = "../../../solitaire/program" }
|
solitaire = { path = "../../../solitaire/program" }
|
||||||
solana-clap-utils = "=1.9.4"
|
solana-clap-utils = "=1.10.31"
|
||||||
hex = "0.4.3"
|
hex = "0.4.3"
|
||||||
spl-token-metadata = { path = "../token-metadata" }
|
spl-token-metadata = { path = "../token-metadata" }
|
||||||
|
|
|
@ -363,6 +363,7 @@ fn main() {
|
||||||
preflight_commitment: None,
|
preflight_commitment: None,
|
||||||
encoding: None,
|
encoding: None,
|
||||||
max_retries: None,
|
max_retries: None,
|
||||||
|
min_context_slot: None,
|
||||||
},
|
},
|
||||||
)?;
|
)?;
|
||||||
println!("Signature: {}", signature);
|
println!("Signature: {}", signature);
|
||||||
|
|
|
@ -19,14 +19,14 @@ instructions = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
wormhole-bridge-solana = { path = "../../../bridge/program", features = ["no-entrypoint", "cpi"] }
|
wormhole-bridge-solana = { path = "../../../bridge/program", features = ["no-entrypoint", "cpi"] }
|
||||||
borsh = "=0.9.1"
|
borsh = "=0.9.3"
|
||||||
bstr = "0.2.16"
|
bstr = "0.2.16"
|
||||||
byteorder = "1.4.3"
|
byteorder = "1.4.3"
|
||||||
rocksalt = { path = "../../../solitaire/rocksalt" }
|
rocksalt = { path = "../../../solitaire/rocksalt" }
|
||||||
solitaire = { path = "../../../solitaire/program" }
|
solitaire = { path = "../../../solitaire/program" }
|
||||||
sha3 = "0.9.1"
|
sha3 = "0.9.1"
|
||||||
solana-program = "*"
|
solana-program = "*"
|
||||||
spl-token = { version = "=3.2.0", features = ["no-entrypoint"] }
|
spl-token = { version = "=3.3.0", features = ["no-entrypoint"] }
|
||||||
primitive-types = { version = "0.9.0", default-features = false }
|
primitive-types = { version = "0.9.0", default-features = false }
|
||||||
spl-token-metadata = { path = "../token-metadata" }
|
spl-token-metadata = { path = "../token-metadata" }
|
||||||
wasm-bindgen = { version = "0.2.74", features = ["serde-serialize"], optional = true }
|
wasm-bindgen = { version = "0.2.74", features = ["serde-serialize"], optional = true }
|
||||||
|
@ -38,7 +38,7 @@ hex = "*"
|
||||||
hex-literal = "0.3.1"
|
hex-literal = "0.3.1"
|
||||||
libsecp256k1 = { version = "0.6.0", features = [] }
|
libsecp256k1 = { version = "0.6.0", features = [] }
|
||||||
rand = "0.7.3"
|
rand = "0.7.3"
|
||||||
solana-program-test = "=1.9.4"
|
solana-program-test = "=1.10.31"
|
||||||
solana-sdk = "=1.9.4"
|
solana-sdk = "=1.10.31"
|
||||||
spl-token = { version = "=3.2.0", features = ["no-entrypoint"] }
|
spl-token = { version = "=3.3.0", features = ["no-entrypoint"] }
|
||||||
spl-token-metadata = { path = "../token-metadata" }
|
spl-token-metadata = { path = "../token-metadata" }
|
||||||
|
|
|
@ -21,6 +21,7 @@ use solana_program::{
|
||||||
use solana_program_test::{
|
use solana_program_test::{
|
||||||
BanksClient,
|
BanksClient,
|
||||||
ProgramTest,
|
ProgramTest,
|
||||||
|
BanksClientError,
|
||||||
};
|
};
|
||||||
use solana_sdk::{
|
use solana_sdk::{
|
||||||
commitment_config::CommitmentLevel,
|
commitment_config::CommitmentLevel,
|
||||||
|
@ -32,7 +33,6 @@ use solana_sdk::{
|
||||||
},
|
},
|
||||||
signers::Signers,
|
signers::Signers,
|
||||||
transaction::Transaction,
|
transaction::Transaction,
|
||||||
transport::TransportError,
|
|
||||||
};
|
};
|
||||||
use std::{
|
use std::{
|
||||||
env,
|
env,
|
||||||
|
@ -61,7 +61,7 @@ pub async fn execute<T: Signers>(
|
||||||
signers: &T,
|
signers: &T,
|
||||||
instructions: &[Instruction],
|
instructions: &[Instruction],
|
||||||
commitment_level: CommitmentLevel,
|
commitment_level: CommitmentLevel,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let mut transaction = Transaction::new_with_payer(instructions, Some(&payer.pubkey()));
|
let mut transaction = Transaction::new_with_payer(instructions, Some(&payer.pubkey()));
|
||||||
let recent_blockhash = client.get_latest_blockhash().await?;
|
let recent_blockhash = client.get_latest_blockhash().await?;
|
||||||
transaction.sign(signers, recent_blockhash);
|
transaction.sign(signers, recent_blockhash);
|
||||||
|
@ -199,7 +199,7 @@ mod helpers {
|
||||||
program: Pubkey,
|
program: Pubkey,
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
initial_guardians: &[[u8; 20]],
|
initial_guardians: &[[u8; 20]],
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
execute(
|
execute(
|
||||||
client,
|
client,
|
||||||
payer,
|
payer,
|
||||||
|
@ -223,7 +223,7 @@ mod helpers {
|
||||||
from: &Keypair,
|
from: &Keypair,
|
||||||
to: &Pubkey,
|
to: &Pubkey,
|
||||||
lamports: u64,
|
lamports: u64,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
execute(
|
execute(
|
||||||
client,
|
client,
|
||||||
from,
|
from,
|
||||||
|
@ -239,7 +239,7 @@ mod helpers {
|
||||||
program: Pubkey,
|
program: Pubkey,
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
bridge: Pubkey,
|
bridge: Pubkey,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let instruction = instructions::initialize(program, payer.pubkey(), bridge)
|
let instruction = instructions::initialize(program, payer.pubkey(), bridge)
|
||||||
.expect("Could not create Initialize instruction");
|
.expect("Could not create Initialize instruction");
|
||||||
|
|
||||||
|
@ -265,7 +265,7 @@ mod helpers {
|
||||||
message: &Keypair,
|
message: &Keypair,
|
||||||
mint: Pubkey,
|
mint: Pubkey,
|
||||||
nonce: u32,
|
nonce: u32,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let instruction = instructions::attest(
|
let instruction = instructions::attest(
|
||||||
program,
|
program,
|
||||||
bridge,
|
bridge,
|
||||||
|
@ -301,7 +301,7 @@ mod helpers {
|
||||||
from_owner: &Keypair,
|
from_owner: &Keypair,
|
||||||
mint: Pubkey,
|
mint: Pubkey,
|
||||||
amount: u64,
|
amount: u64,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let instruction = instructions::transfer_native(
|
let instruction = instructions::transfer_native(
|
||||||
program,
|
program,
|
||||||
bridge,
|
bridge,
|
||||||
|
@ -356,7 +356,7 @@ mod helpers {
|
||||||
token_chain: u16,
|
token_chain: u16,
|
||||||
token_address: Address,
|
token_address: Address,
|
||||||
amount: u64,
|
amount: u64,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let instruction = instructions::transfer_wrapped(
|
let instruction = instructions::transfer_wrapped(
|
||||||
program,
|
program,
|
||||||
bridge,
|
bridge,
|
||||||
|
@ -409,7 +409,7 @@ mod helpers {
|
||||||
vaa: PostVAAData,
|
vaa: PostVAAData,
|
||||||
payload: PayloadGovernanceRegisterChain,
|
payload: PayloadGovernanceRegisterChain,
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let instruction = instructions::register_chain(
|
let instruction = instructions::register_chain(
|
||||||
program,
|
program,
|
||||||
bridge,
|
bridge,
|
||||||
|
@ -443,7 +443,7 @@ mod helpers {
|
||||||
vaa: PostVAAData,
|
vaa: PostVAAData,
|
||||||
payload: PayloadTransfer,
|
payload: PayloadTransfer,
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let instruction = instructions::complete_native(
|
let instruction = instructions::complete_native(
|
||||||
program,
|
program,
|
||||||
bridge,
|
bridge,
|
||||||
|
@ -479,7 +479,7 @@ mod helpers {
|
||||||
vaa: PostVAAData,
|
vaa: PostVAAData,
|
||||||
payload: PayloadTransfer,
|
payload: PayloadTransfer,
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let to = Pubkey::new(&payload.to[..]);
|
let to = Pubkey::new(&payload.to[..]);
|
||||||
|
|
||||||
let instruction = instructions::complete_wrapped(
|
let instruction = instructions::complete_wrapped(
|
||||||
|
@ -519,7 +519,7 @@ mod helpers {
|
||||||
to: Pubkey,
|
to: Pubkey,
|
||||||
redeemer: &Keypair,
|
redeemer: &Keypair,
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let instruction = instructions::complete_native_with_payload(
|
let instruction = instructions::complete_native_with_payload(
|
||||||
program,
|
program,
|
||||||
bridge,
|
bridge,
|
||||||
|
@ -556,7 +556,7 @@ mod helpers {
|
||||||
vaa: PostVAAData,
|
vaa: PostVAAData,
|
||||||
payload: PayloadAssetMeta,
|
payload: PayloadAssetMeta,
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let instruction = instructions::create_wrapped(
|
let instruction = instructions::create_wrapped(
|
||||||
program,
|
program,
|
||||||
bridge,
|
bridge,
|
||||||
|
@ -587,7 +587,7 @@ mod helpers {
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
mint_authority: &Pubkey,
|
mint_authority: &Pubkey,
|
||||||
mint: &Keypair,
|
mint: &Keypair,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let mint_key = mint.pubkey();
|
let mint_key = mint.pubkey();
|
||||||
execute(
|
execute(
|
||||||
client,
|
client,
|
||||||
|
@ -625,7 +625,7 @@ mod helpers {
|
||||||
update_authority: Pubkey,
|
update_authority: Pubkey,
|
||||||
name: String,
|
name: String,
|
||||||
symbol: String,
|
symbol: String,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
execute(
|
execute(
|
||||||
client,
|
client,
|
||||||
payer,
|
payer,
|
||||||
|
@ -656,7 +656,7 @@ mod helpers {
|
||||||
token_acc: &Keypair,
|
token_acc: &Keypair,
|
||||||
token_authority: &Pubkey,
|
token_authority: &Pubkey,
|
||||||
mint: &Pubkey,
|
mint: &Pubkey,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let token_key = token_acc.pubkey();
|
let token_key = token_acc.pubkey();
|
||||||
execute(
|
execute(
|
||||||
client,
|
client,
|
||||||
|
@ -690,7 +690,7 @@ mod helpers {
|
||||||
mint: &Keypair,
|
mint: &Keypair,
|
||||||
token_account: &Pubkey,
|
token_account: &Pubkey,
|
||||||
amount: u64,
|
amount: u64,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
execute(
|
execute(
|
||||||
client,
|
client,
|
||||||
payer,
|
payer,
|
||||||
|
@ -771,7 +771,7 @@ mod helpers {
|
||||||
body: [u8; 32],
|
body: [u8; 32],
|
||||||
secret_keys: &[SecretKey],
|
secret_keys: &[SecretKey],
|
||||||
guardian_set_version: u32,
|
guardian_set_version: u32,
|
||||||
) -> Result<Pubkey, TransportError> {
|
) -> Result<Pubkey, BanksClientError> {
|
||||||
let signature_set = Keypair::new();
|
let signature_set = Keypair::new();
|
||||||
let tx_signers = [payer, &signature_set];
|
let tx_signers = [payer, &signature_set];
|
||||||
// Push Secp256k1 instructions for each signature we want to verify.
|
// Push Secp256k1 instructions for each signature we want to verify.
|
||||||
|
@ -809,7 +809,7 @@ mod helpers {
|
||||||
payer: &Keypair,
|
payer: &Keypair,
|
||||||
signature_set: Pubkey,
|
signature_set: Pubkey,
|
||||||
vaa: PostVAAData,
|
vaa: PostVAAData,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
let instruction =
|
let instruction =
|
||||||
bridge::instructions::post_vaa(program, payer.pubkey(), signature_set, vaa);
|
bridge::instructions::post_vaa(program, payer.pubkey(), signature_set, vaa);
|
||||||
|
|
||||||
|
@ -838,7 +838,7 @@ mod helpers {
|
||||||
nonce: u32,
|
nonce: u32,
|
||||||
data: Vec<u8>,
|
data: Vec<u8>,
|
||||||
fee: u64,
|
fee: u64,
|
||||||
) -> Result<(), TransportError> {
|
) -> Result<(), BanksClientError> {
|
||||||
// Transfer money into the fee collector as it needs a balance/must exist.
|
// Transfer money into the fee collector as it needs a balance/must exist.
|
||||||
let fee_collector = FeeCollector::<'_>::key(None, &program);
|
let fee_collector = FeeCollector::<'_>::key(None, &program);
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,6 @@ no-entrypoint = []
|
||||||
test-bpf = []
|
test-bpf = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
borsh = "=0.9.1"
|
borsh = "=0.9.3"
|
||||||
solana-program = "=1.9.4"
|
solana-program = "=1.10.31"
|
||||||
spl-token = { version = "=3.2.0", features = ["no-entrypoint"] }
|
spl-token = { version = "=3.3.0", features = ["no-entrypoint"] }
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# This version should be kept up to date with the value in ci/rust-version.sh in
|
# This version should be kept up to date with the value in ci/rust-version.sh in
|
||||||
# the branch of the solana repo that corresponds with the version we're using.
|
# the branch of the solana repo that corresponds with the version we're using.
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2021-12-03"
|
channel = "nightly-2022-02-24"
|
||||||
profile = "minimal"
|
profile = "minimal"
|
||||||
|
|
|
@ -16,9 +16,9 @@ no-entrypoint = []
|
||||||
trace = []
|
trace = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
borsh = "=0.9.1"
|
borsh = "=0.9.3"
|
||||||
byteorder = "1.4.3"
|
byteorder = "1.4.3"
|
||||||
rocksalt = { path = "../../solitaire/rocksalt" }
|
rocksalt = { path = "../../solitaire/rocksalt" }
|
||||||
|
|
||||||
sha3 = "0.9.1"
|
sha3 = "0.9.1"
|
||||||
solana-program = "=1.9.4"
|
solana-program = "=1.10.31"
|
||||||
|
|
|
@ -17,5 +17,5 @@ byteorder = "1.4.3"
|
||||||
proc-macro2 = "1.0"
|
proc-macro2 = "1.0"
|
||||||
quote = "1.0"
|
quote = "1.0"
|
||||||
sha3 = "0.9.1"
|
sha3 = "0.9.1"
|
||||||
solana-program = "=1.9.4"
|
solana-program = "=1.10.31"
|
||||||
syn = "1.0"
|
syn = "1.0"
|
||||||
|
|
Loading…
Reference in New Issue