diff --git a/Tiltfile b/Tiltfile index 02065ce01..0655dcba9 100644 --- a/Tiltfile +++ b/Tiltfile @@ -2,7 +2,7 @@ load('ext://namespace', 'namespace_create', 'namespace_inject') load('ext://git_resource', 'git_checkout') git_checkout('https://github.com/wormhole-foundation/wormhole.git#main', '.wormhole/', unsafe_mode=True) -local(['sed','-i','/{chainId: vaa.ChainIDEthereum, addr: "000000000000000000000000855FA758c77D68a04990E992aA4dcdeF899F654A"},/i {chainId: vaa.ChainIDSolana, addr: "8bf0b547c96edc5c1d512ca25c5c1d1812a180438a0046e511d1fb61561d5cdf"},{chainId: vaa.ChainIDSolana, addr: "0a490691c21334ca173d9ce386e2a86774ce173f351db10d5d0cccc5c4875376"},{chainId: vaa.ChainIDEthereum, addr: "0000000000000000000000006f84742680311cef5ba42bc10a71a4708b4561d1"},{chainId: vaa.ChainIDEthereum, addr: "0000000000000000000000009ba423008e530c4d464da15f0c9652942216f019"},{chainId: vaa.ChainIDBSC, addr: "0000000000000000000000006f84742680311cef5ba42bc10a71a4708b4561d1"},{chainId: vaa.ChainIDBSC, addr: "000000000000000000000000baac7efcddde498b0b791eda92d43b20f5cd8ff6"},', '.wormhole/node/pkg/accountant/ntt_config.go']) +local(['sed','-i.bak','s/{chainId: vaa.ChainIDEthereum, addr: "000000000000000000000000855FA758c77D68a04990E992aA4dcdeF899F654A"},/{chainId: vaa.ChainIDEthereum, addr: "000000000000000000000000855FA758c77D68a04990E992aA4dcdeF899F654A"},{chainId: vaa.ChainIDSolana, addr: "8bf0b547c96edc5c1d512ca25c5c1d1812a180438a0046e511d1fb61561d5cdf"},{chainId: vaa.ChainIDSolana, addr: "0a490691c21334ca173d9ce386e2a86774ce173f351db10d5d0cccc5c4875376"},{chainId: vaa.ChainIDEthereum, addr: "0000000000000000000000006f84742680311cef5ba42bc10a71a4708b4561d1"},{chainId: vaa.ChainIDEthereum, addr: "0000000000000000000000009ba423008e530c4d464da15f0c9652942216f019"},{chainId: vaa.ChainIDBSC, addr: "0000000000000000000000006f84742680311cef5ba42bc10a71a4708b4561d1"},{chainId: vaa.ChainIDBSC, addr: "000000000000000000000000baac7efcddde498b0b791eda92d43b20f5cd8ff6"},/g', '.wormhole/node/pkg/accountant/ntt_config.go']) load(".wormhole/Tiltfile", "namespace", "k8s_yaml_with_ns") @@ -14,6 +14,11 @@ docker_build( ignore=["./sdk/__tests__", "./sdk/Dockerfile", "./sdk/ci.yaml", "./sdk/**/dist", "./sdk/node_modules", "./sdk/**/node_modules"], dockerfile = "./solana/Dockerfile", ) +docker_build( + ref = "solana-test-validator", + context = "solana", + dockerfile = "solana/Dockerfile.test-validator" +) k8s_yaml_with_ns("./solana/solana-devnet.yaml") k8s_resource( "solana-devnet", diff --git a/evm/Dockerfile b/evm/Dockerfile index ef2d3aa2c..848ee2b10 100644 --- a/evm/Dockerfile +++ b/evm/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/foundry-rs/foundry@sha256:8b843eb65cc7b155303b316f65d27173c862b37719dc095ef3a2ef27ce8d3c00 as builder +FROM --platform=linux/amd64 ghcr.io/foundry-rs/foundry@sha256:8b843eb65cc7b155303b316f65d27173c862b37719dc095ef3a2ef27ce8d3c00 as builder WORKDIR /app COPY foundry.toml foundry.toml @@ -11,4 +11,4 @@ RUN FOUNDRY_PROFILE=prod forge build FROM scratch AS foundry-export COPY --from=builder /app/out . -COPY --from=builder /app/ts ts \ No newline at end of file +COPY --from=builder /app/ts ts diff --git a/solana/Dockerfile b/solana/Dockerfile index 6ac47fe2e..aec214f24 100644 --- a/solana/Dockerfile +++ b/solana/Dockerfile @@ -42,3 +42,13 @@ COPY solana/Makefile Makefile COPY solana/scripts scripts RUN make target/idl/example_native_token_transfers.json + +FROM scratch as export + +COPY --from=builder /opt/solana/deps /opt/solana/deps +COPY --from=builder /usr/src/solana/ts /usr/src/solana/ts +COPY --from=builder /usr/src/solana/package.json /usr/src/solana/package.json +COPY --from=builder /usr/src/solana/tsconfig.esm.json /usr/src/solana/tsconfig.esm.json +COPY --from=builder /usr/src/solana/tsconfig.cjs.json /usr/src/solana/tsconfig.cjs.json +COPY --from=builder /usr/src/solana/target/idl /usr/src/solana/target/idl +COPY --from=builder /usr/src/solana/target/types /usr/src/solana/target/types diff --git a/solana/Dockerfile.test-validator b/solana/Dockerfile.test-validator new file mode 100644 index 000000000..1a40589d6 --- /dev/null +++ b/solana/Dockerfile.test-validator @@ -0,0 +1,2 @@ +FROM ghcr.io/wormholelabs-xyz/solana-test-validator:1.17.29@sha256:b1f85eed2d33a2bd0378204ab4d1e16537de35407cdcfeedbd021b31636618bc +COPY --from=ntt-solana-contract /opt/solana/deps/ /opt/solana/deps/ diff --git a/solana/solana-devnet.yaml b/solana/solana-devnet.yaml index b7d6f89da..dff089fba 100644 --- a/solana/solana-devnet.yaml +++ b/solana/solana-devnet.yaml @@ -35,7 +35,7 @@ spec: terminationGracePeriodSeconds: 1 containers: - name: solana-devnet - image: ntt-solana-contract + image: solana-test-validator command: - solana-test-validator - --bpf-program