Skip to content

Commit 7eeab51

Browse files
gallynautCopybaragallynaut
authored
chore: pull monorepo changes (#131)
* Project import generated by Copybara. GitOrigin-RevId: 968ada589196194c2f24c4761a5d106b4eb18e03 * chore: manual import cleanup * chore: Update pnpm lockfile --------- Co-authored-by: Copybara <[email protected]> Co-authored-by: gallynaut <[email protected]>
1 parent a99fe5a commit 7eeab51

File tree

88 files changed

+716
-445
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+716
-445
lines changed

examples/functions/01_basic_oracle/Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/functions/01_basic_oracle/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ cpi = ["no-entrypoint"]
1919
default = []
2020

2121
[dependencies]
22-
switchboard-solana = { version = "=0.28.15", features = [ ] }
23-
# switchboard-solana = { version = "0.28.4", path = "../../../rust/switchboard-solana" }
22+
switchboard-solana = { version = "0.28.19", features = [] }
23+
# switchboard-solana = { version = "0.28.19", path = "../../../rust/switchboard-solana" }
2424
bytemuck = "^1"

examples/functions/01_basic_oracle/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@coral-xyz/anchor": "^0.28.0",
1616
"@solana/spl-token": "^0.3.6",
1717
"@solana/web3.js": "^1.78.0",
18-
"@switchboard-xyz/solana.js": "workspace:*"
18+
"@switchboard-xyz/solana.js": "workspace:^"
1919
},
2020
"devDependencies": {
2121
"@types/bn.js": "^5.1.0",
File renamed without changes.
File renamed without changes.

examples/functions/01_basic_oracle/sgx-function/Cargo.toml renamed to examples/functions/01_basic_oracle/switchboard-function/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ futures = "0.3"
1616
serde = "^1"
1717
serde_json = "^1"
1818
switchboard-utils = "0.8.0"
19-
switchboard-solana = { version = "=0.28.15", features = [ "client" ] }
20-
# switchboard-solana = { version = "0.28.4", path = "../../../../rust/switchboard-solana" }
19+
switchboard-solana = { version = "0.28.19" }
20+
# switchboard-solana = { version = "0.28.19", path = "../../../../rust/switchboard-solana" }
2121
# switchboard-utils = { version = "0.8.0", path = "../../../../../../rust/switchboard-utils" }

examples/functions/01_basic_oracle/sgx-function/Dockerfile renamed to examples/functions/01_basic_oracle/switchboard-function/Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
# syntax=docker/dockerfile:1.4
22
FROM switchboardlabs/sgx-function AS builder
33

4-
ARG CARGO_NAME=switchboard-function
5-
ENV CARGO_NAME=$CARGO_NAME
6-
74
WORKDIR /home/root/switchboard-function
85
COPY ./Cargo.lock ./Cargo.toml ./
96
COPY ./src ./src
107

11-
WORKDIR /home/root/switchboard-function/sgx-function
12-
COPY ./sgx-function/Cargo.lock ./sgx-function/Cargo.toml ./
13-
COPY ./sgx-function/src ./src
8+
WORKDIR /home/root/switchboard-function/switchboard-function
9+
COPY ./switchboard-function/Cargo.lock ./switchboard-function/Cargo.toml ./
10+
COPY ./switchboard-function/src ./src
1411

1512
RUN --mount=type=cache,target=/usr/local/cargo/registry,id=${TARGETPLATFORM} \
1613
--mount=type=cache,target=target,id=${TARGETPLATFORM} \
1714
cargo build --release && \
1815
cargo strip && \
19-
mv target/release/${CARGO_NAME} /sgx/app
16+
mv target/release/basic-oracle-function /sgx/app
2017

2118
FROM switchboardlabs/sgx-function
2219

examples/functions/01_basic_oracle/sgx-function/Dockerfile.dev renamed to examples/functions/01_basic_oracle/switchboard-function/Dockerfile.dev

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# syntax=docker/dockerfile:1.4
22
FROM switchboardlabs/sgx-function AS builder
33

4-
ARG CARGO_NAME=switchboard-function
5-
ENV CARGO_NAME=$CARGO_NAME
6-
74
WORKDIR /home/root/solana-sdk
85

96
COPY ./rust/switchboard-common/Cargo.toml \
@@ -18,9 +15,9 @@ COPY ./chains/solana/examples/functions/01_basic_oracle/Cargo.toml \
1815
./chains/solana/examples/functions/01_basic_oracle/Cargo.lock \
1916
./chains/solana/examples/functions/01_basic_oracle/
2017

21-
COPY ./chains/solana/examples/functions/01_basic_oracle/sgx-function/Cargo.toml \
22-
./chains/solana/examples/functions/01_basic_oracle/sgx-function/Cargo.lock \
23-
./chains/solana/examples/functions/01_basic_oracle/sgx-function/
18+
COPY ./chains/solana/examples/functions/01_basic_oracle/switchboard-function/Cargo.toml \
19+
./chains/solana/examples/functions/01_basic_oracle/switchboard-function/Cargo.lock \
20+
./chains/solana/examples/functions/01_basic_oracle/switchboard-function/
2421

2522
COPY ./rust/switchboard-common/src \
2623
./rust/switchboard-common/src/
@@ -31,15 +28,15 @@ COPY ./rust/switchboard-solana/src \
3128
COPY ./chains/solana/examples/functions/01_basic_oracle/src \
3229
./chains/solana/examples/functions/01_basic_oracle/src/
3330

34-
COPY ./chains/solana/examples/functions/01_basic_oracle/sgx-function/src \
35-
./chains/solana/examples/functions/01_basic_oracle/sgx-function/src/
31+
COPY ./chains/solana/examples/functions/01_basic_oracle/switchboard-function/src \
32+
./chains/solana/examples/functions/01_basic_oracle/switchboard-function/src/
3633

37-
WORKDIR /home/root/solana-sdk/chains/solana/examples/functions/01_basic_oracle/sgx-function
34+
WORKDIR /home/root/solana-sdk/chains/solana/examples/functions/01_basic_oracle/switchboard-function
3835

3936
RUN --mount=type=cache,target=/usr/local/cargo/registry,id=${TARGETPLATFORM} --mount=type=cache,target=target,id=${TARGETPLATFORM} \
4037
cargo build --release && \
4138
cargo strip && \
42-
mv target/release/${CARGO_NAME} /sgx/app
39+
mv target/release/basic-oracle-function /sgx/app
4340

4441
FROM switchboardlabs/sgx-function
4542

examples/functions/01_basic_oracle/sgx-function/Makefile renamed to examples/functions/01_basic_oracle/switchboard-function/Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
.PHONY: build clean publish
22

33
# Variables
4-
CARGO_NAME=basic-oracle-function
5-
DOCKER_IMAGE_NAME=${CONTAINER_NAME}
4+
DOCKER_IMAGE_NAME ?= gallynaut/basic-oracle-function
65

7-
DOCKER_BUILD_COMMAND=DOCKER_BUILDKIT=1 docker buildx build --platform linux/amd64 --build-arg CARGO_NAME=${CARGO_NAME}
6+
DOCKER_BUILD_COMMAND=docker buildx build --platform linux/amd64
87

98
# Default make task
109
all: build
1110

1211
docker_build:
13-
${DOCKER_BUILD_COMMAND} --pull -f Dockerfile -t ${DOCKER_IMAGE_NAME}:latest --load ../
12+
${DOCKER_BUILD_COMMAND} --pull -f Dockerfile -t ${DOCKER_IMAGE_NAME}:latest ../
1413

1514
docker_publish:
1615
${DOCKER_BUILD_COMMAND} --pull -f Dockerfile -t ${DOCKER_IMAGE_NAME}:latest --push ../
1716

1817
dev_docker_build:
19-
${DOCKER_BUILD_COMMAND} --pull -f Dockerfile.dev -t ${DOCKER_IMAGE_NAME}:latest --load ../../../../../../
18+
${DOCKER_BUILD_COMMAND} --pull -f Dockerfile.dev -t ${DOCKER_IMAGE_NAME}:latest ../../../../../../
2019

2120
dev_docker_publish:
2221
${DOCKER_BUILD_COMMAND} --pull -f Dockerfile.dev -t ${DOCKER_IMAGE_NAME}:latest --push ../../../../../../
File renamed without changes.

0 commit comments

Comments
 (0)