sudo apt update
sudo apt install -y curl httpie jq
The httpie is recommended to send https request in our test cases. You can use curl also.
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"
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
- I created some test tokens on apothem blockchain with factory contract 0xfD9F33ab143b1717D4784A420eE5A93A8CbBcABd. Pleas mint enough test tokes to your test account on blockchain explorer.
Token | Decimals | Link |
---|---|---|
WBTC2 | 8 | 0x01B0500f82EF188D0410a46f2E8940133E213e83 |
YFI2 | 18 | 0x22e4Eb82FF59c53B275aDEacd4EE4Bc47fc4f16d |
MKR2 | 18 | 0x258E445fEf3F41429e38ee124DA63aBfb08edc70 |
AAVE2 | 18 | 0x3042207876c47D3c206df99b3279d97813B34Ea1 |
UNI2 | 18 | 0xD9e33607d06cBB1Fef59488b9969426b10F310B8 |
USDC2 | 6 | 0xF83B9Dc502A3F76c042b4043B6C1B5eBBE574389 |