refactor(stdlib): consolidate find-function-by-selector helpers#23008
Merged
Conversation
ee7d882 to
fca916d
Compare
4620c69 to
544c520
Compare
fca916d to
0b5052d
Compare
544c520 to
bd45d90
Compare
This was referenced May 7, 2026
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
bd45d90 to
761b425
Compare
0b5052d to
50fe709
Compare
761b425 to
dc6a7b5
Compare
50fe709 to
cf63e74
Compare
dc6a7b5 to
ee3005d
Compare
cf63e74 to
721ca99
Compare
ee3005d to
52a8355
Compare
52a8355 to
875d840
Compare
721ca99 to
7b2bf7e
Compare
2 tasks
7b2bf7e to
f752939
Compare
952c942 to
9ea80fe
Compare
f752939 to
5eab42b
Compare
9ea80fe to
d93eec1
Compare
5eab42b to
bad11ee
Compare
d93eec1 to
7cdc4d6
Compare
6ee0009 to
bc31ce0
Compare
61dc935 to
48179ec
Compare
1f320fd to
c05adb8
Compare
48179ec to
7f6ff8d
Compare
c05adb8 to
e7a14dc
Compare
7f6ff8d to
9204319
Compare
e7a14dc to
aef8c87
Compare
9204319 to
191de66
Compare
Thunkar
approved these changes
May 8, 2026
aef8c87 to
85ac33c
Compare
191de66 to
ed33fbc
Compare
Base automatically changed from
db/fastforward-contract-update
to
merge-train/fairies
May 8, 2026 14:04
The same artifact lookup loop was duplicated three times — as ContractStore's private #findFunctionArtifactBySelector and #findFunctionAbiBySelector, and as a local helper inside ProxiedContractStoreFactory. Hoist the two variants into stdlib/abi as findFunctionArtifactBySelector and findFunctionAbiBySelector so both ContractStore and the proxied store call the same primitive. Also have the existing throwing getFunctionArtifact helper reuse findFunctionArtifactBySelector for its selector branch.
ed33fbc to
f223560
Compare
github-merge-queue Bot
pushed a commit
that referenced
this pull request
May 10, 2026
BEGIN_COMMIT_OVERRIDE fix: include sqlite binary in its npm package (#23039) fix: add sendMessagesAs to wallet api schemas (#23041) refactor(pxe): deduplicate tx hash lookups in MessageContextService (#23075) refactor(pxe): batch tagged private log queries across all secrets (#23048) refactor(pxe): batch log RPC calls in LogService.fetchLogsByTag (#23088) feat(pxe,nr): flesh out account stubs and don't exclude syncing for overrides (#23054) feat: deploy method refactor 2 (#23033) feat: fastForwardContractUpdate cheatcode for simulating contract updates (#22905) refactor(stdlib): consolidate find-function-by-selector helpers (#23008) feat(ci): Snapshots for aztec-nr contract compilation failures and nargo expand (#23061) chore: kv store test fully on vitest (#23096) refactor(pxe): skip redundant getBlock RPC when querying at anchor block (#23100) chore(playground): bump main chunk size limit 1750 → 1800 KB (#23107) feat(txe): allow authorizing cross-contract utility calls in nr tests (#23064) chore: bench public fns with emit repro (#23105) END_COMMIT_OVERRIDE
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.

Summary
Addresses comment #22957 (comment)
The same artifact-lookup loop was duplicated three times. Puts two helper fns in
stdlib/abi:findFunctionArtifactBySelector(artifact, selector)— searchesartifact.functions, returnsFunctionArtifact | undefined.findFunctionAbiBySelector(artifact, selector)— searchesartifact.functions ∪ nonDispatchPublicFunctionsviagetAllFunctionAbis, returnsFunctionAbi | undefined.Both
ContractStoreandProxiedContractStoreFactorynow call the same stdlib primitive. The existing throwinggetFunctionArtifacthelper also reusesfindFunctionArtifactBySelector.Test plan
yarn workspace @aztec/pxe test src/storage/contract_store/contract_store.test.tsyarn workspace @aztec/stdlib test src/abi/abi.test.tsyarn lint pxe,yarn lint stdlib