Skip to content

Latest commit

 

History

History
73 lines (52 loc) · 3.23 KB

setup-test-enviroment.md

File metadata and controls

73 lines (52 loc) · 3.23 KB

Setup test enviroment

1. Install dependent packages

sudo apt update
sudo apt install -y curl httpie jq

1679628520407

The httpie is recommended to send https request in our test cases. You can use curl also.

2. Set environment variables

Set the following environment variables:

# address of gateway, maybe different in your environment
export SERVER="https://127.0.0.1:15888"

# POST command use JSON format
export HEADER="Content-Type: application/json"

# public key of test account, replace it with your account
export ETH_ADDRESS="0xD4CE02705041F04135f1949Bc835c1Fe0885513c"
export XDC_ADDRESS="xdcD4CE02705041F04135f1949Bc835c1Fe0885513c"

# path of certs
CERTS_PATH="${HOME}/hummingbot/certs"
export GATEWAY_CERT="${CERTS_PATH}/client_cert.pem"
export GATEWAY_KEY="${CERTS_PATH}/client_key.pem"

1679627883880

3. Config httpie

Remember to delete this file after test.

mkdir -p ${HOME}/.config/httpie

cat > ${HOME}/.config/httpie/config.json <<EOF
{
    "default_options": [
        "--verify=no",
        "--cert=${GATEWAY_CERT}",
        "--cert-key=${GATEWAY_KEY}"
    ]
}
EOF

# check file content
cat ${HOME}/.config/httpie/config.json

1679627737884

1679627793913

4. Mint tokens

Token Decimals Link
WBTC2 8 0x01B0500f82EF188D0410a46f2E8940133E213e83
YFI2 18 0x22e4Eb82FF59c53B275aDEacd4EE4Bc47fc4f16d
MKR2 18 0x258E445fEf3F41429e38ee124DA63aBfb08edc70
AAVE2 18 0x3042207876c47D3c206df99b3279d97813B34Ea1
UNI2 18 0xD9e33607d06cBB1Fef59488b9969426b10F310B8
USDC2 6 0xF83B9Dc502A3F76c042b4043B6C1B5eBBE574389