From b5e747f04ae50f789d40f6e0bef6658f8d07a8c0 Mon Sep 17 00:00:00 2001 From: konstantinabl Date: Wed, 11 Dec 2024 11:13:08 +0200 Subject: [PATCH] fix: improves getContractAddressFromReceipt (#3323) improves getContractAddressFromReceipt Signed-off-by: Konstantina Blazhukova --- packages/relay/src/lib/eth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/relay/src/lib/eth.ts b/packages/relay/src/lib/eth.ts index ccb4180a6..e3bc5f4a3 100644 --- a/packages/relay/src/lib/eth.ts +++ b/packages/relay/src/lib/eth.ts @@ -2390,8 +2390,8 @@ export class EthImpl implements Eth { } // Handle system contract creation - // reason for substring from the 90th character is described in the design doc in this repo: docs/design/hts_address_tx_receipt.md - const tokenAddress = receiptResponse.call_result.substring(90); + // reason for substring is described in the design doc in this repo: docs/design/hts_address_tx_receipt.md + const tokenAddress = receiptResponse.call_result.substring(receiptResponse.call_result.length - 40); return prepend0x(tokenAddress); }