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
order_json
An order account recording `received` of its buy token.
crates/solana-orderbook/tests/api.rs:898
↓ 1 callers
Function
order_quote
The copy of the stored `quote` for the order `request` describes: the route with the cost that order pays on it, its own buy token account's rent on t
crates/solana-orderbook/src/infra/api/routes/create_order/mod.rs:711
↓ 1 callers
Function
order_simulator_ignoring_legacy_checks
(sim: MockOrderSimulating)
crates/shared/src/order_validation.rs:3562
↓ 1 callers
Function
order_uid_from_notification
Parses the payload of a `new_order` notification: the hex encoded order UID as emitted by the `order_insert_notify` database trigger.
crates/autopilot/src/infra/order_notify/mod.rs:90
↓ 1 callers
Method
orders
The orders for the auction.
crates/driver/src/domain/competition/auction.rs:114
↓ 1 callers
Method
orders_for_tx
(&self, tx_hash: &B256)
crates/orderbook/src/database/orders.rs:383
↓ 1 callers
Method
other
Returns the token in the pair which is not the one passed in, or None if token passed in is not part of the pair
crates/model/src/lib.rs:45
↓ 1 callers
Method
out_given_in
Use the Uniswap constant AMM formula to calculate the output amount based on the input.
crates/driver/src/tests/setup/blockchain.rs:87
↓ 1 callers
Function
outcome_label
The metrics label for a finished settlement attempt.
crates/solana-driver/src/domain/competition.rs:1257
↓ 1 callers
Method
output
(&self)
crates/solvers/src/domain/solver/baseline.rs:390
↓ 1 callers
Function
overpriced_creation_tx
A well-formed bundle whose priority fee is above the sponsored ceiling. Neither factor is outlandish alone, the product is: 500000 micro-lamports over
crates/solana-orderbook/tests/api.rs:2211
↓ 1 callers
Method
owner
Extract the owner address from the order UID.
crates/chain-types/src/evm.rs:33
↓ 1 callers
Method
page_limit
(&self)
crates/pool-indexer/src/api/uniswap_v3/pools_list.rs:33
↓ 1 callers
Function
pair_address
Calculates deterministic Uniswapv3 pool address. https://github.com/Uniswap/v3-periphery/blob/main/contracts/libraries/PoolAddress.sol
crates/liquidity-sources/src/uniswap_v3_pair_provider.rs:9
↓ 1 callers
Function
params
sell_before_fee = 100, gas_price = 1, sell_token_price = 1.0, so fee = ceil(gas * 1 / 1.0) = gas. A gas of 2000 saturates 100 - 2000 to 0 -> SellAmoun
crates/shared/src/order_quoting.rs:2617
↓ 1 callers
Function
parse_field_paths
Parses dot-separated field paths into a set of paths.
crates/testlib/src/json_matching.rs:98
↓ 1 callers
Function
parse_general_onchain_order_placement_data
( quoter: &'_ dyn OrderQuoting, order_placement_events_and_quotes_zipped: I, domain_separator: Dom
crates/autopilot/src/database/onchain_order_events/mod.rs:482
↓ 1 callers
Function
parse_order_cancellation_error
Parse OrderCancellationError from HTTP response Flow: JSON -> orderbook::api::Error -> OrderCancellationError Note: Returns None for unknown error typ
crates/e2e/tests/e2e/replace_order.rs:43
↓ 1 callers
Function
parse_order_replacement_error
Parse OrderReplacementError from HTTP response Flow: JSON -> orderbook::api::Error -> OrderReplacementError Note: Returns None for unknown error types
crates/e2e/tests/e2e/replace_order.rs:23
↓ 1 callers
Method
parse_request
Parses the JSON body of the `/solve` request during the unified auction pre-processing since eagerly deserializing these requests is surprisingly cost
crates/driver/src/domain/competition/pre_processing.rs:209
↓ 1 callers
Function
parse_streaming_quotes
(response: reqwest::Response)
crates/e2e/tests/e2e/quoting.rs:982
↓ 1 callers
Function
partial_access_list_for
Returns the partial access list for a single trade, or `None` if the trade does not buy native ETH or its receiver has no on-chain code.
crates/driver/src/domain/competition/solution/settlement.rs:361
↓ 1 callers
Method
participate
( &self, driver: Arc<infra::Driver>, request: solve::Request, auction_id: i64,
crates/autopilot/src/shadow.rs:206
↓ 1 callers
Method
partition_unfair_solutions
( &self, solutions: Vec<Solution<Unscored, C>>, context: &AuctionContext<C>, )
crates/winner-selection/src/arbitrator.rs:64
↓ 1 callers
Method
past_events_by_block_number_range
( &self, block_range: &RangeInclusive<u64>, )
crates/event-indexing/src/event_handler.rs:556
↓ 1 callers
Function
path_bytes32
The path parameter as 32 bytes of hex, `0x` prefix optional, or the named rejection.
crates/solana-orderbook/src/infra/api/extract.rs:50
↓ 1 callers
Function
path_candidates
( sell_token: Address, buy_token: Address, base_tokens: &HashSet<Address>, max_hops: usize, )
crates/liquidity-sources/src/base_tokens.rs:81
↓ 1 callers
Function
path_candidates
( sell_token: Address, buy_token: Address, base_tokens: &HashSet<Address>, max_hops: usize, )
crates/solvers/src/boundary/routing.rs:186
↓ 1 callers
Method
path_candidates_with_hops
Returns possible path candidates with the specified number of maximum hops.
crates/liquidity-sources/src/base_tokens.rs:71
↓ 1 callers
Method
pays_to_contract
Does this order pay to a smart contract?
crates/driver/src/domain/competition/order/mod.rs:152
↓ 1 callers
Method
penalty_cap_native
The CIP-87 penalty cap for a fast-path order: the same cap a regular auction would assign, or 0 when the calculator is disabled.
crates/autopilot/src/fast_path.rs:486
↓ 1 callers
Method
pending_chunks
(&self, last_indexed_block: u64, finalized_block: u64)
crates/pool-indexer/src/indexer/uniswap_v3.rs:241
↓ 1 callers
Function
pending_fast_path_order
( ex: &mut PgConnection, uid: &OrderUid, )
crates/database/src/fast_path.rs:108
↓ 1 callers
Method
pending_fast_path_order
( &self, uid: domain::OrderUid, )
crates/autopilot/src/infra/persistence/mod.rs:1104
↓ 1 callers
Function
percentile
The nearest-rank `p`-th percentile of an ascending sample: the smallest value with at least `p` percent of the sample at or below it, so 0 is the mini
crates/solana-driver/src/domain/priority_fee.rs:172
↓ 1 callers
Method
permit
(&self, owner: &TestAccount, spender: Address, value: U256)
crates/e2e/src/setup/onchain_components/mod.rs:137
↓ 1 callers
Method
persist_chunk
Persists the chunk's changes and advances the checkpoint in a single transaction. Returns `true` if this writer applied the chunk, or `false` if anoth
crates/pool-indexer/src/indexer/uniswap_v3.rs:374
↓ 1 callers
Method
persist_competition_ranking
( &self, _: &TestAuction, _: &u64, _: &NoRanking,
crates/autopilot-svm/src/run_loop.rs:452
↓ 1 callers
Method
persist_last_indexed_block
(&mut self, _last_block: u64)
crates/event-indexing/src/event_handler.rs:747
↓ 1 callers
Function
policies
The fees of the first rule that matched, the one the engine charges, then the partner fees. `quote` is the reference of price improvement fees.
crates/autopilot/src/fee_engine.rs:207
↓ 1 callers
Method
policies
The policies as the generic fee math sees them. The score flag is read by [`Self::fees`], not by the fee math.
crates/driver/src/domain/competition/solution/scoring.rs:139
↓ 1 callers
Method
policies_at
The upcoming policies once their timestamp has passed, the current ones until then. An empty upcoming list never takes over, like on EVM.
crates/autopilot-svm/src/domain/fee.rs:71
↓ 1 callers
Function
policy
(fee: Fee, quote: &domain::Quote)
crates/autopilot/src/fee_engine.rs:226
↓ 1 callers
Method
policy
The policy as the auction attached it. A price improvement policy measures against `quote`.
crates/autopilot-svm/src/infra/order_execution.rs:249
↓ 1 callers
Function
pool_address_from_id
Extract the pool address from an ID. This takes advantage that the first 20 bytes of the ID is the address of the pool. For example the GNO-BAL pool
crates/liquidity-sources/src/balancer_v2/pool_fetching/mod.rs:449
↓ 1 callers
Method
pool_by_id
Returns a pool by ID or none if no such pool exists.
crates/liquidity-sources/src/balancer_v2/pool_fetching/pool_storage.rs:106
↓ 1 callers
Function
pool_created_token_addresses
Collects the unique set of token addresses from all `PoolCreated` events emitted by `factory` in `logs`.
crates/pool-indexer/src/indexer/uniswap_v3.rs:801
↓ 1 callers
Function
pool_event_emitters
Unique emitter addresses for the per-pool events (`Initialize`/`Swap`/`Mint`/`Burn`). Feeds the DB lookup that filters out foreign emitters before `co
crates/pool-indexer/src/indexer/uniswap_v3.rs:442
↓ 1 callers
Function
pool_id
(pool: &WeightedProductOrder)
crates/driver/src/boundary/liquidity/balancer/v2/weighted.rs:63
↓ 1 callers
Function
pool_id
(pool: &StablePoolOrder)
crates/driver/src/boundary/liquidity/balancer/v2/stable.rs:59
↓ 1 callers
Method
pool_ids_for_token_pair
Returns all pools containing both tokens from `TokenPair`
crates/liquidity-sources/src/balancer_v2/pool_fetching/pool_storage.rs:80
↓ 1 callers
Method
pool_ids_for_token_pairs
Given a collection of `TokenPair`, returns all pools containing at least one of the pairs.
crates/liquidity-sources/src/balancer_v2/pool_fetching/pool_storage.rs:98
↓ 1 callers
Function
pool_state
( version: Version, info: PoolInfo, common: BoxFuture<'static, common::PoolState>, )
crates/liquidity-sources/src/balancer_v2/pools/weighted.rs:120
↓ 1 callers
Method
pools_by_id
(&self, pool_ids: HashSet<B256>, block: Block)
crates/liquidity-sources/src/balancer_v2/pool_fetching/cache.rs:59
↓ 1 callers
Method
post_interactions
(&self)
crates/driver/src/domain/competition/solution/mod.rs:278
↓ 1 callers
Method
post_process_settlement
(&self, settlement: super::SettlementEvent)
crates/autopilot/src/domain/settlement/observer.rs:86
↓ 1 callers
Method
post_processing
( &self, auction: &domain::Auction, ranking: &Ranking, block_deadline: u64,
crates/autopilot/src/run_loop.rs:587
↓ 1 callers
Function
post_single
( state: State, path: Option<String>, query: Option<String>, req: serde_json::Value, )
crates/solvers/src/tests/mock/http.rs:247
↓ 1 callers
Function
postprocessing
Observe that postprocessing (encoding & merging) of solutions is about to start.
crates/driver/src/infra/observe/mod.rs:104
↓ 1 callers
Function
postprocessing_timed_out
(solver: &Solver, auction_id: Option<auction::Id>)
crates/driver/src/infra/notify/mod.rs:145
↓ 1 callers
Method
pre_interaction
(mut self, interaction: Interaction)
crates/driver/src/tests/setup/mod.rs:275
↓ 1 callers
Function
pre_signature_event
( ex: &mut PgTransaction<'_>, block_number: i64, owner: Address,
crates/database/src/orders.rs:1949
↓ 1 callers
Function
preparation_step
Classify one preparation instruction against the sponsored template and pin every account it touches to the order. The funder pays for the whole trans
crates/solana-orderbook/src/infra/api/routes/create_order/mod.rs:1008
↓ 1 callers
Method
prepare_simulation
( &self, order: &Order, full_app_data: &str, full_balance_check: bool, )
crates/shared/src/order_creation_simulation.rs:107
↓ 1 callers
Method
prepare_state_overrides
Configures all the state overrides that are needed to mock the given trade (approval, sell_token balance, helper contract at solver address, allow lis
crates/price-estimation/src/trade_verifier.rs:518
↓ 1 callers
Method
prepare_url
(&self, cid: &str)
crates/orderbook/src/ipfs.rs:54
↓ 1 callers
Function
prepend_panic_handler
Installs a panic handler that executes [`handler`] plus whatever panic handler was already set up. This can be useful to make absolutely sure to clean
crates/observe/src/panic_hook.rs:44
↓ 1 callers
Function
price_improvement
( trade: &Trade, quote: &order::Quote, )
crates/driver/src/domain/competition/solution/scoring.rs:499
↓ 1 callers
Function
price_improvement_over_quote
Calculate price improvement over quote. Returns 0 if there's no improvement (instead of error).
crates/protocol-fees/src/lib.rs:442
↓ 1 callers
Method
price_in_buy_token_f64
The price of the estimate denominated in buy token. The resulting price is how many units of buy_token are bought for one unit of sell_token (buy_amo
crates/price-estimation/src/lib.rs:232
↓ 1 callers
Method
prices
The autopilot's native prices, which gate quotes.
crates/solana-orderbook/src/infra/api/mod.rs:271
↓ 1 callers
Method
prices
The uniform price vector this settlement proposes. Deprecated: only emitted on the `/solve` response so that autopilots running the previous code can
crates/driver/src/domain/competition/solution/settlement.rs:328
↓ 1 callers
Function
print_result
Prints the compute units the simulation used against the settlement's `declared_limit`, where it fails and its logs.
crates/solana-orderbook/examples/decode_bundle.rs:250
↓ 1 callers
Method
prioritization_fees
The fees recently paid over the accounts `solution`'s interactions write. A quote's settlement accounts are placeholders, so only the interactions' ac
crates/solana-driver/src/domain/competition.rs:590
↓ 1 callers
Function
probe_aave_token
Probes whether `token` is an Aave v3 aToken and returns its `(pool, underlying)` pair. Accepts the token iff the pool registers it as the aToken for i
crates/balance-overrides/src/balance/aave.rs:123
↓ 1 callers
Function
process_batch
(mut inner: S, batch: Vec<(SerializedRequest, ResponseSender)>)
crates/ethrpc/src/alloy/buffering.rs:394
↓ 1 callers
Function
process_frame
Traverses the call stack and pushes relevant calls to `events`. Introspection of the `settle()` call gets forwarded to [`process_settle_frame`].
crates/simulator/src/report.rs:109
↓ 1 callers
Method
process_order_backlog
Fast-path orders sitting with `valid_from IS NULL` when the autopilot starts up are the backlog left behind by a restart or downtime — their `new_orde
crates/autopilot/src/fast_path.rs:153
↓ 1 callers
Function
process_settle_frame
This function expects to get the [`CallFrame`] of the `settle()` call to be passed in. Since we are only interested in a relatively high level report
crates/simulator/src/report.rs:159
↓ 1 callers
Method
process_settle_request
The settlement worker spawned by [`settle`](Self::settle). A send failure does not restore the solution: the transaction may have reached the network
crates/solana-driver/src/domain/competition.rs:733
↓ 1 callers
Method
process_settle_request
( &self, auction_id: auction::Id, solution_id: u64, submission_deadline: Block
crates/driver/src/domain/competition/mod.rs:952
↓ 1 callers
Function
prod_buckets
()
crates/autopilot/src/fee_engine.rs:369
↓ 1 callers
Function
prod_rules
`prod_buckets` and a 2 bps default as rules, the way prod configures them: a list and a rule per bucket, with the cap of the legacy fees.
crates/orderbook/src/fee_engine.rs:341
↓ 1 callers
Function
protocol_fee
The protocol fee of the trades filling `order`. `Settlement::new` already bounded the sum, so it cannot saturate.
crates/solana-driver/src/domain/settlement.rs:774
↓ 1 callers
Function
protocol_fee
Calculate a single protocol fee based on policy type.
crates/protocol-fees/src/lib.rs:135
↓ 1 callers
Function
protocol_fee
( fulfillment: &Fulfillment, prices: ClearingPrices, protocol_fee: &FeePol
crates/driver/src/domain/competition/solution/fee.rs:411
↓ 1 callers
Function
protocol_fee
( trade: &Trade, fee_policy: &FeePolicy, )
crates/driver/src/domain/competition/solution/scoring.rs:468
↓ 1 callers
Function
protocol_fee
( trade: &Trade, fee_policy: &fee::Policy, )
crates/autopilot/src/domain/settlement/trade/math.rs:482
↓ 1 callers
Function
protocol_fee_in_sell_token
( fulfillment: &Fulfillment, prices: ClearingPrices, policy: &FeePolicy,
crates/driver/src/domain/competition/solution/fee.rs:507
↓ 1 callers
Method
protocol_fee_in_sell_token
Sum of the given protocol fees, converted into sell token at the custom prices.
crates/autopilot/src/domain/settlement/trade/math.rs:111
↓ 1 callers
Function
protocol_fees
( trade: &Trade, fee_policies: &HashMap<OrderUid, impl AsRef<[fee::Policy]>>,
crates/autopilot/src/domain/settlement/trade/math.rs:404
↓ 1 callers
Function
protocol_fees
Calculate total protocol fees for an order. Returns the total fee in the surplus token.
crates/winner-selection/src/arbitrator.rs:377
↓ 1 callers
Method
protocol_fees
(&self)
crates/driver/src/domain/competition/solution/trade.rs:33
↓ 1 callers
Function
proves_failure
Whether the error proves the settlement fails on chain, as opposed to the driver failing to find out. Only a proof drops a solution at solve time: an
crates/solana-driver/src/domain/competition.rs:1245
↓ 1 callers
Method
provide_context
(&self, query: &Query)
crates/price-estimation/src/competition/quote.rs:260
↓ 1 callers
Method
provider
(&self)
crates/liquidity-sources/src/balancer_v2/pool_fetching/registry.rs:40
↓ 1 callers
Function
pubkey
(byte: u8)
crates/solana-driver/src/domain/quote.rs:66
↓ 1 callers
Function
publish
Enqueues the event to be sent to the event bus in a background task.
crates/observe/src/event_bus/mod.rs:168
↓ 1 callers
Function
publish_messages
Reads messages off the in-memory queue and hands the publish ack future off to [`await_acks`].
crates/observe/src/event_bus/mod.rs:108
↓ 1 callers
Method
put_app_data_document
( &self, app_data: Option<AppDataHash>, document: AppDataDocument, )
crates/e2e/src/setup/services.rs:733
← previous
next →
3,301–3,400 of 10,776, ranked by callers