Skip to content

Commit

Permalink
Merge pull request #225 from Tobeyw/dev-mindy
Browse files Browse the repository at this point in the history
fix megaoasis url
  • Loading branch information
Tobeyw authored Dec 15, 2023
2 parents 546e377 + 755632e commit 6aa2078
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
10 changes: 5 additions & 5 deletions neo3fura_http/biz/api/src.GetInfoByNFT.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@ func (me *T) GetInfoByNFT(args struct {

func GetNNSByAddress(address string) (string, string, error) {
rt := os.ExpandEnv("${RUNTIME}")
url := "https://megaoasis.ngd.network:8889/profile/get?address="
if rt == "test" {
url = "https://megaoasis.ngd.network:8893/profile/get?address="
} else if rt == "test1" {
url = "https://megaoasis.ngd.network:8889/profile/get?address="
url := "https://megaoasis.ngd.network:8893/profile/get?address="
if rt == "test1" {
url = "https://megaoasis.ngd.network:8889/profile/get?address=" //staging
} else if rt == "test" {
url = "https://megaoasis.ngd.network:8889/profile/get?address=" //test
}

resp, err := http.Get(url + address)
Expand Down
8 changes: 6 additions & 2 deletions neo3fura_http/biz/api/src.GetMarketCollections.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,26 @@ func (me *T) GetMarketCollections(args struct {
return stderr.ErrInvalidArgs
}
rt := os.ExpandEnv("${RUNTIME}")
var nns, genesis, polemen string
var nns, genesis, polemen, tree string
if rt == "staging" {
nns = Contract.Main_NNS.Val()
// metapanacea = Contract.Main_MetaPanacea.Val()
genesis = Contract.Main_ILEXGENESIS.Val()
polemen = Contract.Main_ILEXPOLEMEN.Val()
tree = Contract.Main_TREE.Val()

} else if rt == "test2" {
nns = Contract.Test_NNS.Val()
// metapanacea = Contract.Test_MetaPanacea.Val()
genesis = Contract.Test_ILEXGENESIS.Val()
polemen = Contract.Test_ILEXPOLEMEN.Val()
tree = Contract.Test_TREE.Val()
} else {
nns = Contract.Test_NNS.Val()
// metapanacea = Contract.Test_MetaPanacea.Val()
genesis = Contract.Test_ILEXGENESIS.Val()
polemen = Contract.Test_ILEXPOLEMEN.Val()
tree = Contract.Test_TREE.Val()
}

result, err := me.Client.QueryLastJob(struct {
Expand Down Expand Up @@ -81,7 +84,8 @@ func (me *T) GetMarketCollections(args struct {
bson.M{"$set": bson.M{"class": bson.M{"$cond": bson.M{"if": bson.M{"$eq": []interface{}{"$asset", nns}}, "then": "$tokenid",
"else": bson.M{"$cond": bson.M{"if": bson.M{"$eq": []interface{}{"$asset", genesis}}, "then": "$image",
"else": bson.M{"$cond": bson.M{"if": bson.M{"$eq": []interface{}{"$asset", polemen}}, "then": "$tokenid",
"else": "$name"}}}}}}}},
"else": bson.M{"$cond": bson.M{"if": bson.M{"$eq": []interface{}{"$asset", tree}}, "then": "$tokenid",
"else": "$name"}}}}}}}}}},
bson.M{"$group": bson.M{"_id": bson.M{"asset": "$asset", "class": "$class"}, "asset": bson.M{"$last": "$asset"}, "tokenid": bson.M{"$last": "$tokenid"}, "properties": bson.M{"$push": "$$ROOT"}}},
//需要将所有的nft 匹配完才能删选, 查询速度极慢
//bson.M{"$lookup": bson.M{
Expand Down
19 changes: 10 additions & 9 deletions neo3fura_http/lib/type/Contract/src.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ import (
type T string

const (
Main_MetaPanacea T = "0x19ed09dadac28e6b6a2f76588516ef681aff29b1"
Test_MetaPanacea T = "0x4fb2f93b37ff47c0c5d14cfc52087e3ca338bc56"
Main_ILEXPOLEMEN T = "0x9f344fe24c963d70f5dcf0cfdeb536dc9c0acb3a"
Test_ILEXPOLEMEN T = "0xb13b57056775529e9461418a0a66b6dd97640ef8"
Main_ILEXGENESIS T = "0xc91b4becc7f4052a22e33990ed7696b4b175ec62"
Test_ILEXGENESIS T = "0x6a2893f97401e2b58b757f59d71238d91339856a"
Main_NNS T = "0x50ac1c37690cc2cfc594472833cf57505d5f46de"
Test_NNS T = "0x50ac1c37690cc2cfc594472833cf57505d5f46de"

Main_MetaPanacea T = "0x19ed09dadac28e6b6a2f76588516ef681aff29b1"
Test_MetaPanacea T = "0x4fb2f93b37ff47c0c5d14cfc52087e3ca338bc56"
Main_ILEXPOLEMEN T = "0x9f344fe24c963d70f5dcf0cfdeb536dc9c0acb3a"
Test_ILEXPOLEMEN T = "0xb13b57056775529e9461418a0a66b6dd97640ef8"
Main_ILEXGENESIS T = "0xc91b4becc7f4052a22e33990ed7696b4b175ec62"
Test_ILEXGENESIS T = "0x6a2893f97401e2b58b757f59d71238d91339856a"
Main_NNS T = "0x50ac1c37690cc2cfc594472833cf57505d5f46de"
Test_NNS T = "0x50ac1c37690cc2cfc594472833cf57505d5f46de"
Main_TREE T = "0x50ac1c37690cc2cfc594472833cf57505d5f46de"
Test_TREE T = "0x4643600b9f88799cc9fab27027647abf2149c420"
Main_SecondaryMarket T = "0xd2e7cf18ee0d9b509fac02457f54b63e47b25e29"
Main_PrimaryMarket T = "0xa41600dec34741b143c66f2d3448d15c7d79a0b7"
Test_SecondaryMarket T = "0xc198d687cc67e244662c3b9c1325f095f8e663b1"
Expand Down

0 comments on commit 6aa2078

Please sign in to comment.