# Challenge 3

## Prepare

Pertama kita membutuhkan new wallet dari **metamask** dan siapkan **export private key**.

Lalu siapkan **Blockscout dan Alchemy API** untuk run challenge 4 ini dan kalian bisa klik link dibawah ini.

#### OP Sepolia API

{% embed url="<https://optimism-sepolia.blockscout.com/account/api-key>" %}

#### Base Sepolia API

{% embed url="<https://base-sepolia.blockscout.com/account/api-key>" %}

#### Alchemy Tutorial&#x20;

{% embed url="<https://docs.alchemy.com/docs/alchemy-quickstart-guide>" %}

Ikutin tutor alchemy yang step 1 dan tinggal ganti jaringannya ke Base Sepolia Testnet dan OP Sepolia Testnet.

### Installation

Lanjut setup VPS dan gunakan **Ubuntu 20.04** untuk run scriptnya.

<pre class="language-bash"><code class="lang-bash">sudo apt-get update
sudo apt-get upgrade -y
<strong>sudo apt install npm -y
</strong>sudo apt install git
</code></pre>

#### Install NodeJS

{% hint style="info" %}
Jika kalian mengalami error, tinggal run command dibawah satu persatu.
{% endhint %}

```bash
sudo apt install curl wget gnupg
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/nodesource.gpg
echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/nodesource.list
sudo apt update
sudo apt install nodejs
node --version
npm --version
```

#### Install Foundry

```bash
curl -L https://foundry.paradigm.xyz | bash
```

Lalu refresh resource

```bash
source /root/.bashrc
```

Kemudian jalankan foundry

```
foundryup 
```

#### Install Just

{% hint style="info" %}
Untuk menghindari error, run command ini satu persatu.
{% endhint %}

```bash
wget -qO - 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null
echo "deb [arch=all,$(dpkg --print-architecture) signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list
sudo apt update
sudo apt install just
```

#### Clone Repository (Thanks to Dexanode)

```bash
git clone https://github.com/Dexanode/ibc-app-solidity.git
```

Buka folder

```bash
cd ibc-app-solidity
```

Ubah nama file

```bash
cp .env.example .env
```

Edit isi dari .env

```bash
nano .env
```

Lalu isi bagian **PRIVATE\_KEY\_1** dengan **private key yang kalian dapatkan dari metamask** dan isi didalam ' '. Kemudian dibagian API\_KEY kalian isi sesuai yang kalian dapatkan pada step awal awal dan skip bagian **TENDERLY\_TOKEN**

<figure><img src="/files/2HW1UoAOwEjmjS37ZKQv" alt=""><figcaption></figcaption></figure>

Kemudian save filenya dengan tekan CTRL + X dan CTRL + Y, kemudian enter.

Lalu install templatenya dengan just

```bash
just install
```

### Run Script

Jalankan scriptnya dengan command dibawah ini.\\

```bash
just do-it
```

<figure><img src="/files/Girr6xTyOwcFJZfzKaAf" alt=""><figcaption></figcaption></figure>

Jika sudah muncul **"You've done it!"** maka sudah selesai challenge 3


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.strnan.top/testnet/polymer/challenge-3.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
