Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cowprotocol/services
/ functions
Functions
10,747 in github.com/cowprotocol/services
⨍
Functions
10,747
◇
Types & classes
3,488
↓ 1 callers
Function
ray_div
Ray-division: `(a * RAY + b/2) / b`, round-half-up. Matches Aave's `WadRayMath.rayDiv` bit-for-bit so the scaled amount we write into storage equals t
crates/balance-overrides/src/balance/aave.rs:100
↓ 1 callers
Function
read_by_auction_ids
( ex: &mut PgConnection, auction_ids: &[AuctionId], )
crates/database/src/settlement_executions.rs:79
↓ 1 callers
Function
read_by_order_uid
( ex: &mut PgConnection, order_uid: &OrderUid, )
crates/database/src/order_execution.rs:64
↓ 1 callers
Method
read_funding
What funds a simulated sell of the order's sell mint, read from the chain: its authority, or its largest holders once the authority is revoked.
crates/solana-orderbook/src/infra/verifier.rs:468
↓ 1 callers
Method
read_holders
The unfrozen, wallet-owned token accounts among `accounts`, in order, with their owners and balances.
crates/solana-orderbook/src/infra/verifier.rs:561
↓ 1 callers
Function
read_line
(socket: &mut UnixStream)
crates/observe/src/heap_dump_handler.rs:246
↓ 1 callers
Function
read_line
(socket: &mut UnixStream)
crates/observe/src/tracing/reload_handler.rs:99
↓ 1 callers
Function
read_order
( ex: &mut PgConnection, uid: &OrderUid, )
crates/database/src/jit_orders.rs:185
↓ 1 callers
Function
read_pool
Connect the read pool: the replica URL wins when configured, and every connection gets the read statement timeout.
crates/solana-orderbook/src/run.rs:25
↓ 1 callers
Function
read_quote
Read one stored quote. `None` when the id is unknown.
crates/solana-orderbook/src/infra/db.rs:634
↓ 1 callers
Method
reason
(&self)
crates/autopilot/src/fast_path.rs:579
↓ 1 callers
Function
receivable_native_payout
Whether `wallet` can take the order's native SOL payout. A credit that leaves a wallet under its rent-exempt minimum reverts the settlement, so a wall
crates/autopilot-svm/src/infra/provider.rs:581
↓ 1 callers
Function
receivable_orders
Drop orders whose buy token account cannot receive the payout at `FinalizeSettle` and is not the missing associated token account of the wallet it bel
crates/autopilot-svm/src/infra/provider.rs:214
↓ 1 callers
Method
receiver
(&self)
crates/driver/src/domain/competition/solution/trade.rs:102
↓ 1 callers
Method
receiver
The address which will receive the output of this order. If a custom receiver address was specified by the user explicitly, return that address. Other
crates/driver/src/domain/competition/order/mod.rs:165
↓ 1 callers
Function
record
(tx: &mut PgTransaction<'_>, label: database::solana::OrderEventLabel)
crates/autopilot-svm/src/infra/db.rs:1314
↓ 1 callers
Method
record_dead_creations
Record each pending sponsored order the cut drops for a dead creation, once: an `invalid` event and an info line, the same record a creation found dea
crates/autopilot-svm/src/infra/provider.rs:137
↓ 1 callers
Method
record_into_liquidity
Turns 0x OrderRecord into liquidity which solvers can use.
crates/solver/src/liquidity/zeroex.rs:55
↓ 1 callers
Method
record_override_result
(&self, result: OverrideResult)
crates/simulator/src/state_override_stream.rs:563
↓ 1 callers
Method
record_skipped
Record a winner skipped before dispatch. Its window closes as rejected right away, which frees its orders for the next cut.
crates/autopilot-svm/src/infra/observation.rs:118
↓ 1 callers
Function
recover_flashloans_and_wrappers
( order: &competition::Order, )
crates/driver/src/domain/competition/solution/mod.rs:112
↓ 1 callers
Function
recover_jit_order_owner
Recovers the owner and signature from a `JitOrder`.
crates/price-estimation/src/trade_verifier.rs:926
↓ 1 callers
Method
reduce_next_try
Adjusts the next fill amount that should be tried. Always halves the last tried amount.
crates/solvers/src/domain/solver/dex/fills.rs:140
↓ 1 callers
Method
reencode_quote_solution
( &self, auction_id: auction::Id, quote_id: crate::domain::quote::Id, mut orde
crates/driver/src/domain/competition/mod.rs:565
↓ 1 callers
Function
reference_scores
( ex: &mut PgConnection, auction_id: i64, )
crates/e2e/tests/e2e/database.rs:106
↓ 1 callers
Method
refresh
One refresher pass: refetch the maintained tokens nearing expiry, so lookups keep hitting fresh entries. A failed pass only logs, the entries then exp
crates/autopilot-svm/src/infra/prices.rs:321
↓ 1 callers
Function
refuses_non_confidential_credits
Whether the account's confidential transfer extension refuses credits to its regular balance.
crates/solana-token/src/lib.rs:299
↓ 1 callers
Function
register
Registers metrics in the global registry, e.g. from the `OnceLock` that holds a metrics struct. The lock is not re-entrant, so the closure must not in
crates/observe/src/client_metrics.rs:26
↓ 1 callers
Function
register_anvil_accounts
Registers accounts pre-funded by anvil in the wallet.
crates/e2e/src/setup/mod.rs:239
↓ 1 callers
Function
registry_frame
A frame quoting `lanes` of the shared registry on behalf of `venue`.
crates/simulator/src/state_override_stream.rs:670
↓ 1 callers
Method
regular_swap_given_in
Comes from `_onRegularSwap(true, ...)`: https://etherscan.io/address/0xf9ac7B9dF2b3454E841110CcE5550bD5AC6f875F#code#F2#L270
crates/liquidity-sources/src/balancer_v2/swap/mod.rs:224
↓ 1 callers
Method
regular_swap_given_out
Comes from `_onRegularSwap(false, ...)`: https://etherscan.io/address/0xf9ac7B9dF2b3454E841110CcE5550bD5AC6f875F#code#F2#L270
crates/liquidity-sources/src/balancer_v2/swap/mod.rs:252
↓ 1 callers
Function
reject_settlement_window
Close a window whose settlement provably never reached the chain. The window spans no slots, so it ends where it started. Only an open window closes:
crates/autopilot-svm/src/infra/db.rs:267
↓ 1 callers
Method
relative
Returns the minimum surplus for the specified token amount.
crates/solvers/src/domain/dex/minimum_surplus.rs:30
↓ 1 callers
Method
release
Releases the leader lock if it was held Should be called after breaking out of run loop (for example: due to shutdown)
crates/autopilot/src/leader_lock_tracker.rs:67
↓ 1 callers
Method
relevant_pairs
All pool token pairs that could be used along a path candidate for these token pairs.
crates/liquidity-sources/src/base_tokens.rs:37
↓ 1 callers
Method
remaining_maker_amount
Scales the `maker_amount` according to how much of the partially fillable amount was already used.
crates/liquidity-sources/src/zeroex.rs:223
↓ 1 callers
Method
remaining_stages
(&self)
crates/price-estimation/src/competition/mod.rs:194
↓ 1 callers
Method
removeSolver
( data: &[u8], )
contracts/generated/contracts-generated/gpv2allowlistauthentication/src/lib.rs:1511
↓ 1 callers
Method
remove_cached_blocks_older_than
(&mut self, oldest_to_keep: u64)
crates/liquidity-sources/src/recent_block_cache.rs:485
↓ 1 callers
Function
render
Serialize the driver config for a colocated test driver to a TOML string.
crates/e2e/src/setup/colocation/driver_config.rs:9
↓ 1 callers
Function
replace_current_auction
Replace the current auction and answer the id its identity column allocated, the source of sequential auction ids.
crates/autopilot-svm/src/infra/db.rs:504
↓ 1 callers
Method
replace_current_auction
( &self, new_auction_id: dto::AuctionId, json: Bytes, )
crates/autopilot/src/database/auction.rs:123
↓ 1 callers
Function
replace_events
( transaction: &mut PgTransaction<'_>, events: Vec<(GPv2SettlementEvents, Log)>, from_block: u64,
crates/autopilot/src/database/events.rs:95
↓ 1 callers
Method
replace_order
Replaces the `old_order` with `validated_new_order` in the database (cancels the old one and inserts the new one), but not before performing some vali
crates/orderbook/src/orderbook.rs:461
↓ 1 callers
Function
report
Logs the fee policies if they disagree, and counts the outcome.
crates/autopilot/src/fee_engine.rs:170
↓ 1 callers
Function
report_winner_by_name
Logs the winning estimate and, if it is a quote, counts the win for its estimator.
crates/price-estimation/src/competition/mod.rs:166
↓ 1 callers
Function
request
(uid: &str)
crates/orderbook/src/api.rs:688
↓ 1 callers
Method
request
( &self, url: Url, set_current_block_header: bool, )
crates/liquidity-sources/src/zeroex.rs:416
↓ 1 callers
Function
request_sent
()
crates/solvers/src/infra/metrics.rs:52
↓ 1 callers
Method
requests_for_order
(&self, order: &Order)
crates/solvers/src/domain/solver/baseline.rs:273
↓ 1 callers
Method
required_balance
The balance required to ensure settlement execution with the given gas parameters.
crates/driver/src/domain/competition/solution/settlement.rs:449
↓ 1 callers
Function
requires_cancellation
Whether a submitted settlement whose receipt is missing should be cancelled. We cancel only when the re-simulation reverts and the signer's pending no
crates/driver/src/domain/mempools.rs:650
↓ 1 callers
Method
requires_setup
A signature check requires setup when there are interactions to be taken into account or when the balance override is set. Interactions require setup
crates/signature-validator/src/lib.rs:53
↓ 1 callers
Method
resend_transaction
Send a transaction again, without the preflight simulation and without the node's own rebroadcasts. A copy of a transaction the cluster already proces
crates/cow-solana-rpc/src/lib.rs:440
↓ 1 callers
Method
reserves_without_bpt
This method returns an iterator over the stable pool reserves while filtering out the BPT token for the pool (i.e. the pool address). This is used bec
crates/liquidity-sources/src/balancer_v2/swap/mod.rs:183
↓ 1 callers
Method
reset_requests_complete
(&self, method: &str, path: &str)
crates/solana-orderbook/src/infra/api/mod.rs:453
↓ 1 callers
Method
reset_requests_complete
(&self, method: &str, path: &str)
crates/orderbook/src/api.rs:401
↓ 1 callers
Method
reset_requests_rejected
(&self)
crates/solana-orderbook/src/infra/api/mod.rs:445
↓ 1 callers
Method
reset_requests_rejected
(&self)
crates/orderbook/src/api.rs:393
↓ 1 callers
Method
resimulate_until_revert
Re-simulate all proposed solutions on every new block and drop any that start reverting. Returns once every solution has reverted; otherwise runs fore
crates/driver/src/domain/competition/mod.rs:623
↓ 1 callers
Method
resolve_app_data
Resolves the order's app-data hash to the underlying JSON if it isn't already resolved.
crates/driver/src/domain/competition/pre_processing.rs:87
↓ 1 callers
Method
resolve_protocol_instruction
Resolve the program against `account_keys`, keeping the instruction only if that program is the settlement or SolFlow program. The `accounts` field ke
crates/solana-indexer/src/indexer/decoder.rs:782
↓ 1 callers
Function
resolved
()
crates/solana-driver/src/domain/buy_token_accounts.rs:70
↓ 1 callers
Function
response_body_with_size_limit
Extracts the bytes of the response up to some size limit. Returns an error if the byte limit was exceeded.
crates/autopilot/src/infra/solvers/mod.rs:218
↓ 1 callers
Function
response_ids
The solution ids in a `/solve` response body, in response order.
crates/solana-driver/tests/api.rs:366
↓ 1 callers
Method
response_ok
Resets back off and stops rate limiting requests.
crates/rate-limit/src/lib.rs:49
↓ 1 callers
Method
response_rate_limited
Returns updated back off if no other thread increased it in the mean time.
crates/rate-limit/src/lib.rs:72
↓ 1 callers
Function
retry_node_call
Retries `f` while the error is a transient transport failure (`is_node_error`). Contract reverts and decoding failures bail out immediately. On giveup
crates/pool-indexer/src/indexer/uniswap_v3.rs:408
↓ 1 callers
Function
retry_with_sleep
Retry on every error.
crates/shared/src/retry.rs:9
↓ 1 callers
Function
reveal
(router: axum::Router<State>)
crates/driver/src/infra/api/routes/reveal/mod.rs:14
↓ 1 callers
Method
reveal
(&self, request: reveal::Request)
crates/autopilot/src/infra/solvers/mod.rs:117
↓ 1 callers
Function
reveal_req
Create a request for the driver /reveal endpoint.
crates/driver/src/tests/setup/driver.rs:158
↓ 1 callers
Function
revealed
(solver: &solver::Name, result: &Result<competition::Revealed, competition::Error>)
crates/driver/src/infra/observe/mod.rs:190
↓ 1 callers
Function
revealing
()
crates/driver/src/infra/observe/mod.rs:186
↓ 1 callers
Method
reverts_can_get_mined
(&self)
crates/driver/src/infra/mempool/mod.rs:180
↓ 1 callers
Method
reverts_on_block
Re-simulate a single solution and return its id if it started reverting on this block. Reports metrics and solver notifications as a side effect.
crates/driver/src/domain/competition/mod.rs:660
↓ 1 callers
Method
rotate_backends
Rotates to the next backend by moving the current backend to the end of the queue.
crates/e2e/src/setup/proxy.rs:56
↓ 1 callers
Function
round_trip_for_error
( db: &mut PgConnection, placement_error: Option<OnchainOrderPlacementError>,
crates/database/src/onchain_broadcasted_orders.rs:133
↓ 1 callers
Function
router
Builds the axum `Router` for the pool-indexer API, and mounts the routes and the metrics middleware.
crates/pool-indexer/src/api/routes.rs:21
↓ 1 callers
Function
router
()
crates/orderbook/src/api.rs:684
↓ 1 callers
Method
router
(&self)
crates/solver/src/liquidity/uniswap_v2.rs:94
↓ 1 callers
Function
rpc
Creates an [`RpcClient`] from the given URL with [`LabelingLayer`], [`InstrumentationLayer`], [`TracingRequestIdLayer`], [`BatchCallLayer`] and [`RpcH
crates/ethrpc/src/alloy/mod.rs:28
↓ 1 callers
Function
rules
()
crates/fee-engine/tests/rules.rs:34
↓ 1 callers
Function
run
Runs the driver, blocking until the shutdown signal is received.
crates/solana-driver/src/run.rs:39
↓ 1 callers
Function
run
(args: arguments::Arguments)
crates/refunder/src/lib.rs:54
↓ 1 callers
Function
run
Runs the orderbook, blocking until the shutdown signal is received.
crates/solana-orderbook/src/run.rs:84
↓ 1 callers
Function
run
(config: Configuration)
crates/pool-indexer/src/run.rs:67
↓ 1 callers
Function
run
Assumes tracing and metrics registry have already been set up.
crates/autopilot/src/run.rs:195
↓ 1 callers
Function
run
( args: impl IntoIterator<Item = String>, bind: Option<oneshot::Sender<SocketAddr>>, )
crates/solvers/src/run.rs:18
↓ 1 callers
Function
run
(config: Config, start_slot: Option<u64>)
crates/solana-indexer/src/run.rs:72
↓ 1 callers
Function
run
(config: Configuration)
crates/orderbook/src/run.rs:104
↓ 1 callers
Function
run
(config: Config)
crates/autopilot-svm/src/run.rs:92
↓ 1 callers
Function
run
(artifacts_dir: &Path)
contracts/src/vendor.rs:12
↓ 1 callers
Method
run
Drain the update stream until it ends or the decoder hangs up. Returns `Ok(())` when the decoder dropped its receiver (clean shutdown), or [`Err(Erro
crates/solana-indexer/src/indexer/ingester.rs:109
↓ 1 callers
Method
run
(self, mut handler: impl NotifyHandler)
crates/autopilot-svm/src/infra/listen.rs:55
↓ 1 callers
Method
run_connection
One connection lifecycle: subscribe, seed, then drain until the connection drops. When the listener silently reconnects, `try_recv` yields `None` and
crates/autopilot-svm/src/infra/listen.rs:69
↓ 1 callers
Function
run_database_metrics_work
(db: Postgres)
crates/autopilot/src/database/mod.rs:170
↓ 1 callers
Function
run_decimals_backfill_pass
( provider: &AlloyProvider, db: &sqlx::PgPool, network: &NetworkName, prefetch_concurrency: us
crates/pool-indexer/src/indexer/uniswap_v3.rs:581
↓ 1 callers
Method
run_essential_maintenance
Runs all the maintenance tasks that are needed to ensure the next auction gets built using the most up-to-date information.
crates/autopilot/src/maintenance.rs:199
← previous
next →
3,401–3,500 of 10,747, ranked by callers