Skip to content

Commit

Permalink
check the avalible erc20
Browse files Browse the repository at this point in the history
  • Loading branch information
Geapefurit committed Nov 30, 2023
1 parent 680f2e3 commit 4651307
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 71 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
## 说明

![功能展示](docs/smart_coin.png)
目前仅支持ethereum上的部分erc20币种(top100中支持23个币种
目前仅支持ethereum上的部分erc20币种(top100中支持19个币种

### 新增功能

Expand Down Expand Up @@ -109,7 +109,7 @@ docker run --name buildchain -p 50491:50491 -p 50490:50490 -e ENV_ETH_ENDPOINT=
# export no_proxy='my_ip/netmask'
# 查看参数
./build-chain crawl
# 1.部署ethscan中erc20-top-tokens 前1-100,大约有23个币种可以成功部署
# 1.部署ethscan中erc20-top-tokens 前1-100,大约有19个币种可以成功部署
./build-chain crawl --host ServerIP:50491 -o 1 -l 100
# 2.指定公网contract进行部署
./build-chain crawl --host ServerIP:50491 --co 0xdAC17F958D2ee523a2206206994597C13D831ec7
Expand Down
4 changes: 3 additions & 1 deletion cmd/build-chain/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var deployCmd = &cli.Command{
Aliases: []string{"d"},
Usage: "deploy smart contract from file",
Before: func(ctx *cli.Context) error {
err := logger.Init(logger.DebugLevel, "./")
err := logger.Init(logger.DebugLevel, "./deploy.log")
if err != nil {
panic(fmt.Errorf("fail to init logger: %v", err))
}
Expand Down Expand Up @@ -82,11 +82,13 @@ func Deploy(ctx context.Context, deployInfo *DeployInfo) error {
if err != nil {
return err
}
logger.Sugar().Infof("read %v tokens from file(%v)", len(tokens), deployInfo.FilePath)
for _, v := range tokens {
err = CreateTokenInfo(ctx, bcConn, v, deployInfo.Force)
if err != nil {
logger.Sugar().Error(err)
}
logger.Sugar().Infof("success deploy %v ", v.Name)
}
return nil
}
Expand Down
67 changes: 1 addition & 66 deletions deploy/erc20.csv

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/crud/v1/tokeninfo/tokeninfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ type Conds struct {
Data *cruder.Cond
}

//nolint:funlen
//nolint:funlen,gocyclo
func SetQueryConds(q *ent.TokenInfoQuery, conds *Conds) (*ent.TokenInfoQuery, error) {
if conds.ID != nil {
id, ok := conds.ID.Val.(uint32)
Expand Down
2 changes: 1 addition & 1 deletion resource/pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h2 style="display: inline-block;height: 3rem;">Ethereum</h2>
method: "POST",
args: {
"Offset":0,
"Limit":2,
"Limit":100,
},
}
const FaucetAPI = {
Expand Down

0 comments on commit 4651307

Please sign in to comment.