forked from Nova-reward/Nova-Rewards
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-local-testnet.ps1
More file actions
29 lines (23 loc) · 879 Bytes
/
Copy pathstart-local-testnet.ps1
File metadata and controls
29 lines (23 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$ErrorActionPreference = "Stop"
function Require-Command {
param([string] $Name, [string] $InstallHint)
if (-not (Get-Command $Name -ErrorAction SilentlyContinue)) {
throw $InstallHint
}
}
Require-Command -Name "docker" -InstallHint "Docker Desktop is required to run the local standalone Stellar testnet."
Require-Command -Name "stellar" -InstallHint "stellar CLI is required before starting the local testnet."
docker rm -f stellar-local *> $null
docker run -d --rm `
-p 8000:8000 `
--name stellar-local `
stellar/quickstart:testing `
--local `
--enable-stellar-rpc | Out-Null
try {
stellar network add local `
--rpc-url "http://localhost:8000/rpc" `
--network-passphrase "Standalone Network ; February 2017" | Out-Null
} catch {
}
Write-Host "Local standalone network is starting on http://localhost:8000/rpc"