Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cowprotocol/services
/ functions
Functions
10,824 in github.com/cowprotocol/services
⨍
Functions
10,824
◇
Types & classes
3,468
↓ 4 callers
Function
to_amount
Token amounts are `numeric(20,0)` in the database, u64 on chain.
crates/autopilot-svm/src/infra/db.rs:816
↓ 4 callers
Method
to_dex_order
The adapter-facing view of this order.
crates/solana-solvers/src/dto/auction.rs:124
↓ 4 callers
Function
to_interaction
( pool: &liquidity::uniswap::v2::Pool, input: &liquidity::MaxInput, output: &liquidity::ExactOutpu
crates/driver/src/boundary/liquidity/uniswap/v2.rs:87
↓ 4 callers
Function
to_normalized_price
Convert from floating point price to normalized price
crates/price-estimation/src/native/mod.rs:47
↓ 4 callers
Function
token_account
A 165-byte SPL token account holding 1000 tokens, with the given state.
crates/solana-driver/src/infra/blockchain/accounts.rs:197
↓ 4 callers
Function
tokens
Engines see native SOL buys as wSOL buys, see `Order::new`, so a native SOL price is keyed under the wSOL mint. An auction pricing both collides on th
crates/solana-driver/src/infra/solver/dto/auction.rs:254
↓ 4 callers
Method
try_mul_div_floor
(self, mul: Self, div: Self)
crates/chain-types/src/evm.rs:63
↓ 4 callers
Function
tx_from_instructions
Compile client-built instructions into the proto transaction shape: the account list starts with the fee payer, then every referenced key in encounter
crates/solana-indexer/src/indexer/decoder/tests.rs:60
↓ 4 callers
Function
tx_update
(slot: u64, sig: u8)
crates/solana-indexer/src/indexer/ingester/tests.rs:47
↓ 4 callers
Function
u256_to_big_int
(input: &U256)
crates/number/src/conversions.rs:70
↓ 4 callers
Function
u256_to_big_rational
(input: &U256)
crates/number/src/conversions.rs:74
↓ 4 callers
Method
unsigned
The resolved settlement as an unsigned transaction. Signatures, the blockhash and the priority fee are fixed-size, so it has the signed transaction's
crates/solana-driver/src/domain/settlement.rs:418
↓ 4 callers
Function
update
( ex: &mut PgConnection, contract: &str, last_indexed_block: i64, )
crates/database/src/last_indexed_blocks.rs:7
↓ 4 callers
Method
update
(&self, block: u64, store_events: bool)
crates/autopilot/src/solvable_orders.rs:176
↓ 4 callers
Method
update_cache_at_block
(&self, new_block: u64)
crates/liquidity-sources/src/recent_block_cache.rs:268
↓ 4 callers
Method
update_events
(&mut self)
crates/event-indexing/src/event_handler.rs:390
↓ 4 callers
Method
update_orders
Updates the orders that participated in settlements by incrementing their attempt count. `failure` indicates whether the settlement was successful or
crates/driver/src/domain/competition/risk_detector/bad_orders/metrics.rs:100
↓ 4 callers
Function
update_settlement_solver_and_gas
( ex: &mut PgConnection, block_number: i64, log_index: i64, solver: Address, solution_uid:
crates/database/src/settlements.rs:71
↓ 4 callers
Function
user_orders
( ex: &'a mut PgConnection, owner: &'a Address, offset: i64, limit: Option<i64>, )
crates/database/src/order_history.rs:9
↓ 4 callers
Function
validate
The hash a valid document is named by. Valid is a JSON object of at most `size_limit` bytes. The protocol `metadata` is not parsed: the EVM schema typ
crates/solana-orderbook/src/infra/api/routes/app_data/mod.rs:94
↓ 4 callers
Method
validate
(&self, domain_separator: &DomainSeparator)
crates/model/src/order.rs:477
↓ 4 callers
Function
validator
(asserter: Asserter)
crates/order-validation/src/wrappers.rs:84
↓ 4 callers
Function
venue_of
The single venue a captured frame carries.
crates/simulator/src/state_override_stream.rs:660
↓ 4 callers
Function
weth_pool
A pool between "A" and "WETH".
crates/driver/src/tests/setup/mod.rs:756
↓ 4 callers
Method
width
Width in bytes of a field holding this unit.
crates/simulator/src/state_override_stream.rs:59
↓ 4 callers
Method
with_max_native_shortfall
Let the payer's own SOL cover native SOL payout shortfalls up to `max`.
crates/solana-driver/src/domain/settlement.rs:258
↓ 4 callers
Method
with_verification
Configures if verified price estimates should be ranked higher than unverified ones even if the price is worse. Per default verified quotes do not get
crates/price-estimation/src/competition/mod.rs:59
↓ 3 callers
Function
ab_adjusted_pool
(quote: LiquidityQuote)
crates/driver/src/tests/setup/mod.rs:656
↓ 3 callers
Function
ab_liquidity_quote
()
crates/driver/src/tests/setup/mod.rs:671
↓ 3 callers
Function
address
(last_byte: u8)
crates/driver/src/infra/config/file/mod.rs:1437
↓ 3 callers
Method
address
(&self)
crates/liquidity-sources/src/uniswap_v3/event_fetching.rs:59
↓ 3 callers
Method
address
Returns the address of the Safe.
crates/e2e/src/setup/onchain_components/safe.rs:145
↓ 3 callers
Function
aggregate3_response
The `eth_call` response of an `aggregate3` whose sub-calls came back as given, in the order the reader asked for them.
crates/liquidity-sources/src/uniswap_v2/pool_fetching.rs:607
↓ 3 callers
Function
allocator
(generator: MockQuoteIdGenerating, chunk_size: usize)
crates/price-estimation/src/quote_id.rs:78
↓ 3 callers
Function
amm_to_pool
(amm: &ConstantProductOrder)
crates/solver/src/solver.rs:63
↓ 3 callers
Function
amm_to_weighted_pool
(amm: &WeightedProductOrder)
crates/solver/src/solver.rs:72
↓ 3 callers
Function
api_with
(solvers: Vec<Solver>, mocks: impl Into<MocksMap>)
crates/solana-driver/tests/api.rs:121
↓ 3 callers
Method
app_data
(self, app_data: AppData)
crates/driver/src/tests/setup/mod.rs:280
↓ 3 callers
Method
app_data_size_limit
Most bytes an app data document may have.
crates/solana-orderbook/src/infra/api/mod.rs:330
↓ 3 callers
Method
append_events
(&mut self, events: Vec<(T, alloy_rpc_types::Log)>)
crates/event-indexing/src/event_handler.rs:734
↓ 3 callers
Method
apply
The policies that apply to `order` at `now`, in application order.
crates/autopilot-svm/src/domain/fee.rs:36
↓ 3 callers
Function
apply_volume_fees
Applies every `Volume`-type policy in `policies` to `(sell, buy)` in order, compounding each fee on the amount produced by the previous step. Non-volu
crates/autopilot/src/fast_path.rs:690
↓ 3 callers
Method
approval_override
( &self, request: ApprovalOverrideRequest, )
crates/balance-overrides/src/lib.rs:84
↓ 3 callers
Method
as_raw
Returns the fee as a raw [`eth::U256`] value as it is represented on-chain.
crates/driver/src/domain/liquidity/balancer/v2/mod.rs:41
↓ 3 callers
Method
as_str
(self)
crates/database/src/order_events.rs:52
↓ 3 callers
Method
as_str
(&self)
crates/simulator/src/state_override_stream.rs:556
↓ 3 callers
Function
assemble
The solution filling `orders`, which `swap` clears: a single-order solution for one order, a batch for more.
crates/solana-solvers/src/domain/solver/mod.rs:298
↓ 3 callers
Function
assemble_quote_data
Assembles a `QuoteCompetition` from every ranked estimate plus the competition-level context (native prices, gas price, expiration). Fails with [`Calc
crates/shared/src/order_quoting.rs:969
↓ 3 callers
Function
assert_rate_close
Asserts `computed_rate` is within a `tolerance` of `expected_rate`.
crates/price-estimation/src/native/eip4626.rs:294
↓ 3 callers
Function
associated_token_account
(owner: &Pubkey, mint: &Pubkey, program: TokenProgram)
crates/solana-orderbook/src/infra/api/routes/quote/mod.rs:950
↓ 3 callers
Method
atom
(self)
crates/number/src/units.rs:24
↓ 3 callers
Method
auction_id
The ID of the auction being competed on.
crates/driver/src/domain/competition/mod.rs:1029
↓ 3 callers
Method
available
What a solver may fill now: `remaining` scaled down to what the sell token account can fund, like the EVM driver's `Order::available`. A fill-or-kill
crates/solana-driver/src/domain/auction.rs:313
↓ 3 callers
Method
available
Returns the order's available amounts to be passed to a solver engine. See [`Available`] for more details.
crates/driver/src/domain/competition/order/mod.rs:172
↓ 3 callers
Method
backfill
Index every tracked transaction between the persisted watermark and the live tip from RPC history, then advance the watermark to just below that tip.
crates/solana-indexer/src/indexer/decoder/backfill.rs:52
↓ 3 callers
Function
begin_pulls
Parse the `BeginSettle` order at `index` into its pull destinations and amounts.
crates/solana-driver/src/domain/settlement.rs:1533
↓ 3 callers
Method
block_height
The chain's block height, which decides whether a pending sponsored creation can still land, read at most once per `BLOCK_HEIGHT_TTL`. `None` without
crates/solana-orderbook/src/infra/api/mod.rs:354
↓ 3 callers
Function
block_with_base_fee
(base_fee: u64)
crates/gas-price-estimation/src/configurable_alloy.rs:153
↓ 3 callers
Function
blockchain_with_mocks_map
(mocks: MocksMap)
crates/solana-driver/src/domain/auction.rs:495
↓ 3 callers
Method
blocks
(&self, range: RangeInclusive<u64>)
crates/event-indexing/src/block_retriever.rs:49
↓ 3 callers
Method
blocks_passed
(self)
crates/driver/src/domain/mempools.rs:476
↓ 3 callers
Method
boundary
( &self, blockchain: &Blockchain, signer: PrivateKeySigner, )
crates/driver/src/tests/setup/blockchain.rs:198
↓ 3 callers
Method
bsub
(self, other: Self)
crates/liquidity-sources/src/balancer_v2/swap/math.rs:20
↓ 3 callers
Method
build
(&self)
crates/driver/src/tests/boundary.rs:39
↓ 3 callers
Method
buy
The asset being bought, or [`eth::U256::one`] if this is a sell, to facilitate surplus.
crates/driver/src/domain/quote.rs:307
↓ 3 callers
Function
buy_token_destination_from
(destination: DbBuyTokenDestination)
crates/shared/src/db_order_conversions.rs:299
↓ 3 callers
Method
buys_native_sol
Whether the order buys native SOL instead of an SPL token.
crates/autopilot-svm/src/domain/auction.rs:67
↓ 3 callers
Function
cached_balance
Reads an entry without marking it as requested, so polling for a background update does not keep the entry alive.
crates/account-balances/src/cached.rs:243
↓ 3 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/counter/src/lib.rs:897
↓ 3 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/balancerv2weightedpoolfactoryv3/src/lib.rs:1362
↓ 3 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/balancerv2composablestablepoolfactoryv3/src/lib.rs:1401
↓ 3 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/balancerv2composablestablepoolfactoryv5/src/lib.rs:1401
↓ 3 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/balancerv2composablestablepoolfactoryv4/src/lib.rs:1401
↓ 3 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/balancerv2composablestablepoolfactory/src/lib.rs:1401
↓ 3 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/balancerv2weightedpoolfactoryv4/src/lib.rs:1362
↓ 3 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/balancerv2composablestablepoolfactoryv6/src/lib.rs:1401
↓ 3 callers
Function
call_settle
Settle `solution_id` of auction 7 with a submission deadline far off.
crates/solana-driver/tests/api.rs:387
↓ 3 callers
Function
cancel_order
Applies the needed DB modification to cancel a single order.
crates/orderbook/src/database/orders.rs:100
↓ 3 callers
Function
check_batching_many
Function to check batching of many tokens
crates/price-estimation/src/buffered.rs:392
↓ 3 callers
Method
checked_mul_ratio_ceil
(&self, mul: &Self, div: &Self)
crates/number/src/u256_ext.rs:87
↓ 3 callers
Method
clearing_prices
Token prices settled by this solution, expressed using an arbitrary reference unit chosen by the solver. These values are only meaningful in relation
crates/driver/src/domain/competition/solution/mod.rs:653
↓ 3 callers
Function
client
(url: &str)
crates/banned-users/src/hermod.rs:186
↓ 3 callers
Method
close_rejected
Close the window of a settlement that provably never left the driver, so it does not sit open until the deadline sweep mislabels it a timeout. An ambi
crates/autopilot-svm/src/infra/observation.rs:95
↓ 3 callers
Function
coingecko
(route: axum::routing::MethodRouter)
crates/autopilot-svm/src/infra/api.rs:150
↓ 3 callers
Function
competition
( request: &dto::Request, kind: dto::Kind, amount: u64, metadata: CompetitionMetadata, ran
crates/solana-orderbook/src/infra/api/routes/quote/mod.rs:542
↓ 3 callers
Method
competition
The competition that runs auctions for this solver engine.
crates/solana-driver/src/infra/api/mod.rs:126
↓ 3 callers
Function
competition_error
(err: &competition::Error)
crates/driver/src/infra/observe/mod.rs:477
↓ 3 callers
Method
complement
(self)
crates/liquidity-sources/src/balancer_v2/swap/fixed_point.rs:188
↓ 3 callers
Function
compute_absolute_tolerance
Computes the absolute tolerance amount from a relative factor.
crates/solvers/src/domain/dex/shared.rs:15
↓ 3 callers
Method
compute_unit_limit
The compute unit limit the settlement declares and prices its priority fee at: the solution's, or else the runtime's default for a transaction that de
crates/solana-driver/src/domain/settlement.rs:375
↓ 3 callers
Function
config
(enable_buy_orders: bool)
crates/solana-solvers/src/dex/jupiter/mod.rs:197
↓ 3 callers
Function
config
()
crates/driver/src/infra/solver/mod.rs:630
↓ 3 callers
Method
config
Load the specified config file. Otherwise, a temporary config file will be created with reasonable values.
crates/driver/src/tests/setup/mod.rs:840
↓ 3 callers
Function
constant_a_18
(i: u32)
crates/liquidity-sources/src/balancer_v2/swap/fixed_point/logexpmath.rs:91
↓ 3 callers
Function
constant_a_20
(i: u32)
crates/liquidity-sources/src/balancer_v2/swap/fixed_point/logexpmath.rs:75
↓ 3 callers
Function
constant_x_18
(i: u32)
crates/liquidity-sources/src/balancer_v2/swap/fixed_point/logexpmath.rs:67
↓ 3 callers
Function
constant_x_20
(i: u32)
crates/liquidity-sources/src/balancer_v2/swap/fixed_point/logexpmath.rs:51
↓ 3 callers
Method
contributes_to_score
Check if an order contributes to the solution's score. An order contributes to score if: 1. It has fee policies defined (it's a user order from the a
crates/winner-selection/src/auction.rs:54
↓ 3 callers
Function
conversion_row
()
crates/autopilot-svm/src/infra/db.rs:939
↓ 3 callers
Function
convert_onchain_order_placement
( order_placement: &ContractOrderPlacement, event_timestamp: i64, quote: Result<Quote, OnchainOrde
crates/autopilot/src/database/onchain_order_events/mod.rs:618
← previous
next →
1,001–1,100 of 10,824, ranked by callers