Skip to content

Commit

Permalink
fix verify contract
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobeyw committed Aug 19, 2024
1 parent e12314c commit 798801f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion neo3fura_http/biz/api/src.GetSourceCodeByContractHash.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ package api
import (
"context"
"encoding/json"

"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"

"neo3fura_http/lib/cli"
log2 "neo3fura_http/lib/log"
"neo3fura_http/lib/type/h160"
Expand All @@ -30,7 +32,7 @@ func (me *T) GetSourceCodeByContractHash(args struct {
if args.Limit <= 0 {
args.Limit = 20
}
clientOptions := options.Client().ApplyURI("mongodb://Mindy:QMRhLk9m8rqXWC3X9pMJ@10.0.7.38:27018/ContractSource")
clientOptions := options.Client().ApplyURI("mongodb://Mindy:QMRhLk9m8rqXWC3X9pMJ@10.128.0.30:27018/ContractSource")
dbOnline := "ContractSource"
clientOptions.SetMaxPoolSize(50)
co, err := mongo.Connect(context.TODO(), clientOptions)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ package api
import (
"context"
"encoding/json"

"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"

"neo3fura_http/lib/cli"
log2 "neo3fura_http/lib/log"
"neo3fura_http/lib/type/h160"
Expand All @@ -26,7 +28,7 @@ func (me *T) GetVerifiedContractByContractHash(args struct {
return stderr.ErrInvalidArgs
}

clientOptions := options.Client().ApplyURI("mongodb://Mindy:QMRhLk9m8rqXWC3X9pMJ@10.0.7.38:27018/ContractSource")
clientOptions := options.Client().ApplyURI("mongodb://Mindy:QMRhLk9m8rqXWC3X9pMJ@10.128.0.30:27018/ContractSource")
dbOnline := "ContractSource"
clientOptions.SetMaxPoolSize(50)
co, err := mongo.Connect(context.TODO(), clientOptions)
Expand Down
6 changes: 4 additions & 2 deletions neo3fura_http/biz/api/src.GetVerifiedContracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ package api
import (
"context"
"encoding/json"
"os"

"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"

"neo3fura_http/lib/cli"
log2 "neo3fura_http/lib/log"
"os"

"go.mongodb.org/mongo-driver/bson"
)
Expand All @@ -18,7 +20,7 @@ func (me *T) GetVerifiedContracts(args struct {
Skip int64
}, ret *json.RawMessage) error {

clientOptions := options.Client().ApplyURI("mongodb://Mindy:QMRhLk9m8rqXWC3X9pMJ@10.0.7.38:27018/ContractSource")
clientOptions := options.Client().ApplyURI("mongodb://Mindy:QMRhLk9m8rqXWC3X9pMJ@10.128.0.30:27018/ContractSource")
dbOnline := "ContractSource"
clientOptions.SetMaxPoolSize(50)
co, err := mongo.Connect(context.TODO(), clientOptions)
Expand Down

0 comments on commit 798801f

Please sign in to comment.