Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cowprotocol/services
/ functions
Functions
10,776 in github.com/cowprotocol/services
⨍
Functions
10,776
◇
Types & classes
3,479
↓ 1 callers
Method
get_trades_v2
Get trades with pagination (v2 endpoint)
crates/e2e/src/setup/services.rs:770
↓ 1 callers
Method
get_user_orders
( &self, owner: &Address, offset: u64, limit: u64, )
crates/orderbook/src/orderbook.rs:543
↓ 1 callers
Method
get_user_total_surplus
Get total surplus for a user (unstable endpoint)
crates/e2e/src/setup/services.rs:868
↓ 1 callers
Method
get_verified_price_estimate
Executes the simulation and checks quote accuracy.
crates/price-estimation/src/trade_verifier.rs:146
↓ 1 callers
Function
get_zeroex_order_amounts
( zeroex: &IZeroex::Instance, zeroex_order: &zeroex::OrderRecord, )
crates/e2e/tests/e2e/liquidity.rs:370
↓ 1 callers
Method
gin_clean_pending_list
Cleans the pending lists of all GIN indexes on `competition_auctions`. An index left out here gets flushed inline by whichever insert pushes its pendi
crates/autopilot/src/database/mod.rs:101
↓ 1 callers
Method
github
(path: &str)
contracts/src/vendor.rs:268
↓ 1 callers
Function
gnosis_safe_prevalidated_signature
Generate a Safe "pre-validated" signature. This is a special "marker" signature that can be used if the account that is executing the transaction is
crates/e2e/src/setup/onchain_components/safe.rs:276
↓ 1 callers
Method
grantRoles
( data: &[u8], )
contracts/generated/contracts-generated/balancerv2authorizer/src/lib.rs:1015
↓ 1 callers
Function
grant_required_roles
( authorizer: &BalancerV2Authorizer::Instance, vault: Address, vault_relayer: Address, )
crates/e2e/src/setup/deploy.rs:310
↓ 1 callers
Function
grid
Factors on the grid the fee math uses, so float noise is not a mismatch.
crates/orderbook/src/fee_engine.rs:272
↓ 1 callers
Method
group_by_factory
Groups registered pools by factory addresses.
crates/liquidity-sources/src/balancer_v2/graph_api.rs:124
↓ 1 callers
Function
group_ticks_by_pool
(rows: Vec<db::PoolTickRow>)
crates/pool-indexer/src/api/uniswap_v3/bulk_ticks.rs:58
↓ 1 callers
Method
handle
(self: Arc<Self>, pending: FastPathOrder, notified_at: Instant)
crates/autopilot/src/fast_path.rs:167
↓ 1 callers
Function
handle_all_routes
( database_write: Postgres, database_read: Postgres, orderbook: Arc<Orderbook>, quotes: QuoteH
crates/orderbook/src/api.rs:160
↓ 1 callers
Method
handle_api_requests
Routes API requests based on order side. - Sell orders: Parallel execution of /swap and /approve-transaction - Buy orders: Sequential execution (swap
crates/solvers/src/infra/dex/okx/mod.rs:235
↓ 1 callers
Method
handle_burn
`handle_mint` with the sign flipped.
crates/pool-indexer/src/indexer/uniswap_v3.rs:955
↓ 1 callers
Method
handle_buy_order
Handle buy orders via the reverse-quote endpoint. Bitget computes the required input amount server-side using a recursive search on top of sell quote
crates/solvers/src/infra/dex/bitget/mod.rs:249
↓ 1 callers
Method
handle_buy_order
Handle buy orders with sequential API requests. Since the approval amount depends on the swap response (`from_token_amount`), we must execute `/swap`
crates/solvers/src/infra/dex/okx/mod.rs:297
↓ 1 callers
Function
handle_connection
( listener: &UnixListener, initial_filter: &str, reload_handle: &reload::Handle<EnvFilter, T>, )
crates/observe/src/tracing/reload_handler.rs:57
↓ 1 callers
Function
handle_connection_with_socket
(mut socket: UnixStream)
crates/observe/src/heap_dump_handler.rs:122
↓ 1 callers
Method
handle_deny_listed_tokens
Checks if the traded tokens are supported by the protocol.
crates/price-estimation/src/sanitized.rs:53
↓ 1 callers
Method
handle_initialize
Records initial price and tick from an `Initialize` event. Preserves any liquidity already seen for the pool in this chunk.
crates/pool-indexer/src/indexer/uniswap_v3.rs:872
↓ 1 callers
Method
handle_mint
Applies a `Mint`: positive tick deltas at the range bounds, plus a pool-liquidity bump if the active tick is in range (see [`Self::apply_position_delt
crates/pool-indexer/src/indexer/uniswap_v3.rs:929
↓ 1 callers
Method
handle_pool_created
Records a new pool, filling decimals from the prefetch cache. Symbols are left `None`: a hung `symbol()` call must not block pool inserts, and the asy
crates/pool-indexer/src/indexer/uniswap_v3.rs:839
↓ 1 callers
Function
handle_request
( client: reqwest::Client, state: ProxyState, req: Request<Body>, )
crates/e2e/src/setup/proxy.rs:135
↓ 1 callers
Function
handle_results
( pool: Result<Option<Pool>>, fee: Result<u32, alloy::contract::Error>, )
crates/liquidity-sources/src/swapr.rs:40
↓ 1 callers
Method
handle_sell_order
Handle sell orders with a single enriched swap API call. Uses `requestMod = "rich"` so `/swap` returns the quote (output amount, gas) and the swap ca
crates/solvers/src/infra/dex/bitget/mod.rs:185
↓ 1 callers
Method
handle_sell_order
Handle sell orders with parallel API requests. Since the approval amount is known upfront from `order.amount`, we can execute `/swap` and `/approve-t
crates/solvers/src/infra/dex/okx/mod.rs:251
↓ 1 callers
Method
handle_swap
Records full pool state (price, liquidity, tick) from a `Swap`.
crates/pool-indexer/src/indexer/uniswap_v3.rs:902
↓ 1 callers
Function
handler
(Path(_uid): Path<OrderUid>)
crates/orderbook/src/api.rs:681
↓ 1 callers
Method
has_execution_plan
Returns whether the solution contains anything that could actually produce the promised buy tokens.
crates/price-estimation/src/trade_finding/mod.rs:126
↓ 1 callers
Function
has_surplus_policy
(fulfillment: &Fulfillment)
crates/driver/src/domain/competition/solution/fee.rs:720
↓ 1 callers
Method
has_tokens
Returns `true` if the reserves correspond to the specified tokens.
crates/driver/src/domain/liquidity/uniswap/v2.rs:63
↓ 1 callers
Method
has_tokens
Returns `true` if the reserves correspond to the specified tokens.
crates/driver/src/domain/liquidity/balancer/v2/weighted.rs:70
↓ 1 callers
Method
has_tokens
Returns `true` if the reserves correspond to the specified tokens.
crates/driver/src/domain/liquidity/balancer/v2/stable.rs:66
↓ 1 callers
Method
has_wrappers
Returns `true` if order appData contains non-empty wrappers
crates/app-data/src/app_data.rs:481
↓ 1 callers
Method
has_zero_leg
Whether a leg scaled down to nothing. The program only accepts a fill moving zero on that side, so no engine can fill the order.
crates/solana-driver/src/domain/auction.rs:382
↓ 1 callers
Function
hash
Used to generate deterministic identifiers (e.g., UIDs, addresses) from string descriptions.
crates/autopilot/src/domain/competition/winner_selection.rs:1285
↓ 1 callers
Method
hashSingleOrder
( data: &[u8], )
contracts/generated/contracts-generated/liquoricesettlement/src/lib.rs:7659
↓ 1 callers
Function
hashed_ethsign_message
(domain_separator: &DomainSeparator, struct_hash: &[u8; 32])
crates/model/src/signature.rs:281
↓ 1 callers
Function
header_value
(s: &str)
crates/ethrpc/src/alloy/rpc_headers.rs:171
↓ 1 callers
Function
healthz
(app: axum::Router<()>)
crates/driver/src/infra/api/routes/healthz.rs:7
↓ 1 callers
Function
hex
(bytes: &[u8])
crates/fee-engine/src/order_view/mod.rs:127
↓ 1 callers
Function
hide_quote_until_filled
Only reveals the quote of orders that have been at least partially filled. That is enough for solvers to audit quote rewards but prevents them from pl
crates/orderbook/src/orderbook.rs:800
↓ 1 callers
Method
holders
`mint`'s largest unfrozen, wallet-owned holders and their balances, largest first. They are looked up again when none holds `needed` and the lookup is
crates/solana-orderbook/src/infra/verifier.rs:519
↓ 1 callers
Method
holds
Whether `field` (exactly `width()` bytes, big-endian) holds `stamp`. Makers stamp milliseconds with sub-second precision, so for that unit any instan
crates/simulator/src/state_override_stream.rs:70
↓ 1 callers
Function
hook_for_transaction
(tx: CallBuilder<&AlloyProvider, D>)
crates/e2e/src/setup/onchain_components/alloy.rs:7
↓ 1 callers
Method
hook_gas
(&self)
crates/shared/src/order_quoting.rs:94
↓ 1 callers
Function
host
Name of a receiver in logs and metrics.
crates/driver/src/infra/config/file/mod.rs:213
↓ 1 callers
Function
i256_exp10
(n: u8)
crates/liquidity-sources/src/balancer_v2/swap/fixed_point/logexpmath.rs:15
↓ 1 callers
Function
i512_to_big_int
(i512: &I512)
crates/number/src/conversions.rs:101
↓ 1 callers
Function
i512_to_u256
TODO: Figure out a nicer way to convert I512 to U256, as a follow-up task
crates/number/src/conversions.rs:116
↓ 1 callers
Method
ignores_legacy_checks_for
Whether a passing simulation may accept this order despite failing legacy checks: it must carry a flashloan hint from an allowlisted lender.
crates/shared/src/order_validation.rs:122
↓ 1 callers
Method
in_given_out
Use the Uniswap constant AMM formula to calculate the input amount based on the output.
crates/driver/src/tests/setup/blockchain.rs:99
↓ 1 callers
Function
in_market
Whether the order's limit sits within its quote: the quote buys at least the limit's rate. The EVM `is_order_outside_market_price` check with the quot
crates/autopilot-svm/src/domain/fee.rs:97
↓ 1 callers
Function
in_token
What `lamports` are worth in the token priced at `price`, rounded up. `None` past `u64::MAX`.
crates/solana-orderbook/src/infra/api/routes/quote/mod.rs:761
↓ 1 callers
Method
includes_delegation
(self)
crates/driver/src/infra/solver/eip7702.rs:225
↓ 1 callers
Method
increase_next_try
Adjusts the next fill amount that should be tried. Doubles the amount to try. This is useful in case the onchain liquidity changed and now allows for
crates/solvers/src/domain/solver/dex/fills.rs:150
↓ 1 callers
Method
index_until_block
( &self, block: BlockInfo, partially_processed_block: &watch::Sender<u64>, ful
crates/autopilot/src/maintenance.rs:153
↓ 1 callers
Function
indexer_lags
Whether the indexer's processed slot trails the tip beyond the allowed lag. A missing slot means the indexer never wrote, which counts as maximal lag.
crates/autopilot-svm/src/infra/provider.rs:454
↓ 1 callers
Function
indexer_pass_snapshot
One full indexer lifecycle (start → wait for head → snapshot → stop). Two calls in sequence over the same DB are how `checkpoint_resume` proves the re
crates/e2e/tests/e2e/pool_indexer.rs:529
↓ 1 callers
Function
info
(app: axum::Router<State>)
crates/driver/src/infra/api/routes/info.rs:3
↓ 1 callers
Function
init
Observability for the Solana orderbook, built on the shared `observe` crate. Set up the observability. The `obs_config` argument configures the tokio
crates/solana-orderbook/src/infra/observe/mod.rs:6
↓ 1 callers
Function
init
Setup the observability. The log argument configures the tokio tracing framework.
crates/driver/src/infra/observe/mod.rs:39
↓ 1 callers
Function
init
Setup the metrics registry.
crates/solvers/src/infra/metrics.rs:27
↓ 1 callers
Function
init_liquidity
( eth: &Ethereum, block_retriever: Arc<dyn BlockRetrieving>, config: &infra::liquidity::config::Un
crates/driver/src/boundary/liquidity/uniswap/v3.rs:109
↓ 1 callers
Function
init_liquidity
( eth: &Ethereum, block_stream: &CurrentBlockWatcher, block_retriever: Arc<dyn BlockRetrieving>,
crates/driver/src/boundary/liquidity/balancer/v2/mod.rs:110
↓ 1 callers
Function
init_metrics
Publishes the `settlement_math_errors` series at zero, so an alert on its `increase()` catches the first failure too.
crates/autopilot-svm/src/infra/order_execution.rs:287
↓ 1 callers
Method
initialize
Resets all the counters to 0 so we can always use them in Grafana queries.
crates/orderbook/src/orderbook.rs:128
↓ 1 callers
Function
initialize_metrics
Create every placement series at zero, so a query over one reads 0 instead of no data before its first order.
crates/solana-orderbook/src/infra/api/routes/create_order/mod.rs:883
↓ 1 callers
Function
initialize_observability
(args: &Arguments)
crates/pool-indexer/src/run.rs:141
↓ 1 callers
Method
initialize_pools
(&self)
crates/liquidity-sources/src/balancer_v2/pool_init.rs:18
↓ 1 callers
Method
inject
(&self, request: RequestBuilder)
crates/autopilot/src/infra/solvers/mod.rs:242
↓ 1 callers
Method
inject
(&self, request: RequestBuilder)
crates/autopilot/src/infra/solvers/dto/solve.rs:251
↓ 1 callers
Method
inner
(&self)
crates/liquidity-sources/src/uniswap_v3/event_fetching.rs:55
↓ 1 callers
Method
inputs
The assets consumed by this interaction. These assets are taken from the settlement contract when the interaction executes.
crates/driver/src/domain/competition/solution/interaction.rs:27
↓ 1 callers
Function
insert
(ex: &mut PgTransaction<'_>, scores: &[Score])
crates/database/src/reference_scores.rs:17
↓ 1 callers
Function
insert
( ex: &mut PgConnection, auction_id: AuctionId, solver: Address, solution_uid: i64, start_
crates/database/src/settlement_executions.rs:22
↓ 1 callers
Method
insert_balance
Only inserts new balances. This should always be used when we needed to fetch a balance because it was requested by a backend component.
crates/account-balances/src/cached.rs:49
↓ 1 callers
Function
insert_batch
( ex: &mut PgConnection, fee_policies: impl IntoIterator<Item = FeePolicy>, )
crates/database/src/fee_policies.rs:40
↓ 1 callers
Method
insert_full_app_data
( &self, contract_app_data: &AppDataHash, full_app_data: &str, )
crates/orderbook/src/database/app_data.rs:28
↓ 1 callers
Function
insert_interactions
( ex: &mut PgConnection, order: &OrderUid, interactions: &[Interaction], )
crates/database/src/orders.rs:311
↓ 1 callers
Function
insert_invalidation
( ex: &mut PgConnection, index: &EventIndex, event: &Invalidation, )
crates/database/src/events.rs:93
↓ 1 callers
Method
insert_many
Record every observed `(token, price)`.
crates/driver/src/domain/competition/native_price_cache.rs:34
↓ 1 callers
Function
insert_order_parts_in_db
(db: &mut PgConnection, order_parts: &EthflowOrderParts)
crates/database/src/ethflow_orders.rs:337
↓ 1 callers
Function
insert_pools
( tx: &mut Transaction<'_, Postgres>, factory: &Address, pools: &[NewPoolData], )
crates/pool-indexer/src/db/uniswap_v3.rs:78
↓ 1 callers
Function
insert_quotes
(ex: &mut PgConnection, quotes: &[Quote])
crates/database/src/orders.rs:410
↓ 1 callers
Function
instrument
( estimator: T, name: impl Into<String>, )
crates/price-estimation/src/factory.rs:595
↓ 1 callers
Function
interaction
( interaction: &solution::Interaction, settlement: &Address, )
crates/driver/src/domain/quote.rs:385
↓ 1 callers
Function
interaction_data_from_domain
(interaction_data: &[eth::Interaction])
crates/solvers/src/api/routes/solve/dto/solution.rs:137
↓ 1 callers
Method
into_best_and_rest
(self)
crates/price-estimation/src/lib.rs:278
↓ 1 callers
Method
into_chunk_changes
(self)
crates/pool-indexer/src/indexer/uniswap_v3.rs:1045
↓ 1 callers
Method
into_dex_solution
Creates a full solution for a single order solution given gas and sell token prices. Computes the fee internally from the gas parameters.
crates/solvers/src/domain/solution.rs:201
↓ 1 callers
Function
into_domain
( receipt: TransactionReceipt, trace: CallFrame, timestamp: u64, )
crates/autopilot/src/infra/blockchain/mod.rs:173
↓ 1 callers
Function
into_domain
Converts a data transfer object into its domain object representation.
crates/solvers/src/api/routes/solve/dto/auction.rs:13
↓ 1 callers
Method
into_domain
( self, eth: &Ethereum, tokens: &tokens::Fetcher, app_data: HashMap<Arc<AppDat
crates/driver/src/infra/api/routes/solve/dto/solve_request.rs:31
↓ 1 callers
Method
into_domain
(self)
crates/autopilot/src/infra/persistence/dto/order.rs:330
↓ 1 callers
Method
into_inner
(self)
crates/driver/src/infra/config/file/mod.rs:495
↓ 1 callers
Method
into_settle_call
(&self)
crates/simulator/src/encoding.rs:78
← previous
next →
3,001–3,100 of 10,776, ranked by callers