Custom scope
What is Custom Scope?
Custom scopes let you run queries against your own set of deployed Solidity contracts instead of an entire chain. This makes queries run faster and gives you precise control over what contracts you work with.
Why it matters
Iterate faster Executing against a full chain can take from a couple of seconds to minutes. With a custom scope, it only takes seconds because you’re querying just a handful of contracts.
Signal over noise Focus on the exact contracts you care about while you iterate on detections.
Tighter feedback loop Quickly harden queries before you scale them to chain-wide runs.
Use case: Rapid incident response
Scenario: a new vulnerability is exploited and you want to ship a Glider query to find other occurrences on-chain.
Collect addresses Gather the deployed addresses of the vulnerable contracts (from the incident write-up, explorer).
Create a custom scope Put those addresses in a new scope and compile.
Develop your query Iterate on the query against the custom scope until it reliably flags the vulnerable contracts.
Scale up safely Once your query is stable, switch execution to the relevant chain and run it broadly to find additional affected contracts or patterns.
Repeat as needed: refine the query in the scope, then re-run on chain to widen coverage.
Use case: Hitting memory or output limit
If your query hits a memory or output limit, you likely need to narrow it down. Check Performance → Profiler, or compile a custom scope and iterate your query against a handful of contracts.
Create a custom scope
Open My Scopes → click Create new scope.
Add contracts Add up to 5 addresses from verified contracts on 30+ supported chains.
Compile Compilation takes up to a minute
Query your scope Once compiled, click Open in IDE to start querying the scope
Limitations
Users are limited to a single custom scope. You can edit your scope unlimited number of times.
Users are limited to deployed contracts only. You may want to deploy your contract on Sepolia if it's not on chain yet.
Users are limited to 5 contracts.
Users can only add verified contracts. Meaning that if the contract owner didn't verify the source code, it won't be visible.
Only scopes with the Compiled successfully status appear in the Execution Scope selector. Pick the scope, then run your queries
Last updated