Skip to content

SatorNetwork/sator-api

Repository files navigation

Sator API

Sator API, monolith based on go-kit

Prerequisites

To use make commands you must have installed the following things:

  • Golang - to compile the application from source
  • Docker and docker-compose - to run database on local machine
  • sql-migration - to run migrations
  • sqlc - to generate SQL repository boilerplate using your SQL-queries and migrations
  • Make to use make-helpers

First run on localhost

make up && sleep 10 && make migrate-local run-local

or

make -f Makefile.local up && sleep 10 && make -f Makefile.local migrate-local run-local

then the API will be available on localhost:8080

Development

comming soon

Useful tools

  • TablePlus - DB manager
  • Insomnia - open source API client
  • VS Code - IDE (in addition, you can find recommended plugins in the .vscode folder)

Create Solanna Token

solana config get
solana config set --url https://devnet.solana.com
solana-keygen new -o /Users/dmitrymomot/.config/solana/id.json
solana airdrop 10
spl-token create-token
spl-token supply 4iC8n6BB6mxozHKYKUSKcZFJrLQNPTfs8ZAFxob2kX7A
spl-token create-account 4iC8n6BB6mxozHKYKUSKcZFJrLQNPTfs8ZAFxob2kX7A
spl-token balance 4iC8n6BB6mxozHKYKUSKcZFJrLQNPTfs8ZAFxob2kX7A
spl-token mint 4iC8n6BB6mxozHKYKUSKcZFJrLQNPTfs8ZAFxob2kX7A 1000
spl-token supply 4iC8n6BB6mxozHKYKUSKcZFJrLQNPTfs8ZAFxob2kX7A
spl-token balance 4iC8n6BB6mxozHKYKUSKcZFJrLQNPTfs8ZAFxob2kX7A
spl-token accounts