请问是需要通过事件跟踪struct还是需要自己在the graph里额外编写,struct如下,要获取结构体中buyprice的最大值,也定义了相应事件:
struct tradeMes {
uint64 tradeId;
uint64 buyTime;
uint128 buyTotalAmount;
uint128 buyPrice;
uint128 tradeState;
address tokenAddress;
address buyerAddress;
address solderAddress;
}
tradeMes[] private _tradeMes;
//事件
event tradeMessage(uint64 id,uint64 buyTime,uint128 amount,uint128 price,uint128 tradeState,address choosedToken,address buyerAddress,address solderAddress);