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
Function
build_order
Assemble the order row from the validated intent.
crates/solana-orderbook/src/infra/api/routes/create_order/mod.rs:1183
↓ 1 callers
Function
build_order_quote_response
( request: &OrderQuoteRequest, quote: &Quote, adjusted: &AdjustedQuoteData, id: Option<model::
crates/orderbook/src/quoter.rs:378
↓ 1 callers
Function
build_override
Builds a state override that makes `balanceOf(holder)` on the aToken report approximately `amount`. Writes into the canonical `_userState` slot (`USER
crates/balance-overrides/src/balance/aave.rs:140
↓ 1 callers
Function
build_penalty_cap_calculator
Builds the penalty cap calculator by fetching the USD reference token's decimals and initial native price. Panics when either fetch fails.
crates/autopilot/src/run.rs:830
↓ 1 callers
Function
build_provider
(network: &NetworkConfig)
crates/pool-indexer/src/run.rs:274
↓ 1 callers
Method
build_settle_call
Generates the calldata for the underlying `settle()` call as well as all the required state overrides (user approval, sell_token balance, order signat
crates/price-estimation/src/trade_verifier.rs:283
↓ 1 callers
Method
build_simulation_call
Passes the prepared `settle_call` to the simulation machinery which makes sure all the pre-conditions are met and collects additional information thro
crates/price-estimation/src/trade_verifier.rs:183
↓ 1 callers
Function
builder_response_time
Observe how long a block builder took to answer a settlement bundle.
crates/driver/src/infra/observe/mod.rs:433
↓ 1 callers
Function
builders_submission_result
Log the submission of a settlement to the block builders.
crates/driver/src/infra/observe/mod.rs:402
↓ 1 callers
Method
bulk_fetch_denominated_in_token
Fetches the prices of the given tokens denominated in the given token.
crates/price-estimation/src/native/coingecko.rs:181
↓ 1 callers
Method
bundle_blocks
The blocks targeted by the bundles, in ascending order.
crates/driver/src/tests/setup/builder.rs:54
↓ 1 callers
Function
bundle_submission
Observe how far the settlement bundle for `block` got with a block builder.
crates/driver/src/infra/observe/mod.rs:441
↓ 1 callers
Function
buy
(uid: u8, buy_amount: u64, sell_limit: u64)
crates/solana-solvers/src/domain/solver/mod.rs:902
↓ 1 callers
Method
buy_amount
The effective amount the user received after all fees. Note how the `executed` amount is used to build actual traded amounts. Settlement contract us
crates/driver/src/domain/competition/solution/scoring.rs:188
↓ 1 callers
Method
buy_amount
The buy amount with the surplus factor.
crates/driver/src/tests/setup/blockchain.rs:162
↓ 1 callers
Function
buy_token_account
()
crates/solana-driver/tests/api.rs:85
↓ 1 callers
Function
buy_token_account_candidates
(request: &dto::Request, program: TokenProgram)
crates/solana-orderbook/src/infra/api/routes/quote/mod.rs:936
↓ 1 callers
Function
buy_token_destination_from_domain
( value: BuyTokenDestination, )
crates/driver/src/infra/solver/dto/auction.rs:341
↓ 1 callers
Function
by_permissiveness
Orders the orders of one side by their limit price, the least buy per unit sold first: the lowest minimum out for a sell, the highest maximum in for a
crates/solana-solvers/src/domain/solver/mod.rs:299
↓ 1 callers
Method
cache_approval_address
Helper to cache approval addresses.
crates/solvers/src/infra/dex/okx/mod.rs:344
↓ 1 callers
Function
cache_config
The default pool caching configuration to use.
crates/driver/src/boundary/liquidity/mod.rs:29
↓ 1 callers
Method
cache_missing_tokens
Ensures that all the missing tokens are in the cache afterwards while taking into account that the function might be called multiple times for the sam
crates/driver/src/infra/tokens.rs:198
↓ 1 callers
Method
cache_quote_solution
Cache a fast-path quote's solution under this solver's account, to be settled later via [`Competition::reencode_quote_solution`].
crates/driver/src/domain/competition/mod.rs:549
↓ 1 callers
Method
caching_native_price_estimator
Creates a [`CachingNativePriceEstimator`] that wraps a native price estimator with an in-memory cache. If `eip4626` is enabled, the estimator is wrap
crates/price-estimation/src/factory.rs:465
↓ 1 callers
Function
calculate_analytic_invariant_two_tokens
interpreted from https://github.com/balancer-labs/balancer-v2-monorepo/blob/stable-deployment/pvt/helpers/src/models/pools/stable/math.ts#L53
crates/liquidity-sources/src/balancer_v2/swap/stable_math.rs:230
↓ 1 callers
Function
calculate_custom_prices
Calculate custom clearing prices excluding protocol fees. This adjusts prices to reflect the trade without the accumulated fees.
crates/protocol-fees/src/lib.rs:552
↓ 1 callers
Function
calculate_custom_prices
( trade: &Trade, protocol_fee: eth::SurplusTokenAmount, )
crates/driver/src/domain/competition/solution/scoring.rs:446
↓ 1 callers
Function
calculate_custom_prices
( trade: &Trade, protocol_fee: eth::SurplusTokenAmount, )
crates/autopilot/src/domain/settlement/trade/math.rs:460
↓ 1 callers
Function
calculate_fee
( fulfillment: &Fulfillment, price_limits: PriceLimits, prices: ClearingPr
crates/driver/src/domain/competition/solution/fee.rs:459
↓ 1 callers
Method
calculate_quote
( &self, request: &OrderQuoteRequest, )
crates/orderbook/src/quoter.rs:133
↓ 1 callers
Method
calculate_quote_stream
( &self, request: &OrderQuoteRequest, )
crates/orderbook/src/quoter.rs:185
↓ 1 callers
Function
calculate_status
(order: &FullOrder)
crates/orderbook/src/database/orders.rs:556
↓ 1 callers
Method
call_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/signatures/src/lib.rs:1040
↓ 1 callers
Method
call_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/uniswapv3swaprouterv2/src/lib.rs:456
↓ 1 callers
Method
call_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/deadlinecheck/src/lib.rs:722
↓ 1 callers
Method
call_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/balancerv2noprotocolfeeliquiditybootstrappingpoolfactory/src/lib.rs:839
↓ 1 callers
Method
call_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/balancerv2liquiditybootstrappingpoolfactory/src/lib.rs:825
↓ 1 callers
Method
call_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/anyoneauthenticator/src/lib.rs:493
↓ 1 callers
Method
call_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/gnosissafeproxyfactory/src/lib.rs:738
↓ 1 callers
Method
call_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/balancerv2weightedpool2tokensfactory/src/lib.rs:898
↓ 1 callers
Method
call_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/balancerv2weightedpoolfactory/src/lib.rs:878
↓ 1 callers
Method
call_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/spardose/src/lib.rs:513
↓ 1 callers
Method
call_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/balances/src/lib.rs:1145
↓ 1 callers
Method
call_builder
Creates a new call builder using this contract instance's provider and address. Note that the call can be any function call, not just those defined i
contracts/generated/contracts-generated/erc1271signaturevalidator/src/lib.rs:460
↓ 1 callers
Function
call_context
(index: u64)
crates/ethrpc/src/alloy/buffering.rs:609
↓ 1 callers
Method
can_be_applied_to_any_holder
Returns whether the strategy can cheaply compute the necessary state override for any given holder or if it only works for the original holder it was
crates/balance-overrides/src/balance/mod.rs:221
↓ 1 callers
Method
can_receive_eth
(&self, address: Address)
crates/refunder/src/infra/chain.rs:39
↓ 1 callers
Method
can_transfer
( &self, query: &Query, amount: U256, )
crates/account-balances/src/simulation.rs:102
↓ 1 callers
Method
can_transfer
( &self, query: &Query, amount: U256, )
crates/account-balances/src/cached.rs:196
↓ 1 callers
Method
cancel_order
(&self, order_uid: &OrderUid, now: DateTime<Utc>)
crates/orderbook/src/database/orders.rs:262
↓ 1 callers
Method
cancel_order_single
Cancel a single order (deprecated endpoint)
crates/e2e/src/setup/services.rs:845
↓ 1 callers
Function
carries_stamp
Whether `word` carries `stamp` anywhere, in any unit.
crates/simulator/src/state_override_stream.rs:108
↓ 1 callers
Method
catch_up
Cold-seeds a factory by replaying on-chain history from `from_block` up to the current finalized block, then returns. Loops in case more blocks finali
crates/pool-indexer/src/indexer/uniswap_v3.rs:155
↓ 1 callers
Method
cd_order_executed
Ensure that the onchain balances changed in accordance with the [`cd_order`].
crates/driver/src/tests/setup/mod.rs:1870
↓ 1 callers
Function
ceil_div
(x: eth::U256, y: eth::U256)
crates/driver/src/tests/setup/mod.rs:477
↓ 1 callers
Method
ceil_div
Ceiling division that panics on error.
crates/number/src/u256_ext.rs:23
↓ 1 callers
Function
cel_value
JSON as the value CEL evaluates, typed as `Context::add_variable` types it. Recursive: a field is as deep as its type.
crates/fee-engine/src/order_view/mod.rs:103
↓ 1 callers
Function
charges_fee
Whether a transfer of the mint pays a fee at `epoch` or will once the newer schedule starts. Token-2022 applies the newer schedule from its epoch on a
crates/solana-token/src/lib.rs:130
↓ 1 callers
Function
check
( order: &Order, failed_overrides: &[AccountOverrideRequest], report: &SimulationRepor
crates/shared/src/order_creation_simulation.rs:366
↓ 1 callers
Method
checkDeadline
(data: &[u8])
contracts/generated/contracts-generated/deadlinecheck/src/lib.rs:381
↓ 1 callers
Function
check_accounts
Reject an order on a mint the settlement program cannot move, a preparation step naming a token program that does not own its mint, a native SOL buy p
crates/solana-orderbook/src/infra/api/routes/create_order/mod.rs:528
↓ 1 callers
Function
check_database_connection
(orderbook: &Orderbook)
crates/orderbook/src/run.rs:555
↓ 1 callers
Function
check_erc1271_result
(result: FixedBytes<4>)
crates/signature-validator/src/lib.rs:100
↓ 1 callers
Function
check_fast_path_limit_fits
Verifies that the signed sell/buy amounts leave enough room for the compounded volume fees that would be applied at fast-path settlement time. `facto
crates/shared/src/fee.rs:236
↓ 1 callers
Method
check_fast_path_limit_price_fits
Validates that a fast-path order's signed sell/buy amounts leave enough room for the compounded protocol + partner volume fees the autopilot would cha
crates/shared/src/order_validation.rs:542
↓ 1 callers
Function
check_lighthouse
Accept only a Lighthouse assertion. The program is upgradeable at a fixed address, so an instruction this build does not know is refused rather than a
crates/solana-orderbook/src/infra/api/routes/create_order/mod.rs:940
↓ 1 callers
Method
check_max_limit_orders
(&self, owner: Address)
crates/shared/src/order_validation.rs:561
↓ 1 callers
Function
check_native_payout
Reject a native SOL buy whose payout would leave its wallet under the rent-exempt minimum, checked as fill-or-kill since the quote names no fill polic
crates/solana-orderbook/src/infra/api/routes/quote/mod.rs:951
↓ 1 callers
Function
check_size
Refuse a transaction over the network's byte ceiling for its version: v1 for the settlement, v0 for the autopilot's order creations. An RPC node rejec
crates/solana-driver/src/domain/competition.rs:1204
↓ 1 callers
Function
check_solve_request
Checks the provider /solve request against the expected values while keeping some slack for the effective gas price, as it might vary between blockcha
crates/driver/src/tests/setup/solver.rs:515
↓ 1 callers
Method
classify_buy_token_accounts
Classify every token buy's buy token account, the settlement's payout destination, against the chain, and price the creation of the missing ones at th
crates/solana-driver/src/domain/auction.rs:114
↓ 1 callers
Function
clearing_rate
The `(in, out)` rate at which `orders` orders on `side`, filled together by a swap of `in_amount` for `out_amount`, clear: the rate their clearing pri
crates/solana-solvers/src/dex/mod.rs:102
↓ 1 callers
Function
clock_at
The Clock sysvar account at `epoch`.
crates/solana-token/src/lib.rs:350
↓ 1 callers
Method
close_reverted
Close the window of a settlement the driver saw land and fail on chain. The transaction cannot land again, so its orders need no hold.
crates/autopilot-svm/src/infra/observation.rs:106
↓ 1 callers
Function
coingecko
The `simple/token_price` prices for the given mints, requested in chunks. The configured endpoint addresses the route, so only the chain is appended.
crates/autopilot-svm/src/infra/prices.rs:658
↓ 1 callers
Function
coingecko_request
Observe a request to be sent to CoinGecko
crates/price-estimation/src/native/coingecko.rs:313
↓ 1 callers
Function
coingecko_response
Observe that a response was received from CoinGecko
crates/price-estimation/src/native/coingecko.rs:318
↓ 1 callers
Method
collect_garbage
Removes entries that have not been requested for a long time. This allows us to remove orders that got settled by other solvers which we are not able
crates/solvers/src/domain/solver/dex/fills.rs:164
↓ 1 callers
Method
collect_orders_app_data
Fetches the app data for all orders in the auction. Returns a map from app data hash to the fetched app data.
crates/driver/src/domain/competition/pre_processing.rs:348
↓ 1 callers
Function
collect_pool_results
(pools: Vec<Result<PoolStatus>>)
crates/liquidity-sources/src/balancer_v2/pool_fetching/registry.rs:144
↓ 1 callers
Function
collect_request_body
(request: Request<Body>)
crates/driver/src/domain/competition/pre_processing.rs:428
↓ 1 callers
Function
collect_wrapper_calls
( frame: &::alloy::rpc::types::trace::geth::CallFrame, wrapper_addr: Address, calls: &
crates/e2e/tests/e2e/wrapper.rs:268
↓ 1 callers
Function
collector
( eth: &Ethereum, blocks: &CurrentBlockWatcher, config: &infra::liquidity::config::Swapr, cach
crates/driver/src/boundary/liquidity/swapr.rs:42
↓ 1 callers
Method
commit_chunk
( &self, chunk: ChunkRange, logs: Vec<Log>, target_block: u64, )
crates/pool-indexer/src/indexer/uniswap_v3.rs:288
↓ 1 callers
Function
compare_jsons
A helper function that recursively compares two JSON values using Depth-First Search (DFS) traversal. It utilizes a `current_path` accumulator to main
crates/testlib/src/json_matching.rs:118
↓ 1 callers
Function
compare_native_result
( a: &Result<f64, PriceEstimationError>, b: &Result<f64, PriceEstimationError>, )
crates/price-estimation/src/competition/native.rs:111
↓ 1 callers
Function
compare_orders
Whether `order` describes the same trade as `quoted`: same tokens, side and target amount. Native ETH and WETH are treated as the same token: the orde
crates/driver/src/domain/competition/solution/mod.rs:99
↓ 1 callers
Function
compare_quote
(query: &Query, a: &Estimate, b: &Estimate, context: &RankingContext)
crates/price-estimation/src/competition/quote.rs:250
↓ 1 callers
Function
compare_quote_result
( query: &Query, a: &PriceEstimateResult, b: &PriceEstimateResult, context: &RankingContext,
crates/price-estimation/src/competition/quote.rs:227
↓ 1 callers
Function
compared
(default: f64)
crates/orderbook/src/fee_engine.rs:420
↓ 1 callers
Method
competition
(&self, auction: &domain::Auction)
crates/autopilot/src/shadow.rs:181
↓ 1 callers
Method
compile
Compiles both expressions of a definition.
crates/fee-engine/src/rules.rs:191
↓ 1 callers
Method
compressed
Returns a compressed copy of this request, or `None` if compression failed.
crates/autopilot/src/infra/solvers/dto/solve.rs:100
↓ 1 callers
Method
compressed_body_size
(&self)
crates/autopilot/src/infra/solvers/dto/solve.rs:170
↓ 1 callers
Method
compute_and_persist_final_execution
Adjusts every staged solution's bid by the volume-fee policies, promotes the staged quote competition into the permanent `competition_auctions` / `pro
crates/autopilot/src/fast_path.rs:330
↓ 1 callers
Method
compute_and_validate_valid_from
( &self, app_data: &OrderAppData, order: &OrderData, )
crates/shared/src/order_validation.rs:743
↓ 1 callers
Function
compute_euler_override
Euler is the only integration for now using wrappers and they have a chicken and egg problem when quoting. They need a quote to know the things they h
crates/simulator/src/simulation_builder.rs:344
↓ 1 callers
Function
compute_order_score
Score defined as (surplus + protocol fees) first converted to buy amounts and then converted to the native token. Follows CIP-38 as the base of the s
crates/winner-selection/src/arbitrator.rs:325
↓ 1 callers
Method
compute_quote_data
( &self, parameters: &QuoteParameters, )
crates/shared/src/order_quoting.rs:682
↓ 1 callers
Function
compute_reference_score
Computes reference score for the winning solver: the *counterfactual score — what would have been achieved without this solver. This is defined as the
crates/autopilot/src/fast_path.rs:596
← previous
next →
2,401–2,500 of 10,776, ranked by callers