Skip to content

Commit

Permalink
Merge pull request #280 from rubixchain/sai/adding-epoch-get-scdata
Browse files Browse the repository at this point in the history
Adding epoch information in the get-smart-contract-token-chain-data API response
  • Loading branch information
arnabghose997 authored Jan 6, 2025
2 parents 5bd3e5d + baecdd7 commit a211f24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/diagnostic.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ func (c *Core) GetSmartContractTokenChainData(getReq *model.SmartContractTokenCh
reply.Message = "Failed to get smart contract token latest block number"
return reply
}
epoch := latestBlock.GetEpoch()
scData := latestBlock.GetSmartContractData()
if scData == "" && blockNo == 0 {
reply.Message = "Gensys Block, No Smart contract Data"
Expand All @@ -217,6 +218,7 @@ func (c *Core) GetSmartContractTokenChainData(getReq *model.SmartContractTokenCh
BlockNo: blockNo,
BlockId: blockId,
SmartContractData: scData,
Epoch: uint64(epoch),
}
sctDataArray = append(sctDataArray, sctData)
reply.SCTDataReply = sctDataArray
Expand Down
1 change: 1 addition & 0 deletions core/model/diagnostic.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type SCTDataReply struct {
BlockNo uint64
BlockId string
SmartContractData string
Epoch uint64
}

type NFTData struct {
Expand Down

0 comments on commit a211f24

Please sign in to comment.