diff --git a/root/schema.graphql b/root/schema.graphql index e49a53f..c8c9908 100644 --- a/root/schema.graphql +++ b/root/schema.graphql @@ -79,6 +79,7 @@ type TokenMapping @entity { type FxTokenMapping @entity { id: ID! counter: BigInt! + contractAddress: Bytes! rootToken: Bytes! childToken: Bytes! tokenType: String! @@ -94,6 +95,7 @@ type FxTokenMappingCounter @entity { type FxDeposit @entity { id: ID! counter: BigInt! + contractAddress: Bytes! rootToken: Bytes! tokenType: String! depositor: Bytes! @@ -112,6 +114,7 @@ type FxDepositCounter @entity { type FxWithdraw @entity { id: ID! counter: BigInt! + contractAddress: Bytes! rootToken: Bytes! childToken: Bytes! tokenType: String! diff --git a/root/src/mappings/fx-erc1155.ts b/root/src/mappings/fx-erc1155.ts index 8385b0c..342d3a4 100644 --- a/root/src/mappings/fx-erc1155.ts +++ b/root/src/mappings/fx-erc1155.ts @@ -61,6 +61,7 @@ export function handleTokenMappedERC1155(event: TokenMappedERC1155): void { entity.transactionHash = event.transaction.hash entity.timestamp = event.block.timestamp entity.counter = counter.current + entity.contractAddress = event.address entity.rootToken = event.params.rootToken entity.childToken = event.params.childToken entity.tokenType = 'ERC1155' @@ -87,6 +88,7 @@ export function handleFxDepositERC1155(event: FxDepositERC1155): void { entity.transactionHash = event.transaction.hash entity.timestamp = event.block.timestamp entity.counter = counter.current + entity.contractAddress = event.address entity.rootToken = event.params.rootToken entity.tokenType = 'ERC1155' entity.userAddress = event.params.userAddress @@ -116,6 +118,7 @@ export function handleFxWithdrawERC1155(event: FxWithdrawERC1155): void { entity.transactionHash = event.transaction.hash entity.timestamp = event.block.timestamp entity.counter = counter.current + entity.contractAddress = event.address entity.rootToken = event.params.rootToken entity.childToken = event.params.childToken entity.tokenType = 'ERC1155' diff --git a/root/src/mappings/fx-erc20.ts b/root/src/mappings/fx-erc20.ts index 1729055..a6ea5a5 100644 --- a/root/src/mappings/fx-erc20.ts +++ b/root/src/mappings/fx-erc20.ts @@ -61,6 +61,7 @@ export function handleTokenMappedERC20(event: TokenMappedERC20): void { entity.transactionHash = event.transaction.hash entity.timestamp = event.block.timestamp entity.counter = counter.current + entity.contractAddress = event.address entity.rootToken = event.params.rootToken entity.childToken = event.params.childToken entity.tokenType = 'ERC20' @@ -87,6 +88,7 @@ export function handleFxDepositERC20(event: FxDepositERC20): void { entity.transactionHash = event.transaction.hash entity.timestamp = event.block.timestamp entity.counter = counter.current + entity.contractAddress = event.address entity.rootToken = event.params.rootToken entity.tokenType = 'ERC20' entity.userAddress = event.params.userAddress @@ -115,6 +117,7 @@ export function handleFxWithdrawERC20(event: FxWithdrawERC20): void { entity.transactionHash = event.transaction.hash entity.timestamp = event.block.timestamp entity.counter = counter.current + entity.contractAddress = event.address entity.rootToken = event.params.rootToken entity.childToken = event.params.childToken entity.tokenType = 'ERC20' diff --git a/root/src/mappings/fx-erc721.ts b/root/src/mappings/fx-erc721.ts index 2c640bf..407e960 100644 --- a/root/src/mappings/fx-erc721.ts +++ b/root/src/mappings/fx-erc721.ts @@ -61,6 +61,7 @@ export function handleTokenMappedERC721(event: TokenMappedERC721): void { entity.transactionHash = event.transaction.hash entity.timestamp = event.block.timestamp entity.counter = counter.current + entity.contractAddress = event.address entity.rootToken = event.params.rootToken entity.childToken = event.params.childToken entity.tokenType = 'ERC721' @@ -87,6 +88,7 @@ export function handleFxDepositERC721(event: FxDepositERC721): void { entity.transactionHash = event.transaction.hash entity.timestamp = event.block.timestamp entity.counter = counter.current + entity.contractAddress = event.address entity.rootToken = event.params.rootToken entity.tokenType = 'ERC721' entity.userAddress = event.params.userAddress @@ -115,6 +117,7 @@ export function handleFxWithdrawERC721(event: FxWithdrawERC721): void { entity.transactionHash = event.transaction.hash entity.timestamp = event.block.timestamp entity.counter = counter.current + entity.contractAddress = event.address entity.rootToken = event.params.rootToken entity.childToken = event.params.childToken entity.tokenType = 'ERC721'