Swap-Aggregator-Subgraph/node_modules/@graphprotocol/graph-ts/test/entity.ts
Richa-iitr d211083153 Revert "Revert "added handler""
This reverts commit c36ee8c5ca.
2022-07-03 07:30:05 +05:30

16 lines
434 B
TypeScript

import { BigDecimal, BigInt } from 'temp_lib/index'
import { Entity, Bytes } from 'temp_lib/index'
export function testEntity(): void {
let entity = new Entity()
entity.setBytes('x', new Bytes(1))
assert(entity.getBytes('x') == new Bytes(1))
entity.setBoolean('x', true)
assert(entity.getBoolean('x') == true)
entity.setBigDecimal('x', new BigDecimal(BigInt.fromI32(2)))
assert(entity.getBigDecimal('x') !== null)
}