Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
liangjies committed May 16, 2023
0 parents commit 6b23784
Show file tree
Hide file tree
Showing 72 changed files with 4,462 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
nft-collect
# Test binary, built with `go tests -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/
assets/
log/
uploads/
config/config.yaml
config/config.docker.yaml
.idea
nft-collect
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# nft-collect
![](https://img.shields.io/badge/license-MIT-green)
[![goreportcard for backend-go](https://goreportcard.com/badge/github.com/decert-me/nft-collect)](https://goreportcard.com/report/github.com/decert-me/nft-collect)
## 安装
```bash
git clone https://github.com/decert-me/nft-collect.git
```
## 编译
```bash
go build
```
## 配置
```bash
# 主程序配置
cp ./config/config.demo.yaml ./config/config.yaml
vi ./config/config.yaml
```
## 运行
```bash
./nft-collect
```
74 changes: 74 additions & 0 deletions config/config.demo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# system configuration
system:
env: develop
addr: 8888

# pgsql configuration
pgsql:
path: "127.0.0.1"
port: "5432"
config: ""
db-name: "nft_collect"
username: "postgres"
password: "123456"
max-idle-conns: 10
max-open-conns: 100
log-mode: "info"
log-zap: false

# auth configuration
jwt:
signing-key: "Decert"
expires-time: 86400
issuer: "Decert"

# zap configuration
zap:
level: info
format: console
prefix: '[nft-collect]'
director: log
show-line: true
encode-level: LowercaseColorLevelEncoder
stacktrace-key: stacktrace
log-in-console: true

# local configuration
local:
path: 'uploads/file'
ipfs: 'uploads/ipfs'

# nft
nft:
ens-rpc: "https://rpc.ankr.com/eth"
api-key: ""
api-key-backup: ""
api-key-pro: ""
cache-time: 15
logo-path: "assets"
def-contract: ["0x37da9ea159f5c95923ccc65ecae857c2584a899a::polygon","0x8cc6517e45db7a0803fef220d9b577326a12033f::eth","0x2723522702093601e6360cae665518c4f63e9da6::bnb"]
api-config:
- chain: "eth"
chain-id: 1
api-per-host: "restapi"
symbol: "ETH"
- chain: "bnb"
chain-id: 56
api-per-host: "bnbapi"
symbol: "BNB"
- chain: "polygon"
chain-id: 137
api-per-host: "polygonapi"
symbol: "MATIC"
- chain: "arbitrum"
chain-id: 42161
api-per-host: "arbitrumapi"
symbol: "Arbitrum"
- chain: "optimism"
chain-id: 10
api-per-host: "optimismapi"
symbol: "Optimism"
- chain: "gnosis"
chain-id: 100
api-per-host: "gnosisapi"
symbol: "XDAI"
109 changes: 109 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
module nft-collect

go 1.19

require (
github.com/allegro/bigcache/v3 v3.1.0
github.com/chenyahui/gin-cache v1.8.0
github.com/ethereum/go-ethereum v1.10.26
github.com/fsnotify/fsnotify v1.6.0
github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6
github.com/gin-contrib/pprof v1.4.0
github.com/gin-gonic/gin v1.8.2
github.com/golang-jwt/jwt/v4 v4.3.0
github.com/imroc/req/v3 v3.32.0
github.com/lib/pq v1.10.7
github.com/natefinch/lumberjack v2.0.0+incompatible
github.com/pkg/errors v0.9.1
github.com/spf13/viper v1.15.0
github.com/tidwall/gjson v1.14.4
github.com/wealdtech/go-ens/v3 v3.5.5
go.uber.org/zap v1.24.0
golang.org/x/exp v0.0.0-20230206171751-46f607a40771
gorm.io/driver/postgres v1.4.7
gorm.io/gorm v1.24.6
)

require (
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/deckarep/golang-set v1.8.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-ole/go-ole v1.2.1 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.11.2 // indirect
github.com/go-redis/redis/v8 v8.11.5 // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
github.com/goccy/go-json v0.10.0 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
github.com/google/uuid v1.2.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/ipfs/go-cid v0.2.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgx/v5 v5.2.0 // indirect
github.com/jellydator/ttlcache/v2 v2.11.1 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/multiformats/go-base32 v0.0.3 // indirect
github.com/multiformats/go-base36 v0.1.0 // indirect
github.com/multiformats/go-multibase v0.1.1 // indirect
github.com/multiformats/go-multihash v0.2.0 // indirect
github.com/multiformats/go-varint v0.0.6 // indirect
github.com/onsi/ginkgo/v2 v2.2.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-18 v0.2.0 // indirect
github.com/quic-go/qtls-go1-19 v0.2.0 // indirect
github.com/quic-go/qtls-go1-20 v0.1.0 // indirect
github.com/quic-go/quic-go v0.32.0 // indirect
github.com/rjeczalik/notify v0.9.1 // indirect
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tklauser/go-sysconf v0.3.5 // indirect
github.com/tklauser/numcpus v0.2.2 // indirect
github.com/ugorji/go/codec v1.2.9 // indirect
github.com/wealdtech/go-multicodec v1.4.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
golang.org/x/crypto v0.6.0 // indirect
golang.org/x/mod v0.6.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/tools v0.2.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.1.6 // indirect
)
Loading

0 comments on commit 6b23784

Please sign in to comment.