From 32f93730e83077eaf4b6edcc73f3e49d2da4c471 Mon Sep 17 00:00:00 2001 From: DeepakBomjan <44976635+DeepakBomjan@users.noreply.github.com> Date: Fri, 20 Sep 2024 12:21:06 +0545 Subject: [PATCH] ci: add sui key import script (#884) * ci: add sui key import script * ci: add multisig installation * ci: add stellar key * ci: disable ipv6 --- .github/deployer/init_script.sh | 21 ++++++++++++++++++--- .github/deployer/sui_import.sh | 6 ++++++ 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100755 .github/deployer/sui_import.sh diff --git a/.github/deployer/init_script.sh b/.github/deployer/init_script.sh index 93af61b10..d15858972 100755 --- a/.github/deployer/init_script.sh +++ b/.github/deployer/init_script.sh @@ -126,6 +126,7 @@ set -x cd /tmp # Install go +sysctl -p wget -q https://go.dev/dl/go$${GO_VERS}.linux-amd64.tar.gz tar xf go$${GO_VERS}.linux-amd64.tar.gz -C /usr/local @@ -235,15 +236,29 @@ alias make='sudo /opt/deployer/bin/deploy.sh'" >> $${DEPLOYR_HOME}/.bashrc chmod +x /opt/deployer/root/keyutils/add_secret.sh echo "## Aliases -alias add-secrets='/opt/deployer/root/keyutils/add_secret.sh'" >> /root/.bashrc +alias add-secrets='/opt/deployer/root/keyutils/add_secret.sh' +alias add-stellar-key='/opt/deployer/root/keyutils/add_stellar_key.sh'" >> /root/.bashrc ## Install solana source "/root/.cargo/env" export PATH=$${PATH}:/root/.cargo/bin +sh -c "$(curl -sSfL https://release.solana.com/v1.18.18/install)" sudo apt-get install -y pkg-config build-essential libudev-dev libssl-dev /root/.cargo/bin/cargo install --git https://github.com/coral-xyz/anchor avm --locked --force || true -avm install 0.30.1 || -chmod 400 /tmp/user_data_log.out || true +avm install 0.30.1 || true + +echo "export PATH=$${PATH}:/root/.local/share/solana/install/releases/1.18.18/solana-release/bin" >> /root/.bashrc + + +## Install multisig +cargo install --git https://github.com/icon-project/cw-plus.git --branch feat/test-multisig cwmultisig + +## Install Stellar +wget https://github.com/stellar/stellar-cli/releases/download/v21.4.1/stellar-cli-21.4.1-x86_64-unknown-linux-gnu.tar.gz +tar -xvzf stellar-cli-21.4.1-x86_64-unknown-linux-gnu.tar.gz +mv stellar /usr/local/bin/stellar + +chmod 400 /tmp/user_data_log.out || true diff --git a/.github/deployer/sui_import.sh b/.github/deployer/sui_import.sh new file mode 100755 index 000000000..ae8e25f95 --- /dev/null +++ b/.github/deployer/sui_import.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +ARCHWAY_KEY=$(archwayd keys export ibc_wallet --unsafe --unarmored-hex --keyring-backend test) +SUI_KEY=$(sui keytool convert $ARCHWAY_KEY --json | grep suiprivkey | awk -F\" '{print $4}') +rm -rf /root/.sui/sui_config/* +sui keytool import --alias sui_wallet_testnet $SUI_KEY ed25519 >/dev/null && echo "SUCCESS" || echo "FAILED"