From 275ac22c9da79e9bab3abc9d1fb24a5f5d480e5f Mon Sep 17 00:00:00 2001 From: Chad Ostrowski <221614+chadoh@users.noreply.github.com> Date: Fri, 6 Oct 2023 11:46:21 -0400 Subject: [PATCH] build: try using SOROBAN_RPC_URL in both spots and making them match --- cmd/crates/soroban-spec-typescript/ts-tests/package.json | 2 +- cmd/crates/soroban-spec-typescript/ts-tests/src/util.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/crates/soroban-spec-typescript/ts-tests/package.json b/cmd/crates/soroban-spec-typescript/ts-tests/package.json index d246fee5c..178311006 100644 --- a/cmd/crates/soroban-spec-typescript/ts-tests/package.json +++ b/cmd/crates/soroban-spec-typescript/ts-tests/package.json @@ -2,7 +2,7 @@ "private": true, "type": "module", "scripts": { - "postinstall": "curl -X POST ${SOROBAN_RPC_URL:-\"http://localhost:8000/soroban/rpc\"} && echo \"make sure you run 'npm run fund'\" && npm run deploy && npm run bindings || { echo \"Make sure you're running standalone RPC network on localhost:8000\" && exit 1; }", + "postinstall": "curl -X POST ${SOROBAN_RPC_URL:-\"http://localhost:8000/\"} && echo \"make sure you first run 'SOROBAN_NETWORK_PASSPHRASE=\"Standalone Network ; February 2017\" SOROBAN_RPC_URL=http://localhost:8000/soroban/rpc npm run fund'\" && npm run deploy && npm run bindings || { echo \"Make sure you're running standalone RPC network on localhost:8000\" && exit 1; }", "fund": "./soroban config identity fund", "bindings:custom-types": "./soroban contract bindings typescript --contract-id $(cat contract-id-custom-types.txt) --output-dir ./node_modules/test-custom-types --overwrite", "bindings:hello-world": "./soroban contract bindings typescript --contract-id $(cat contract-id-hello-world.txt) --output-dir ./node_modules/test-hello-world --overwrite", diff --git a/cmd/crates/soroban-spec-typescript/ts-tests/src/util.ts b/cmd/crates/soroban-spec-typescript/ts-tests/src/util.ts index dee16f1cd..81517944f 100644 --- a/cmd/crates/soroban-spec-typescript/ts-tests/src/util.ts +++ b/cmd/crates/soroban-spec-typescript/ts-tests/src/util.ts @@ -1,6 +1,6 @@ import { Keypair, TransactionBuilder } from "soroban-client"; -export const rpcUrl = "http://localhost:8000"; +export const rpcUrl = process.env.SOROBAN_RPC_URL ?? "http://localhost:8000/"; export const secretKey = "SC36BWNUOCZAO7DMEJNNKFV6BOTPJP7IG5PSHLUOLT6DZFRU3D3XGIXW";