1
This commit is contained in:
parent
b5c46e24f7
commit
aebb68aa25
@ -108,13 +108,7 @@ type UserStackingPo struct {
|
|||||||
Contracts []*ContractStackingPo `json:"contracts"`
|
Contracts []*ContractStackingPo `json:"contracts"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ContractStakeCecPo struct {
|
type ContractStakeAndUnstakeCecPo struct {
|
||||||
Account string `json:"account"`
|
|
||||||
Token string `json:"token"`
|
|
||||||
Amount string `json:"amount"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type ContractUnstakeCecPo struct {
|
|
||||||
Account string `json:"account"`
|
Account string `json:"account"`
|
||||||
Token string `json:"token"`
|
Token string `json:"token"`
|
||||||
Amount string `json:"amount"`
|
Amount string `json:"amount"`
|
||||||
@ -153,13 +147,8 @@ func NewContractStackingPo() *ContractStackingPo {
|
|||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewContractStakeCecPo() *ContractStakeCecPo {
|
func NewContractStakeAndUnstakeCecPo() *ContractStakeAndUnstakeCecPo {
|
||||||
p := new(ContractStakeCecPo)
|
p := new(ContractStakeAndUnstakeCecPo)
|
||||||
return p
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewContractUnstakeCecPo() *ContractUnstakeCecPo {
|
|
||||||
p := new(ContractUnstakeCecPo)
|
|
||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,12 +80,8 @@ func (this *stackingCec) saveToDb(ds *f5.DataSet) bool {
|
|||||||
createTime := ds.GetByName("createtime")
|
createTime := ds.GetByName("createtime")
|
||||||
modifyTime := ds.GetByName("modifytime")
|
modifyTime := ds.GetByName("modifytime")
|
||||||
|
|
||||||
accountAddress := ""
|
|
||||||
token := ""
|
|
||||||
amount := ""
|
|
||||||
|
|
||||||
decodeJsonOk := false
|
decodeJsonOk := false
|
||||||
p := new(itemSoldOut)
|
p := jccommon.NewContractStakeAndUnstakeCecPo()
|
||||||
if q5.DecodeJson(returnValues, p) == nil {
|
if q5.DecodeJson(returnValues, p) == nil {
|
||||||
decodeJsonOk = true
|
decodeJsonOk = true
|
||||||
dbErr, _, _ := f5.GetGoStyleDb().NewUpsert(
|
dbErr, _, _ := f5.GetGoStyleDb().NewUpsert(
|
||||||
@ -105,9 +101,9 @@ func (this *stackingCec) saveToDb(ds *f5.DataSet) bool {
|
|||||||
{"contract_address", strings.ToLower(contractAddress)},
|
{"contract_address", strings.ToLower(contractAddress)},
|
||||||
{"src_idx", idx},
|
{"src_idx", idx},
|
||||||
{"event_name", eventName},
|
{"event_name", eventName},
|
||||||
{"account_address", accountAddress},
|
{"account_address", p.Account},
|
||||||
{"token_address", token},
|
{"token_address", p.Token},
|
||||||
{"amount", amount},
|
{"amount", p.Amount},
|
||||||
{"createtime", createTime},
|
{"createtime", createTime},
|
||||||
{"modifytime", modifyTime},
|
{"modifytime", modifyTime},
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user