-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
66 lines (54 loc) · 2.34 KB
/
Justfile
File metadata and controls
66 lines (54 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
default:
@just --list
# Start local PostgreSQL container
db-container:
docker run --name orderly-db \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=orderly \
-p 5432:5432 \
-d postgres:16
moralis-token-positions address="0xea95d5D5Ef879D50711855Ed9b012d91101780C8":
xh https://deep-index.moralis.io/api/v2.2/{{address}}/erc20?chain=arbitrum X-API-Key:${MORALIS_API_KEY}
get-1inch-token-info-arbitrum:
xh GET "https://api.1inch.dev/token/v1.2/42161?provider=1inch&country=US" \
Authorization:"Bearer ${ONE_INCH_API_KEY}" \
accept:application/json \
content-type:application/json
one-inch-balances-and-allowances spender:
xh \
GET "https://api.1inch.dev/balance/v1.2/42161/aggregatedBalancesAndAllowances/{{spender}}" \
Authorization:"Bearer $ONE_INCH_API_KEY" \
accept:application/json \
content-type:application/json
one-inch-balances address="0xa53568e4175835369d6F76b93501Dd6789Ab0B41":
xh \
GET "https://api.1inch.dev/balance/v1.2/42161/balances/{{address}}" \
Authorization:"Bearer $ONE_INCH_API_KEY" \
accept:application/json \
content-type:application/json
one-inch-token-details contractAddress="0xaf88d065e77c8cc2239327c5edb3a432268e5831": # default USDC on Arbitrum
xh \
GET "https://api.1inch.dev/token-details/v1.0/details/42161/{{contractAddress}}" \
Authorization:"Bearer $ONE_INCH_API_KEY" \
accept:application/json \
content-type:application/json
uniswap-token-list-arbitrum:
xh https://tokens.uniswap.org/ | jq '.tokens[] | select(.chainId == 42161) | {logoURI, address}'
# Spin up a local podman container running psql 16
postgres-container-run:
podman run --name our-limit-order-db \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=our-limit-order-db \
-p 5432:5432 \
-d postgres:16
postgres-container-remove:
podman stop our-limit-order-db
podman rm our-limit-order-db
# Connect to local Postgres running in Podman
psql-connect-local:
psql "host=localhost port=5432 user=postgres password=postgres dbname=our-limit-order-db"
# Connect to the remote Postgres using environment variables
psql-connect-remote:
psql "host=${PGHOST} port=${PGPORT} user=${PGUSER} password=${PGPASSWORD} dbname=${PGDATABASE}"