Skip to content

Quantstamp finding updates#90

Merged
Agusx1211 merged 8 commits intoversion-1.5from
quantstamp
Feb 3, 2026
Merged

Quantstamp finding updates#90
Agusx1211 merged 8 commits intoversion-1.5from
quantstamp

Conversation

@ScreamingHawk
Copy link
Contributor

This PR addresses findings observed by Quantstamp during the TrailsUtils audit.

SEQ-3: RequireUtils and TrailsValidator ERC721 Approval Checks Do Not Validate Token Ownership

Added requireERC721Owner and requireERC721OwnerSelf functions.

Added combined bal/allow functions e.g. requireMinERC20BalanceAllowance for ERC20/721/1155 as this will likely be a common pattern.

S-3: README delegatecall surface statement is misleading relative to actual execution behavior

Updated README.

S-4: Unnecessary unchecked blocks

Removed unchecked blocks

S-4: Unused CalldataDecode dependency

Removed unused dep

Other

This includes some simplifications to the RequireUtils tests.

Not included

What Why
SEQ-1: Truncated Hydration Call Index May Mutate the Wrong Call Deliberate optimisation
SEQ-2: Malformed Hydration Payload May Cause Unintended Call Mutation Correct configuration is SDK responsibility
S-1: Missing Input Validation for recoverSapientSignature Deliberate optimisation
S-2: RequireUtils Self Checks Can Be Misapplied Under delegatecall Context See #89
S-4: Deprecated TrailsValidator contract Removed in fe405fa
S-5: Unknown behaviorOnError Values Cause Failed Calls to Emit Success Events This follows Calls logic upstream

@Agusx1211 Agusx1211 merged commit b29e11e into version-1.5 Feb 3, 2026
1 check passed
@Agusx1211 Agusx1211 deleted the quantstamp branch February 3, 2026 18:11
Agusx1211 added a commit that referenced this pull request Feb 11, 2026
* initial commit v1.5

* simplify repo

* dependencies

* initial implementation

* add self requires

* Update openzeppelin-contracts submodule to latest commit 78eb160

* Add replaceBytes and fixes

* hydrate

* Unify tools

* Delete gitkeep

* Add hydrate tx.origin

* Add SequenceDelegate

* forge fmt

* Natively handle delegatecall

* Comments and cleanup

* Fix to message sender and tx origin

* Add receive

* Per call hydrate

* Add 1.5 tests

* forge lint

* Delete makefile

* Update README

* Separate sweep

* Rename SharedProxy -> HydrateProxy

* Allow nested delegate calls

* Sweeping native is optional

* Delegate call to anything on TrailsUtils

* Remove v1 docs

* Fix delegate test

* Add sweep event

* Consistent docstring

* Reorder hydrateAndSweep

* Allow nochainid

* forge fmt

* Delete TrailsValidator script

* forge fmt

* Fix sweep tests

* Add approvals to hydrate

* Separate hydrate type and data flag

* Add repeat-section to malleable sapient (#88)

* Add repeat-section to malleable sapient

* repeat-section failure tests

* consistent docs and func

* Repeat section encoding includes size

* Correct repeat section doc

* Pin foundry version

* Docs update

* Remove TrailsValidator

* Quantstamp finding updates (#90)

* Simplify tests

* SEQ-3 Add 721 owner to RequireUtils

* Add bal/allow require functions

* RequireUtils update terminology

* S-3 Update README re delegatecall context

* S-4 Remove unchecked

* S-4 Unused deps

* Fix comment typo on require utils

---------

Co-authored-by: agusx1211 <aaguilar@polygon.technology>

* Tidy gitignore

* v1.5 Audits

---------

Co-authored-by: Agusx1211 <agusgit@pm.me>
Co-authored-by: agusx1211 <aa@horizon.io>
Co-authored-by: agusx1211 <aaguilar@polygon.technology>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants