Zy0n/update phase - #87
Merged
Merged
Conversation
…createValidTransaction
…ate getMockTokenConfig to accept a symbol parameter
…kenForSymbol for improved token handling
zy0n
marked this pull request as draft
May 16, 2025 21:02
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
zy0n
marked this pull request as ready for review
December 10, 2025 14:38
mattgle
previously approved these changes
Dec 10, 2025
mattgle
approved these changes
Dec 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces enhanced validation for transactions by adding support for relay and proxy contract checks, decoding transaction data, and validating relay-specific calls. It also updates the
createValidTransactionfunction and its usages to include the chain context. Below is a summary of the most important changes:Enhancements to transaction validation:
checkIsProxyAddressandcheckIsRelayAdaptAddresshelper functions. These ensure thetoaddress is a known contract.ABI_RELAY_ADAPTABI, checking if the call is a relay call, and validating the relay call data.Updates to
createValidTransaction:createValidTransactionfunction to accept achainparameter, enabling chain-specific validation for proxy and relay addresses.Integration with existing functionality:
transactMethodinsrc/server/waku-broadcaster/methods/transact-method.tsto pass thechainparameter when callingcreateValidTransaction. [1] [2]ABI and imports:
ABI_RELAY_ADAPTto the list of imported ABIs and exported it for use in transaction validation.ethersto includeInterface,InterfaceAbi, andTransactionDescriptionfor decoding and validating transaction data.Test updates:
createValidTransactionintransaction-validator.test.tsto include the newchainparameter in the function call.