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
anchor_error_name
The name an Anchor program logs with error `code`, from its `AnchorError ... Error Code: <name>. Error Number: <code>. ...` line. Anchor logs it right
crates/solana-driver/src/domain/program_error.rs:120
↓ 1 callers
Function
api_requests_counter
Parse the `pool_indexer_api_requests` Prometheus counter for a given route from the indexer's /metrics endpoint.
crates/e2e/tests/e2e/pool_indexer.rs:372
↓ 1 callers
Function
app
A solver router mounted like in [`Api::serve`], whose `/solve` handler streams the raw request body like the real one does.
crates/driver/src/infra/api/mod.rs:258
↓ 1 callers
Function
app_data
The app data of an order as the rules see it.
crates/shared/src/fee_engine.rs:38
↓ 1 callers
Method
append_custom_order_info_to_db
( &self, ex: &mut PgTransaction<'a>, custom_onchain_data: Vec<EthFlowDataForDb>, )
crates/autopilot/src/database/onchain_order_events/ethflow_events.rs:85
↓ 1 callers
Function
append_events
( transaction: &mut PgTransaction<'_>, events: Vec<(GPv2SettlementEvents, Log)>, )
crates/autopilot/src/database/events.rs:79
↓ 1 callers
Method
append_events
( &mut self, events: Vec<(BalancerV2BasePoolFactoryEvents, Log)>, )
crates/liquidity-sources/src/balancer_v2/pool_fetching/pool_storage.rs:201
↓ 1 callers
Method
append_main_interactions
( mut self, interactions: impl IntoIterator<Item = InteractionData>, )
crates/simulator/src/simulation_builder.rs:187
↓ 1 callers
Method
append_post_interactions
( mut self, interactions: impl IntoIterator<Item = InteractionData>, )
crates/simulator/src/simulation_builder.rs:195
↓ 1 callers
Method
append_pre_interactions
( mut self, interactions: impl IntoIterator<Item = InteractionData>, )
crates/simulator/src/simulation_builder.rs:179
↓ 1 callers
Function
apply_account_override
Applies `new` to the override map for `address`. If `address` already has an entry, the overrides are merged via [`merge_account_override`]. Returns
crates/simulator/src/encoding.rs:752
↓ 1 callers
Method
apply_policies
( &self, order: &boundary::Order, quote: &domain::Quote, partner_fees: Vec<Pol
crates/autopilot/src/domain/fee/mod.rs:246
↓ 1 callers
Method
apply_to
Multiplies an amount by this factor, using high precision scaling to support sub-basis-point factors. Returns `None` if the multiplication overflows.
crates/configs/src/autopilot/penalty_cap.rs:56
↓ 1 callers
Function
apply_to_trade
(policies: &[FeePolicy], trade: &Trade, order: &Order)
crates/solana-driver/src/domain/protocol_fee.rs:70
↓ 1 callers
Method
apply_to_trade
(self, trade: &Trade, order: &Order)
crates/solana-driver/src/domain/solver_fee.rs:122
↓ 1 callers
Method
approvals
Approval interactions necessary for encoding the settlement. To support tokens like USDT which first need to have their allowance set to 0 before it c
crates/driver/src/domain/competition/solution/mod.rs:359
↓ 1 callers
Function
approve_step
Pin a delegation to the order: the sell token account approves the settlement state PDA, signed by the order owner.
crates/solana-orderbook/src/infra/api/routes/create_order/mod.rs:1159
↓ 1 callers
Method
archive_auction
(&self, id: domain::auction::Id, auction: &domain::RawAuctionData)
crates/autopilot/src/infra/persistence/mod.rs:124
↓ 1 callers
Method
archive_auction_gzipped
Archives the auction body to S3 (fire and forget). The body is gzip-compressed while streaming to the solver; the compressed bytes arrive through `com
crates/driver/src/infra/persistence/mod.rs:64
↓ 1 callers
Method
archives_enabled
Whether auction archival to S3 is configured.
crates/driver/src/infra/persistence/mod.rs:57
↓ 1 callers
Method
artifacts_path
(&self, artifacts_dir: &Path)
contracts/src/codegen.rs:264
↓ 1 callers
Function
as_erc20
If the token is native, return the ERC20 wrapped version.
crates/chain-types/src/evm.rs:14
↓ 1 callers
Method
as_factor
Returns the slippage as a decimal factor.
crates/solvers/src/domain/dex/slippage.rs:74
↓ 1 callers
Method
as_jit
Return JIT order if it's a JIT order.
crates/autopilot/src/domain/settlement/trade/mod.rs:36
↓ 1 callers
Method
as_label
(self)
crates/observe/src/event_bus/mod.rs:214
↓ 1 callers
Method
as_percent
Returns the slippage as a percentage. e.g. 0.01 → 1.0.
crates/solvers/src/domain/dex/slippage.rs:85
↓ 1 callers
Method
ask
Ask one driver to quote `order`. An error is the `price_estimates` result the failure counts as.
crates/solana-orderbook/src/infra/quoter.rs:247
↓ 1 callers
Method
assemble_auction
(&self, tasks: &DataFetchingTasks)
crates/driver/src/domain/competition/mod.rs:682
↓ 1 callers
Method
assemble_fake_order
Builds a fake order that has the expected sell and buy token but has a limit price that is trivial to achieve. We do this to avoid reverts in case the
crates/price-estimation/src/trade_verifier.rs:448
↓ 1 callers
Method
assemble_flashloan_hints
( &self, auction: &Auction, )
crates/driver/src/infra/solver/mod.rs:537
↓ 1 callers
Method
assemble_tasks
(&self, request: Request<Body>)
crates/driver/src/domain/competition/pre_processing.rs:166
↓ 1 callers
Method
assemble_wrappers
(&self, auction: &Auction)
crates/driver/src/infra/solver/mod.rs:555
↓ 1 callers
Function
assert_allows_failed_transfer
( create_error: impl Fn() -> TransferSimulationError + Send + 'static, is_expected_err
crates/shared/src/order_validation.rs:2689
↓ 1 callers
Function
assert_bad_request_message
(err: PriceEstimationError, expected_message: &str)
crates/autopilot/src/infra/api.rs:139
↓ 1 callers
Method
assert_credentials_are_usable
Uploads a small test file to verify that the credentials loaded from the environment allow uploads to S3.
crates/s3/src/lib.rs:127
↓ 1 callers
Function
assert_matches_api
Fails unless `view` equals `api` up to the view's two conversions: decimal strings become doubles and hex strings become lowercase.
crates/fee-engine/src/order_view/mod.rs:273
↓ 1 callers
Function
assert_settle_success
( settle_result: Result<reqwest::Result<reqwest::Response>, tokio::task::JoinError>, auction_id: &str,
crates/e2e/tests/e2e/parallel_settlement.rs:344
↓ 1 callers
Function
assert_solver_delegates_to_expected_contract
( web3: &Web3, solver: Address, callers: [Address; 2], )
crates/e2e/tests/e2e/parallel_settlement.rs:230
↓ 1 callers
Function
ata_rent
The rent-exempt minimum under `rent`, in lamports, of a new associated token account of the mint at `mint`, see [`ata_len`].
crates/solana-token/src/lib.rs:235
↓ 1 callers
Method
attach_label
(&self, req: &mut SerializedRequest)
crates/ethrpc/src/alloy/instrumentation.rs:52
↓ 1 callers
Function
auction
(id: Id)
crates/solvers-dto/src/auction.rs:429
↓ 1 callers
Method
auction
Records an auction, or a cut that found no order for one.
crates/autopilot-svm/src/run.rs:60
↓ 1 callers
Method
auction_id
(&self)
crates/autopilot/src/settle_call.rs:40
↓ 1 callers
Method
auction_id
(&self)
crates/autopilot/src/domain/settlement/mod.rs:68
↓ 1 callers
Function
auction_participants
( ex: &mut PgConnection, auction_id: i64, )
crates/e2e/tests/e2e/database.rs:81
↓ 1 callers
Function
auction_prices
( ex: &mut PgConnection, auction_id: i64, )
crates/e2e/tests/e2e/database.rs:93
↓ 1 callers
Function
auction_snapshot
The stored auction body: the solver-facing content without the deadline, which is only known at dispatch.
crates/autopilot-svm/src/infra/provider.rs:381
↓ 1 callers
Method
available
What a solver may fill: `remaining` scaled down to `sell_balance` for a partially fillable order. A fill-or-kill order keeps its remainder. The cut ju
crates/autopilot-svm/src/domain/auction.rs:91
↓ 1 callers
Function
await_acks
Awaits JetStream publish acks concurrently and logs any failures. Runs until the publisher task drops its sender and all in-flight acks have resolved,
crates/observe/src/event_bus/mod.rs:133
↓ 1 callers
Method
backend_count
Returns the total number of backends configured. Used to determine how many retry attempts to make before giving up.
crates/e2e/src/setup/proxy.rs:66
↓ 1 callers
Function
backfill_decimals
Decimals counterpart of [`backfill_symbols`]. Uses `-1` as the "tried and failed" sentinel.
crates/pool-indexer/src/indexer/uniswap_v3.rs:562
↓ 1 callers
Method
backfill_inner
(&self)
crates/solana-indexer/src/indexer/decoder/backfill.rs:67
↓ 1 callers
Function
backfill_symbols
Periodically fills `token{0,1}_symbol` on newly-indexed pools. Tokens whose `symbol()` call fails (revert / decode / empty) are stored as `""` so the
crates/pool-indexer/src/indexer/uniswap_v3.rs:474
↓ 1 callers
Method
bad_order_detection
(&self)
crates/driver/src/infra/solver/mod.rs:301
↓ 1 callers
Function
balance
An account's balance in `unit`, zero for a missing account or one that is no token or order account.
crates/solana-orderbook/src/infra/verifier.rs:604
↓ 1 callers
Method
balance_helper
(&self)
crates/driver/src/infra/blockchain/contracts.rs:150
↓ 1 callers
Method
balance_simulator
(&self)
crates/driver/src/infra/blockchain/mod.rs:164
↓ 1 callers
Method
balances
(&self)
crates/autopilot/src/infra/blockchain/contracts.rs:123
↓ 1 callers
Method
balances_address
Ensure that the Balances contract is deployed to a specific address
crates/driver/src/tests/setup/mod.rs:863
↓ 1 callers
Method
banned_in_batch
Checks `batch` with one request. Requires `batch` to have at most [`MAX_BATCH_SIZE`] items; extra items are not checked.
crates/order-validation/src/banned/hermod.rs:125
↓ 1 callers
Method
base_fee
(&self)
crates/gas-price-estimation/src/fake.rs:26
↓ 1 callers
Method
base_fee
(&self)
crates/gas-price-estimation/src/configurable_alloy.rs:121
↓ 1 callers
Method
base_fee
(&self)
crates/gas-price-estimation/src/gas_price.rs:40
↓ 1 callers
Function
base_pool_factory
( contract_instance: &BalancerFactoryInstance, )
crates/liquidity-sources/src/balancer_v2/pool_fetching/registry.rs:135
↓ 1 callers
Function
base_token_pairs
All token pairs between base tokens.
crates/solvers/src/boundary/routing.rs:225
↓ 1 callers
Function
batch_order
The swap to quote for `orders`, orders of one side on one pair: their mints, destination and side, over their totals. `None` for no orders or when the
crates/solana-solvers/src/domain/solver/mod.rs:360
↓ 1 callers
Function
batch_set_token_decimals
Sets `token0_decimals` / `token1_decimals` for every pool containing one of the input tokens. Pass `-1` for "tried, failed" so the next backfill's `IS
crates/pool-indexer/src/db/uniswap_v3.rs:563
↓ 1 callers
Function
batch_set_token_symbols
Symbol-side counterpart of [`batch_set_token_decimals`]. Pass `""` for "tried, failed".
crates/pool-indexer/src/db/uniswap_v3.rs:602
↓ 1 callers
Function
batch_size
(size: usize)
crates/price-estimation/src/native/coingecko.rs:346
↓ 1 callers
Function
batch_update_pool_liquidity
( tx: &mut Transaction<'_, Postgres>, factory: &Address, updates: &[LiquidityUpdateData], )
crates/pool-indexer/src/db/uniswap_v3.rs:189
↓ 1 callers
Function
batch_update_ticks
( tx: &mut Transaction<'_, Postgres>, factory: &Address, deltas: &[TickDeltaData], )
crates/pool-indexer/src/db/uniswap_v3.rs:299
↓ 1 callers
Function
batched_for_each
Batches a stream into chunks. This is very similar to `futures::stream::StreamExt::ready_chunks` with the difference that it allows configuring a min
crates/price-estimation/src/buffered.rs:212
↓ 1 callers
Method
batches
The batches to quote: the orders of each side, directed mint pair and swap destination, most permissive first, in runs of up to `max_batch_size` whose
crates/solana-solvers/src/domain/solver/mod.rs:146
↓ 1 callers
Method
bdiv_up
(self, other: Self)
crates/liquidity-sources/src/balancer_v2/swap/math.rs:31
↓ 1 callers
Function
begin_settle
The `BeginSettle` instruction pulling each order's sell tokens. The program only records `auction_id`, zero for a quote's simulated settlement.
crates/solana-driver/src/domain/settlement.rs:894
↓ 1 callers
Method
best
The best estimate.
crates/price-estimation/src/lib.rs:268
↓ 1 callers
Function
bids
(bids: &[domain::competition::Bid<Unscored>])
crates/autopilot/src/run_loop.rs:1250
↓ 1 callers
Function
big_uint_to_u160
(input: &BigUint)
crates/number/src/conversions.rs:93
↓ 1 callers
Function
binary_name
()
crates/observe/src/heap_dump_handler.rs:112
↓ 1 callers
Function
binary_name
()
crates/observe/src/tracing/reload_handler.rs:47
↓ 1 callers
Function
bisecting_get_logs_with_depth
( provider: &AlloyProvider, from: u64, to: u64, addresses: Vec<Address>, topics: Vec<B256>
crates/pool-indexer/src/indexer/uniswap_v3.rs:728
↓ 1 callers
Function
block_below
The slot of the block `age` blocks below the one at `latest`, given the ascending slots of the blocks up to `latest`.
crates/solana-driver/src/infra/blockchain/mod.rs:295
↓ 1 callers
Method
block_gas_limit
(&self)
crates/driver/src/infra/blockchain/mod.rs:209
↓ 1 callers
Function
block_timestamp_drift
Seconds between a block's own timestamp and when we observed it. Negative if the block claims a timestamp in the future. Includes any local clock skew
crates/ethrpc/src/block_stream.rs:383
↓ 1 callers
Function
block_with_timestamp
(unix_timestamp: u64)
crates/autopilot/src/run_loop.rs:1289
↓ 1 callers
Method
blockhash_below
The hash of the block `age` blocks below the latest one, `None` when the search finds no block at that height. Blocks sit at distinct slots, so the `2
crates/solana-driver/src/infra/blockchain/mod.rs:124
↓ 1 callers
Method
blocks
The slots of the confirmed blocks from `start` to `end`, both included, in ascending order.
crates/cow-solana-rpc/src/lib.rs:188
↓ 1 callers
Method
blocks_in
Returns the number of blocks that fits into the given time (in milliseconds)
crates/chain/src/lib.rs:118
↓ 1 callers
Method
body_size
(&self)
crates/autopilot/src/infra/solvers/dto/solve.rs:116
↓ 1 callers
Function
bps
Factors in basis points, as `protocolFeeBps` shows them.
crates/orderbook/src/fee_engine.rs:267
↓ 1 callers
Method
bps
Returns the fee in basis points.
crates/driver/src/domain/liquidity/swapr.rs:51
↓ 1 callers
Function
bucket
(tokens: &[Address])
crates/orderbook/src/fee_engine.rs:316
↓ 1 callers
Function
build_api_state
(db: &PgPool, network: &NetworkConfig)
crates/pool-indexer/src/run.rs:152
↓ 1 callers
Method
build_approximation_tokens
Builds the approximation tokens mapping with normalization factors based on decimal differences between token pairs.
crates/price-estimation/src/factory.rs:515
↓ 1 callers
Method
build_auction_requests
Builds the auction requests, if no drivers have opted-in to delta-auctions or if a checkpoint is due, the second request will effectively be a copy of
crates/autopilot/src/run_loop.rs:643
↓ 1 callers
Function
build_auctions
( db_auctions: Vec<DbAuction>, db_solutions: Vec<DbProposedSolution>, db_executions: Vec<DbOrderEx
crates/orderbook/src/database/debug_report.rs:97
↓ 1 callers
Function
build_final_state_overrides
Resolves all [`AccountOverrideRequest`]s concurrently on a best-effort basis. Returns the fully resolved state overrides and [`AccountOverrideRequest`
crates/simulator/src/encoding.rs:578
↓ 1 callers
Function
build_module
()
contracts/src/main.rs:92
↓ 1 callers
Function
build_native_prices
(data: &QuoteCompetition)
crates/shared/src/quote_storage.rs:165
↓ 1 callers
Function
build_naturally_failing_replay_simulation
( rpc_url: &str, full_app_data: &str, )
crates/simulator/tests/aave_replay.rs:242
← previous
next →
2,301–2,400 of 10,776, ranked by callers