Skip to content

Commit

Permalink
new: explicit type casting to Bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
itzmeanjan committed Jan 27, 2021
1 parent d3bbd41 commit 44b84c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions root/src/mappings/registry.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Address } from '@graphprotocol/graph-ts'
import { Address, Bytes } from '@graphprotocol/graph-ts'

import { Registry, TokenMapped } from '../../generated/Registry/Registry'
import { TokenMapping } from '../../generated/schema'
Expand Down Expand Up @@ -26,7 +26,7 @@ export function handlePlasmaTokenMapped(event: TokenMapped): void {
// 1. keccak256('ERC721') = 0x73ad2146b3d3a286642c794379d750360a2d53a3459a11b3e5d6cc900f55f44a
// 2. keccak256('ERC20') = 0x8ae85d849167ff996c04040c44924fd364217285e4cad818292c7ac37c0a345b
let registry = Registry.bind(Address.fromString(registryAddress))
entity.tokenType = registry.isERC721(event.params.rootToken) ? '0x73ad2146b3d3a286642c794379d750360a2d53a3459a11b3e5d6cc900f55f44a' : '0x8ae85d849167ff996c04040c44924fd364217285e4cad818292c7ac37c0a345b'
entity.tokenType = (registry.isERC721(event.params.rootToken) ? '0x73ad2146b3d3a286642c794379d750360a2d53a3459a11b3e5d6cc900f55f44a' : '0x8ae85d849167ff996c04040c44924fd364217285e4cad818292c7ac37c0a345b') as Bytes

// Yes, this is plasma mapping handler, so it's a plasma bridge token
entity.isPOS = false
Expand Down

0 comments on commit 44b84c2

Please sign in to comment.