Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cowprotocol/services
/ functions
Functions
8,486 in github.com/cowprotocol/services
⨍
Functions
8,486
◇
Types & classes
3,061
↓ 2 callers
Method
auction
(&self)
crates/autopilot/src/run.rs:80
↓ 2 callers
Method
badd
(self, other: Self)
crates/liquidity-sources/src/balancer_v2/swap/math.rs:16
↓ 2 callers
Method
balance
Returns the current [`eth::Ether`] balance of the specified account.
crates/driver/src/infra/blockchain/mod.rs:218
↓ 2 callers
Method
balances
(&self)
crates/driver/src/tests/setup/mod.rs:1286
↓ 2 callers
Function
bang_for_buck_ranking
Builds a `BestBangForBuck` setup where every token is estimated to be half as valuable as ETH and the gas price is 2. That effectively means every uni
crates/price-estimation/src/competition/quote.rs:379
↓ 2 callers
Method
base_pool_at
Returns a Balancer base pool contract instance at the specified address.
crates/liquidity-sources/src/balancer_v2/pools/common.rs:63
↓ 2 callers
Function
base_token_pairs
All token pairs between base tokens.
crates/liquidity-sources/src/base_tokens.rs:120
↓ 2 callers
Method
bdiv_down
(self, other: Self)
crates/liquidity-sources/src/balancer_v2/swap/math.rs:24
↓ 2 callers
Method
blocks_passed
(self)
crates/driver/src/domain/mempools.rs:482
↓ 2 callers
Method
bmul
(self, other: Self)
crates/liquidity-sources/src/balancer_v2/swap/math.rs:12
↓ 2 callers
Method
body_to_string
(&self)
crates/autopilot/src/infra/solvers/dto/solve.rs:210
↓ 2 callers
Function
bootstrap
Runs the bootstrap phase (seed + catch-up to the finalized head) for every factory, then returns. Binds no HTTP ports — meant to run as a separate ste
crates/pool-indexer/src/run.rs:42
↓ 2 callers
Function
bootstrap_factory
Seed + catch-up for a fresh factory. If a checkpoint already exists, skip straight to live indexing.
crates/pool-indexer/src/run.rs:239
↓ 2 callers
Method
build_fair_batch
Batches at most `max_batch_size` items in a round-robin fashion to prevent individual callers from starving all the others.
crates/ethrpc/src/alloy/buffering.rs:352
↓ 2 callers
Function
build_provider_checked
Builds the RPC provider and asserts the node's chain_id matches config. Catches misconfigured RPC-vs-network pairings (e.g. chain_id=1 pointed at an A
crates/pool-indexer/src/run.rs:287
↓ 2 callers
Method
build_quote_params
( &self, request: &OrderQuoteRequest, )
crates/orderbook/src/quoter.rs:246
↓ 2 callers
Function
build_replay_simulation
Shared builder for the positive replay (`APP_DATA`) and the flashloan-tampered negative replay.
crates/simulator/tests/aave_replay.rs:134
↓ 2 callers
Function
build_swap_event
(block_number: u64, tick: usize)
crates/liquidity-sources/src/uniswap_v3/event_fetching.rs:147
↓ 2 callers
Method
builder
Returns a `ClientBuilder` with the default settings.
crates/price-estimation/src/utils/http_client_factory.rs:37
↓ 2 callers
Method
buy
(&self)
crates/driver/src/domain/competition/solution/trade.rs:54
↓ 2 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:208
↓ 2 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/autopilot/src/domain/settlement/trade/math.rs:189
↓ 2 callers
Method
buy_amount
Calculate effective buy amount (what user received).
crates/winner-selection/src/arbitrator.rs:525
↓ 2 callers
Method
buy_token_balance
(&self)
crates/autopilot/src/domain/settlement/transaction/tokenized.rs:82
↓ 2 callers
Function
buy_token_destination_from
(destination: DbBuyTokenDestination)
crates/shared/src/db_order_conversions.rs:272
↓ 2 callers
Method
buys_eth
Does this order buy ETH?
crates/driver/src/domain/competition/order/mod.rs:154
↓ 2 callers
Method
cache
(&self)
crates/price-estimation/src/native_price_cache.rs:379
↓ 2 callers
Function
cache_config
The default pool caching configuration to use.
crates/driver/src/boundary/liquidity/mod.rs:34
↓ 2 callers
Function
cached
Create a cached [`BalanceFetching`] instance.
crates/account-balances/src/lib.rs:92
↓ 2 callers
Method
caching_native_price_estimator_from_inner
Creates a [`CachingNativePriceEstimator`] from a pre-built inner estimator.
crates/price-estimation/src/factory.rs:468
↓ 2 callers
Function
calc_in_given_out_approx
https://github.com/balancer-labs/balancer-v2-monorepo/blob/stable-deployment/pvt/helpers/src/models/pools/stable/math.ts#L108
crates/liquidity-sources/src/balancer_v2/swap/stable_math.rs:301
↓ 2 callers
Function
calc_out_given_in_approx
https://github.com/balancer-labs/balancer-v2-monorepo/blob/stable-deployment/pvt/helpers/src/models/pools/stable/math.ts#L86
crates/liquidity-sources/src/balancer_v2/swap/stable_math.rs:320
↓ 2 callers
Function
calculate_submission_gas_price
( gas_price_of_last_submission: Option<Eip1559Estimation>, web3_gas_estimation: Eip1559Estimation,
crates/refunder/src/submitter.rs:107
↓ 2 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/ierc4626/src/lib.rs:611
↓ 2 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/iuniswapv3factory/src/lib.rs:1237
↓ 2 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/solver/src/lib.rs:849
↓ 2 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/balancerv2stablepoolfactoryv2/src/lib.rs:1115
↓ 2 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/hookstrampoline/src/lib.rs:1208
↓ 2 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/gashog/src/lib.rs:737
↓ 2 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/flashloanrouter/src/lib.rs:378
↓ 2 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/balancerqueries/src/lib.rs:804
↓ 2 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/swapper/src/lib.rs:1500
↓ 2 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/uniswapv2factory/src/lib.rs:1072
↓ 2 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/balancerv2authorizer/src/lib.rs:1397
↓ 2 callers
Method
cancel
Cancel a pending settlement by sending a transaction to self with a slightly higher gas price than the existing one.
crates/driver/src/domain/mempools.rs:355
↓ 2 callers
Function
cancel_order
( ex: &mut PgConnection, order_uid: &OrderUid, timestamp: DateTime<Utc>, )
crates/database/src/orders.rs:475
↓ 2 callers
Method
cancel_orders
(&self, order_uids: Vec<OrderUid>, now: DateTime<Utc>)
crates/orderbook/src/database/orders.rs:235
↓ 2 callers
Function
canonicalise_app_data
Minifies `app_data` with keys sorted alphabetically.
crates/simulator/tests/aave_replay.rs:63
↓ 2 callers
Method
cap_gas_limit
Cap the transaction's gas limit at the configured per-tx gas limit so a rogue solution can't force the node to binary-search up to the block gas limit
crates/simulator/src/ethereum/mod.rs:92
↓ 2 callers
Function
cd_order
An example order which sells token "C" for token "D".
crates/driver/src/tests/setup/mod.rs:752
↓ 2 callers
Function
cd_pool
A pool between tokens "C" and "D".
crates/driver/src/tests/setup/mod.rs:742
↓ 2 callers
Function
cd_solution
A solution solving the [`cd_order`].
crates/driver/src/tests/setup/mod.rs:763
↓ 2 callers
Function
check_final_reserves
( amount_in: U256, amount_out: U256, reserve_in: U256, reserve_out: U256, )
crates/liquidity-sources/src/uniswap_v2/pool_fetching.rs:153
↓ 2 callers
Function
clone_anyhow_error
anyhow errors are not clonable natively. This is a workaround that creates a new anyhow error based on formatting the error with its inner sources wit
crates/price-estimation/src/utils/mod.rs:27
↓ 2 callers
Method
collect_requests
Drains the items from `calls` into the fair queue until we have at least `max_batch_size` items or waited for `batch_delay` after starting to build a
crates/ethrpc/src/alloy/buffering.rs:305
↓ 2 callers
Function
collector_with_reader
( eth: &Ethereum, blocks: &CurrentBlockWatcher, config: &infra::liquidity::config::UniswapV2,
crates/driver/src/boundary/liquidity/uniswap/v2.rs:115
↓ 2 callers
Function
compare_error
(a: &PriceEstimationError, b: &PriceEstimationError)
crates/price-estimation/src/competition/mod.rs:191
↓ 2 callers
Method
compute_reference_scores
( &self, ranking: &Ranking<C>, )
crates/winner-selection/src/arbitrator.rs:575
↓ 2 callers
Method
config
(&self)
crates/driver/src/infra/solver/mod.rs:562
↓ 2 callers
Function
config_tmp_file
Create a temporary file with the given content.
crates/e2e/src/setup/mod.rs:27
↓ 2 callers
Function
connect_db
(config: &Configuration)
crates/pool-indexer/src/run.rs:301
↓ 2 callers
Function
contract_to_db_events
( contract_events: Vec<(GPv2SettlementEvents, Log)>, )
crates/autopilot/src/database/events.rs:16
↓ 2 callers
Function
convergence_criteria
(curr_value: U256, prev_value: U256)
crates/liquidity-sources/src/balancer_v2/swap/stable_math.rs:194
↓ 2 callers
Function
convert_signing_scheme_into_quote_signing_scheme
( scheme: SigningScheme, order_placement_via_api: bool, verification_gas_limit: u64, )
crates/shared/src/order_validation.rs:1246
↓ 2 callers
Function
convert_to_quote_id_and_user_valid_to
( order_placement: &ContractOrderPlacement, )
crates/autopilot/src/database/onchain_order_events/ethflow_events.rs:139
↓ 2 callers
Function
count_rows_in_table
(ex: &mut PgConnection, table: &str)
crates/autopilot/src/database/mod.rs:124
↓ 2 callers
Method
create
Creates a new HTTP client with the default settings.
crates/price-estimation/src/utils/http_client_factory.rs:23
↓ 2 callers
Method
createProxy
( data: &[u8], )
contracts/generated/contracts-generated/gnosissafeproxyfactory/src/lib.rs:434
↓ 2 callers
Function
create_db_search_parameters
( params: QuoteSearchParameters, expiration: DateTime<Utc>, )
crates/shared/src/event_storing_helpers.rs:36
↓ 2 callers
Function
create_ipfs_cid
Create an IPFS CIDv1 from a hash created by `hash_full_app_data`. The return value is the raw bytes of the CID. It is not multibase encoded.
crates/app-data/src/app_data_hash.rs:110
↓ 2 callers
Function
create_pool
Create + initialise a single pool inside an already-deployed factory. fee must be unique within the factory for token0/token1 ([1u8;20],[2u8;20]).
crates/e2e/tests/e2e/pool_indexer.rs:288
↓ 2 callers
Function
create_price
(value: eth::U256)
crates/autopilot/src/domain/competition/winner_selection.rs:1200
↓ 2 callers
Function
create_priority_estimator
( http_client: reqwest::Client, provider: &AlloyProvider, estimator_types: &[GasEstimatorType],
crates/gas-price-estimation/src/lib.rs:55
↓ 2 callers
Function
create_quote_row
(competition: &QuoteCompetition)
crates/shared/src/event_storing_helpers.rs:15
↓ 2 callers
Function
create_weighted_pool_with
( tokens: Vec<Address>, balances: Vec<U256>, weights: Vec<Bfp>, scaling_factor
crates/liquidity-sources/src/balancer_v2/swap/mod.rs:447
↓ 2 callers
Method
current_block
(&self)
crates/simulator/src/ethereum/mod.rs:70
↓ 2 callers
Function
current_block_stream
( url: Url, poll_interval: Duration, )
crates/ethrpc/src/block_stream.rs:188
↓ 2 callers
Function
current_block_ws_stream
Creates a cloneable stream that yields the current block whenever it changes. Uses websocket subscriptions for real-time block updates. The stream is
crates/ethrpc/src/block_stream.rs:105
↓ 2 callers
Method
deadline
The deadline for the driver to start sending solution to autopilot.
crates/driver/src/domain/competition/auction.rs:113
↓ 2 callers
Function
decimal_to_wei
Convert a decimal amount (from an API response) to U256 wei using the given rounding direction. e.g. `decimal_to_wei("1964.365496", 6, Down) → 1964365
crates/solvers/src/infra/dex/bitget/mod.rs:51
↓ 2 callers
Function
decode_pool_rows
(rows: Vec<PgRow>)
crates/pool-indexer/src/db/uniswap_v3.rs:19
↓ 2 callers
Function
decode_settlement
Decode the settlement-program instructions of one transaction into domain events. `Err` means at least one instruction failed to decode and the whole
crates/solana-indexer/src/indexer/decoder.rs:321
↓ 2 callers
Function
default_api_address
()
crates/configs/src/autopilot/mod.rs:40
↓ 2 callers
Function
default_bind_address
()
crates/configs/src/orderbook/mod.rs:31
↓ 2 callers
Function
default_max_auction_age
()
crates/configs/src/autopilot/mod.rs:52
↓ 2 callers
Function
default_max_maintenance_timeout
()
crates/configs/src/autopilot/mod.rs:44
↓ 2 callers
Function
default_metrics_address
()
crates/configs/src/autopilot/mod.rs:36
↓ 2 callers
Function
default_min_order_validity_period
()
crates/configs/src/autopilot/mod.rs:48
↓ 2 callers
Function
default_results_required
()
crates/configs/src/native_price.rs:15
↓ 2 callers
Function
default_verification_gas_limit
()
crates/model/src/quote.rs:87
↓ 2 callers
Function
delete_invalidations
( ex: &mut PgTransaction<'_>, block_number: i64, )
crates/database/src/onchain_invalidations.rs:44
↓ 2 callers
Function
deployment_block
(chain_id: &u64)
contracts/generated/contracts-generated/weth9/src/lib.rs:3096
↓ 2 callers
Function
deserialize_solana_pubkey_b58
Deserializes a base58-encoded Solana public key from a string.
crates/serde-ext/src/pubkey.rs:7
↓ 2 callers
Method
dispatch
(&self, payload: &str)
crates/autopilot/src/infra/order_notify/mod.rs:73
↓ 2 callers
Method
downscale_down
Similar to downscale up above, but rounded down, this is just checked div. https://github.com/balancer-labs/balancer-v2-monorepo/blob/c18ff2686c61a8cb
crates/liquidity-sources/src/balancer_v2/swap/mod.rs:67
↓ 2 callers
Method
downscale_up
Returns the token amount corresponding to the internal Balancer representation for the same amount. Based on contract code here: https://github.com/ba
crates/liquidity-sources/src/balancer_v2/swap/mod.rs:61
↓ 2 callers
Function
drop_pools_missing_decimals
Drops pools missing either token's `decimals`. Treating missing as `0` would mis-scale prices, so we fail closed and wait for the indexer's decimals b
crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs:164
↓ 2 callers
Function
dummy_contracts
()
crates/solver/src/liquidity/balancer_v2.rs:225
↓ 2 callers
Function
encode_base_tokens
(tokens: impl IntoIterator<Item = Address>)
crates/e2e/src/setup/colocation.rs:268
↓ 2 callers
Function
encode_trade
Creates the data which the smart contract's `decodeTrade` expects.
crates/simulator/src/encoding.rs:153
← previous
next →
1,001–1,100 of 8,486, ranked by callers