-
-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Bug Description
When creating a new TNT via the Factory, the frontend derives the deployed TNT contract address from transaction logs without properly decoding the TNTCreated event.
Additionally, there is a fallback mechanism that slices the transaction hash to construct an address:
0x${txHash.slice(2, 42)}
This fallback does not guarantee a valid deployed contract address and may produce incorrect results.
As a result, the TNT address stored or displayed after creation may be invalid or incorrect.
Steps to Reproduce
-
Navigate to the Create TNT page.
-
Connect a wallet on Scroll Sepolia.
-
Deploy a new TNT via the UI.
-
Observe how the frontend determines the deployed TNT address.
-
Inspect the logic extracting the address from logs.
-
Notice that:
log.datais treated directly as the address without ABI decoding.- A fallback derives an address from the transaction hash.
Logs and Screenshots
No runtime exception is necessarily thrown, but the address extraction logic is incorrect.
Relevant logic pattern:
newTNTAddress = log.data;
Fallback:
newTNTAddress = `0x${txHash.slice(2, 42)}`
This does not guarantee a valid contract address.
Environment Details
No response
Impact
High - Major feature is broken
Code of Conduct
- I have joined the Discord server and will post updates there
- I have searched existing issues to avoid duplicates