0

solidity 代码将发出 uint256[] 数组事件

 event AttrbuteUpdated(uint256 tokenID,uint256[]  indexed attrID,uint256[]  indexed value);

但使用 yarn codegen 然后将转换为字节。


  get attrID(): Bytes {
    return this._event.parameters[1].value.toBytes();
  }

  get value(): Bytes {
    return this._event.parameters[2].value.toBytes();
  }

我将在一个实体上记录 attrID/值。怎么做...

type Token @entity {
  id: ID!
  contract: GameERC721Contract!
  owner: Owner!
  tokenID: BigInt!
  tokenURI: String!
  mintTime: BigInt!
  attrID:[BigInt!]!
  attrValue:[BigInt!]!
}
4

0 回答 0