Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cowprotocol/services
/ functions
Functions
8,522 in github.com/cowprotocol/services
⨍
Functions
8,522
◇
Types & classes
3,082
↓ 2 callers
Function
cd_order
An example order which sells token "C" for token "D".
crates/driver/src/tests/setup/mod.rs:741
↓ 2 callers
Function
cd_pool
A pool between tokens "C" and "D".
crates/driver/src/tests/setup/mod.rs:731
↓ 2 callers
Function
cd_solution
A solution solving the [`cd_order`].
crates/driver/src/tests/setup/mod.rs:752
↓ 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
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:212
↓ 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:1227
↓ 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:109
↓ 2 callers
Method
cow_amms
(&self)
crates/cow-amm/src/cache.rs:94
↓ 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:34
↓ 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:115
↓ 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
(data: QuoteData)
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:204
↓ 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
default_api_address
()
crates/configs/src/autopilot/mod.rs:42
↓ 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:54
↓ 2 callers
Function
default_max_maintenance_timeout
()
crates/configs/src/autopilot/mod.rs:46
↓ 2 callers
Function
default_metrics_address
()
crates/configs/src/autopilot/mod.rs:38
↓ 2 callers
Function
default_min_order_validity_period
()
crates/configs/src/autopilot/mod.rs:50
↓ 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_by_block_range
( ex: &mut PgConnection, factory_address: &Address, start_block: i64, end_block: i64, )
crates/database/src/cow_amms.rs:81
↓ 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
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:157
↓ 2 callers
Function
dummy_contracts
()
crates/solver/src/liquidity/balancer_v2.rs:225
↓ 2 callers
Method
encode
Encode the solution into a [`Settlement`], which can be used to execute the solution onchain.
crates/driver/src/domain/competition/solution/mod.rs:498
↓ 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
↓ 2 callers
Function
encode_wrapper_settlement
Encodes a settlement transaction that uses wrapper contracts. Takes the base settlement calldata and wraps it in a wrappedSettleCall with encoded wra
crates/simulator/src/encoding.rs:281
↓ 2 callers
Function
ensure_quote_accuracy
Returns an error if settling the quote would require using too much of the settlement contract buffers.
crates/price-estimation/src/trade_verifier.rs:782
↓ 2 callers
Method
enumerated
Enumerates all solutions. The index is used as solution UID.
crates/autopilot/src/domain/competition/winner_selection.rs:252
↓ 2 callers
Method
erc20
Returns a [`token::Erc20`] for the specified address.
crates/driver/src/infra/blockchain/mod.rs:228
↓ 2 callers
Function
error_to_response
(err: PriceEstimationError)
crates/autopilot/src/infra/api.rs:101
↓ 2 callers
Method
estimate
(&self)
crates/gas-price-estimation/src/configurable_alloy.rs:124
↓ 2 callers
Method
estimate_native_price
( &self, token: Address, total_timeout: Duration, )
crates/price-estimation/src/competition/native.rs:17
↓ 2 callers
Method
estimate_native_price
( &self, token: Address, timeout: Duration, )
crates/price-estimation/src/native/mod.rs:105
↓ 2 callers
Method
estimate_result
Determines the result of a price estimate, returning either "success" or the error reason
crates/price-estimation/src/instrumented.rs:44
↓ 2 callers
Method
estimate_stream
Runs every estimator concurrently across all stages and yields each result as it arrives. No ranking, no early return. The caller stops by dropping th
crates/price-estimation/src/competition/mod.rs:181
↓ 2 callers
Function
ether_to_decimal
Converts an `eth::Ether` amount into a `BigDecimal` representation.
crates/solvers/src/util/conv.rs:28
↓ 2 callers
Method
ether_value
Computes an amount equivalent in value to the specified [`eth::Ether`] at the given price.
crates/solvers/src/domain/auction.rs:75
↓ 2 callers
Function
ethereum
( web3: Web3, unbuffered_web3: Web3, chain: &Chain, url: Url, contracts: infra::blockchain
crates/autopilot/src/run.rs:107
↓ 2 callers
Function
ethrpc
(url: &Url, ethrpc_args: &shared::web3::Arguments)
crates/autopilot/src/run.rs:87
↓ 2 callers
Method
execTransaction
(data: &[u8])
contracts/generated/contracts-generated/gnosissafe/src/lib.rs:3464
↓ 2 callers
Method
executed_amounts
(&self)
crates/solver/src/settlement/settlement_encoder.rs:564
↓ 2 callers
Function
executed_protocol_fees
( ex: &mut PgConnection, keys_filter: &[Execution], )
crates/database/src/order_execution.rs:80
↓ 2 callers
Method
executed_protocol_fees
( &self, keys_filter: &[Execution], )
crates/orderbook/src/database/fee_policies.rs:18
↓ 2 callers
Method
execution
Compute the execution of an order given the available liquidity
crates/driver/src/tests/setup/blockchain.rs:688
↓ 2 callers
Function
extract_critical_revert
Analyzes the simulation and only surfaces a revert if it was critical (as opposed to being caused by limitations of the simulation approach).
crates/shared/src/order_creation_simulation.rs:205
↓ 2 callers
Method
extract_custom_and_general_order_data
( &self, order_placement_events: Vec<(ContractEvent, Log)>, )
crates/autopilot/src/database/onchain_order_events/mod.rs:216
↓ 2 callers
Function
extract_interactions
( order: &FullOrderDb, execution: ExecutionTime, )
crates/shared/src/db_order_conversions.rs:164
↓ 2 callers
Function
extract_order_data_from_onchain_order_placement_event
( order_placement: &ContractOrderPlacement, domain_separator: DomainSeparator, )
crates/autopilot/src/database/onchain_order_events/mod.rs:640
↓ 2 callers
Function
extract_sload_slots
( trace: GethTrace, initial_storage_context: Address, )
crates/balance-overrides/src/detector.rs:34
↓ 2 callers
Method
factor
(&self)
crates/driver/src/domain/liquidity/balancer/v2/stable.rs:126
↓ 2 callers
Method
factory
(data: &[u8])
contracts/generated/contracts-generated/iswaprpair/src/lib.rs:4887
↓ 2 callers
Method
fee
Total fee (protocol fee + network fee). Equal to a surplus difference before and after applying the fees.
crates/autopilot/src/domain/settlement/trade/math.rs:134
↓ 2 callers
Method
fee_from_volume
Computes the volume based fee in surplus token The volume is defined as a full sell amount (including fees) for buy order, or a full buy amount for s
crates/driver/src/domain/competition/solution/fee.rs:187
↓ 2 callers
Method
fee_with_additional_cost
(&self, additional_cost: u64)
crates/shared/src/fee.rs:41
↓ 2 callers
Method
fetch
(&self, contract_app_data: &AppDataHash)
crates/orderbook/src/ipfs_app_data.rs:87
↓ 2 callers
Function
fetch_by_factory_address
( ex: &mut PgConnection, address: &Address, )
crates/database/src/cow_amms.rs:68
↓ 2 callers
Method
fetch_common_pool_info
( &self, pool_address: Address, block_created: u64, )
crates/liquidity-sources/src/balancer_v2/pools/common.rs:84
↓ 2 callers
Function
fetch_decimals
(provider: &AlloyProvider, token: Address)
crates/pool-indexer/src/indexer/uniswap_v3.rs:424
↓ 2 callers
Function
fetch_in_flight_orders
Fetches all orders for which we must assume that there are still onchain transactions being mined or submitted. Those are all orders (JIT or regular)
crates/database/src/solver_competition_v2.rs:469
↓ 2 callers
Method
fetch_inner_many
(&self, keys: HashSet<K>, block: Block)
crates/liquidity-sources/src/recent_block_cache.rs:251
↓ 2 callers
Method
fetch_pools_page
`GET /pools?limit=N[&after=cursor]`. `None` means 503 (still bootstrapping) — the caller decides whether to retry or fail.
crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs:262
↓ 2 callers
Method
fetch_token
(&self, address: Address)
crates/token-info/src/lib.rs:55
↓ 2 callers
Function
fetcher
Create the default [`BalanceFetching`] instance.
crates/account-balances/src/lib.rs:87
↓ 2 callers
Method
filter
(&self)
crates/liquidity-sources/src/balancer_v2/pool_fetching/registry.rs:44
↓ 2 callers
Method
filter_unsupported_orders_in_auction
Removes all unsupported orders from the auction.
crates/driver/src/domain/competition/risk_detector/mod.rs:84
↓ 2 callers
Method
filtered
Mark that this order should be filtered out before being sent to the solver.
crates/driver/src/tests/setup/mod.rs:219
↓ 2 callers
Method
finalized_block
(&self)
crates/pool-indexer/src/indexer/uniswap_v3.rs:208
↓ 2 callers
Function
find
( ex: &mut PgConnection, params: &QuoteSearchParameters, )
crates/database/src/quotes.rs:108
↓ 2 callers
Function
find_banned_user_orders
Finds all orders whose owners or receivers are in the set of "banned" users.
crates/autopilot/src/solvable_orders.rs:524
↓ 2 callers
Function
find_indexing_start_block
1. Check the `last_indexed_blocks` table for the `index_name`. 2. If no value found or the index is 0, use `fallback_start_block`, if provided. 3. Fal
crates/autopilot/src/database/onchain_order_events/ethflow_events.rs:252
↓ 2 callers
Function
find_order
( orders: &'a [competition::Order], uid: &solvers_dto::solution::OrderUid, )
crates/driver/src/infra/solver/dto/solution.rs:289
↓ 2 callers
Method
find_pair
(&self, order: &Order)
crates/driver/src/tests/setup/blockchain.rs:648
↓ 2 callers
Function
find_presignature_pending_orders
Finds orders with pending presignatures. EIP-1271 signature validation is skipped entirely - the driver validates signatures before settlement.
crates/autopilot/src/solvable_orders.rs:561
↓ 2 callers
Function
find_unsupported_tokens
( orders: &[&Order], deny_listed_tokens: &DenyListedTokens, )
crates/autopilot/src/solvable_orders.rs:719
↓ 2 callers
Method
flush
(&mut self)
crates/s3/src/lib.rs:48
↓ 2 callers
Method
from
(value: PrivateKeySigner)
crates/driver/src/infra/solver/mod.rs:161
← previous
next →
1,001–1,100 of 8,522, ranked by callers