Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote node script #96

Merged
merged 2 commits into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Move.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "Starswap-Core"
version = "2.0.5"
version = "2.0.6"

[addresses]
StarcoinFramework = "0x1"
Expand Down
31 changes: 31 additions & 0 deletions scripts/starcoin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
function usage() {
echo -e "usage: astarcoin net"
echo -e "net is main, barnard, proxima, halley"
echo -e "to_dir like ~/.starcoin/main, ~/.starcoin/barnard, ~/.starcoin/proxima"
}

function connect_node() {
net=$1
account_dir=$2
ws_url="ws://$net.seed.starcoin.org:9870"
echo -e "starcoin --connect $ws_url --local-account-dir $account_dir console"
starcoin --connect "$ws_url" --local-account-dir "$account_dir" console
}

if [ $# != 2 ]; then
usage
exit 1
fi
net=$1
to_dir=$2
account_dir="$to_dir/account_vaults"
case $net in
"main" | "barnard" | "proxima" |"halley")
connect_node "$net" "$account_dir"
;;
*)
echo "$net not supported"
usage
;;
esac
Loading