Skip to content

Commit

Permalink
Merge pull request #96 from Elements-Studio/remote_node_script
Browse files Browse the repository at this point in the history
Remote node script
  • Loading branch information
ValentineReese authored Feb 10, 2024
2 parents 64e63a6 + 4f823db commit e6bdbc8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
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

0 comments on commit e6bdbc8

Please sign in to comment.