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
↓ 2 callers
Method
unfinalized_signatures
The distinct transaction signatures of rows with slots in `(after, through]`, the rows about to become final.
crates/solana-indexer/src/persistence.rs:410
↓ 2 callers
Function
uniform_buy_token_index
Index of the uniform clearing price of a trade's buy token. The native ETH sentinel only exists as a buy token and is paid out by unwrapping WETH, so
crates/autopilot/src/domain/settlement/transaction/mod.rs:202
↓ 2 callers
Function
uniform_tokens
Tokens of the uniform clearing prices, which precede the custom prices the trades point at.
crates/autopilot/src/domain/settlement/transaction/mod.rs:185
↓ 2 callers
Function
unrecorded_dead_creations
Pending sponsored orders whose stored creation transaction died at `block_height` and that carry no `invalid` event yet. Orders past `valid_to` are le
crates/autopilot-svm/src/infra/db.rs:138
↓ 2 callers
Method
until_slot
Run `work` until the node reaches `slot`, `None` if the slot comes first. `work` starts even when the slot has passed, and a failed slot read counts a
crates/solana-driver/src/infra/blockchain/mod.rs:149
↓ 2 callers
Function
unwrap_or_log
Unwraps result or logs a `TOML` parsing error.
crates/solvers/src/infra/config/mod.rs:7
↓ 2 callers
Method
update
(&mut self, result: CacheEntry, max_age: Duration)
crates/price-estimation/src/native_price_cache.rs:122
↓ 2 callers
Method
update_last_handled_blocks
(&mut self, blocks: &[BlockNumberHash])
crates/event-indexing/src/event_handler.rs:564
↓ 2 callers
Function
update_table_rows
(pool: &PgPool)
crates/autopilot-svm/src/infra/db.rs:849
↓ 2 callers
Function
updated_order_uids_after
( ex: &mut PgConnection, after_block: i64, )
crates/database/src/orders.rs:1137
↓ 2 callers
Method
upload
Upload the bytes json encoded to the configured S3 bucket. Returns the key under which the file can be queried
crates/s3/src/lib.rs:80
↓ 2 callers
Method
upload_gzipped
Uploads bytes that are already gzip-compressed JSON, tagging the object with `Content-Encoding: gzip`. NOTE: PUT's the whole gzipped blob, if the gzip
crates/s3/src/lib.rs:107
↓ 2 callers
Method
upload_json_bytes
Uploads bytes which are expected to be valid JSON to the configured S3 bucket. Compresses the bytes before uploading. Returns the key under which the
crates/s3/src/lib.rs:95
↓ 2 callers
Function
url_join
Joins `path` onto `url` with exactly one slash between them. Reusing `Url::join` is unreliable here because a base URL without a trailing slash drops
crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs:66
↓ 2 callers
Method
user_orders
( &self, owner: &Address, offset: u64, limit: Option<u64>, )
crates/orderbook/src/database/orders.rs:394
↓ 2 callers
Function
user_surplus
(trade: &Trade)
crates/driver/src/domain/competition/solution/scoring.rs:522
↓ 2 callers
Method
user_surplus
Amount of value the user got above the order's limit price denominated in the surplus token.
crates/driver/src/domain/competition/solution/scoring.rs:145
↓ 2 callers
Method
valid_to
(self, valid_to: u32)
crates/driver/src/tests/setup/mod.rs:264
↓ 2 callers
Function
validate
(rules: Vec<RuleDefinition>)
crates/fee-engine/src/rules.rs:595
↓ 2 callers
Method
validate
Parses and validates the provided app data bytes, returns the validated Valid app data is considered to be: 1. Below or equal to [`Validator::size_li
crates/app-data/src/app_data.rs:287
↓ 2 callers
Method
validation
Bounds on a quoted order's `validTo`.
crates/solana-orderbook/src/infra/api/mod.rs:276
↓ 2 callers
Method
vault
(&self)
crates/solver/src/liquidity/balancer_v2.rs:124
↓ 2 callers
Method
vault_relayer
(&self)
crates/account-balances/src/simulation.rs:32
↓ 2 callers
Method
vendor_source
(&self, name: &str, source: Src)
contracts/src/vendor.rs:326
↓ 2 callers
Function
volume
(bps: f64)
crates/fee-engine/src/evaluator.rs:266
↓ 2 callers
Function
volume_factors
(fees: &[Fee])
crates/orderbook/src/fee_engine.rs:257
↓ 2 callers
Function
volume_share_before_settlement
The share `factor` takes of the fill's volume in the surplus token: the executed buy leg of a sell order, the executed sell leg of a buy order.
crates/protocol-fees/src/lib.rs:241
↓ 2 callers
Function
wait_for_pending_txs
(provider: &impl Provider, address: Address)
crates/driver/src/infra/solver/eip7702.rs:472
↓ 2 callers
Method
wait_until
Polls `/pools?limit=1` every [`WAIT_UNTIL_POLL_INTERVAL`] until the envelope reports `block_number >= target_block`. Returns immediately if already th
crates/liquidity-sources/src/uniswap_v3/pool_indexer.rs:221
↓ 2 callers
Method
wait_until_block_processed
(&self, target: SyncTarget)
crates/autopilot/src/maintenance.rs:59
↓ 2 callers
Method
warn_skipped
Logs the rules the evaluation skipped, grouped with the same skips once a second.
crates/fee-engine/src/report.rs:199
↓ 2 callers
Function
wei_to_decimal
Convert a U256 wei amount to a decimal string using the token's decimals. e.g., 1000000000000000000 with 18 decimals → "1"
crates/solvers/src/infra/dex/bitget/mod.rs:22
↓ 2 callers
Method
weth
(&self)
crates/driver/src/infra/blockchain/contracts.rs:134
↓ 2 callers
Method
weth
(&self)
crates/autopilot/src/infra/blockchain/contracts.rs:139
↓ 2 callers
Method
weth_address
(&self)
crates/driver/src/infra/blockchain/contracts.rs:138
↓ 2 callers
Function
with
(tx: Tx, block: eth::BlockNo)
crates/simulator/src/lib.rs:194
↓ 2 callers
Method
with_additional_cost
Adjusts the quote fee to include arbitrary additional costs.
crates/shared/src/order_quoting.rs:159
↓ 2 callers
Method
with_app_data
(mut self, app_data: [u8; 32])
crates/model/src/order.rs:107
↓ 2 callers
Method
with_buffers_internalizations
Returns `self` with eligible interactions internalized using the Settlement contract buffers. Currently, this internalizes all interactions with inpu
crates/solvers/src/domain/solution.rs:50
↓ 2 callers
Method
with_domain
(self, order: &dex::Order, slippage: &dex::Slippage)
crates/solvers/src/infra/dex/okx/dto.rs:76
↓ 2 callers
Method
with_key
(&self, request: reqwest::RequestBuilder)
crates/solana-solvers/src/dex/jupiter/mod.rs:122
↓ 2 callers
Method
with_metric_label
Clones self and returns an instance that captures metrics extended with the provided label.
crates/simulator/src/ethereum/mod.rs:83
↓ 2 callers
Function
with_middleware
Wraps all routes in the middleware every request passes through before reaching its handler.
crates/driver/src/infra/api/mod.rs:196
↓ 2 callers
Method
with_native_prices
A copy with `prices` applied to the matching tokens. Tokens absent from `prices` keep their existing price.
crates/driver/src/domain/competition/auction.rs:189
↓ 2 callers
Method
with_partially_fillable
(mut self, partially_fillable: bool)
crates/model/src/order.rs:127
↓ 2 callers
Method
with_presign
(mut self, owner: Address)
crates/model/src/order.rs:169
↓ 2 callers
Function
with_protocol_fees
( fulfillment: &Fulfillment, prices: ClearingPrices, )
crates/driver/src/domain/competition/solution/fee.rs:372
↓ 2 callers
Method
with_receiver
(mut self, receiver: Receiver)
crates/model/src/order.rs:112
↓ 2 callers
Method
with_scaled_sell_amount
Scales order buy amount to the specified sell amount. This allows scaling the quoted amounts to some lower sell amount accounting for fees (for quote
crates/shared/src/order_quoting.rs:181
↓ 2 callers
Method
with_score
(self, score: Score)
crates/winner-selection/src/state.rs:82
↓ 2 callers
Method
with_sell_amount
Set the sell amount for the order.
crates/e2e/tests/e2e/refunder.rs:140
↓ 2 callers
Method
with_solver_fee
Inject the configured solver fee (see [`crate::infra::Solver::solver_fee`]) so that the existing protocol fee machinery makes the delivered price corr
crates/driver/src/domain/competition/auction.rs:121
↓ 2 callers
Method
with_timeout
(mut self, timeout: Duration)
crates/e2e/src/setup/services.rs:89
↓ 2 callers
Method
with_valid_to
(mut self, valid_to: u32)
crates/model/src/order.rs:102
↓ 2 callers
Method
without_wallet
(&self)
crates/ethrpc/src/alloy/mod.rs:137
↓ 2 callers
Function
workspace_root
()
contracts/src/main.rs:67
↓ 2 callers
Method
wrapped
Treats native ETH like the wrapped native token, so that buckets and the price map don't need to contain the ETH marker address.
crates/autopilot/src/domain/penalty_cap.rs:136
↓ 2 callers
Method
wrapped_native_token
Wrapped version of the native token (e.g. WETH for Ethereum, WXDAI for Gnosis Chain)
crates/autopilot/src/infra/blockchain/contracts.rs:145
↓ 2 callers
Function
writable_accounts
The accounts a transaction of `instructions` paid by `payer` locks as writable, the payer first and each once: the accounts whose recent prioritizatio
crates/solana-driver/src/domain/settlement.rs:452
↓ 2 callers
Method
writable_accounts
The accounts the settlement transaction locks as writable, the fee payer first: the accounts whose recent prioritization fees price it.
crates/solana-driver/src/domain/settlement.rs:368
↓ 2 callers
Method
write_finalized_slot
Advance the finalized watermark. Update-only: before the first flush there is no state row and nothing indexed to finalize. A backward write is a no-o
crates/solana-indexer/src/persistence.rs:551
↓ 1 callers
Method
BALANCE_MANAGER
( data: &[u8], )
contracts/generated/contracts-generated/liquoricesettlement/src/lib.rs:7632
↓ 1 callers
Method
DOMAIN_SEPARATOR
(data: &[u8])
contracts/generated/contracts-generated/permit2/src/lib.rs:3601
↓ 1 callers
Method
SETTLEMENT
(data: &[u8])
contracts/generated/contracts-generated/icowwrapper/src/lib.rs:436
↓ 1 callers
Function
_ln
(mut a: I256)
crates/liquidity-sources/src/balancer_v2/swap/fixed_point/logexpmath.rs:177
↓ 1 callers
Function
_ln_36
(mut x: I256)
crates/liquidity-sources/src/balancer_v2/swap/fixed_point/logexpmath.rs:216
↓ 1 callers
Method
abi_only
Creates a context for vendoring only the contract ABI for generating bindings. This is preferred over [`Vendor::full`] for contracts that do not need
contracts/src/vendor.rs:249
↓ 1 callers
Method
absolute_cap_in_native
The absolute USD bound converted into native token using the last known price of the reference token. Returns `U256::MAX` if `absolute_cap_atoms * pri
crates/autopilot/src/domain/penalty_cap.rs:147
↓ 1 callers
Function
accept_by_simulation
Lets a passing settlement simulation accept a flashloan order that the signature or transfer check rejected. Every other simulation outcome keeps the
crates/shared/src/order_validation.rs:193
↓ 1 callers
Method
access_list_for_eth_transfer
Computes access list for sending native eth to the given receiver. This access list may be needed to make sending ETH to smart contract wallets possib
crates/simulator/src/lib.rs:84
↓ 1 callers
Method
account
The account which should be used to sign settlements for this solver.
crates/driver/src/infra/solver/mod.rs:329
↓ 1 callers
Function
account_count
Total accounts a transaction resolves to: its static keys plus every address loaded from its lookup tables.
crates/solana-driver/src/domain/competition.rs:1218
↓ 1 callers
Function
account_keys
The message's account keys in index order: the static keys, then the writable and the readonly addresses its lookup tables load.
crates/solana-orderbook/examples/decode_bundle.rs:297
↓ 1 callers
Function
account_update
(slot: u64, sig: u8)
crates/solana-indexer/src/indexer/ingester/tests.rs:60
↓ 1 callers
Function
accounts_to_create
The setup accounts the settlement must create before `BeginSettle`, each list sorted and deduplicated: the mints whose buffer PDA is missing on chain,
crates/solana-driver/src/domain/settlement.rs:503
↓ 1 callers
Method
active
Returns the inner pool data if it is active, `None` otherwise.
crates/liquidity-sources/src/balancer_v2/pools/mod.rs:62
↓ 1 callers
Method
actual_valid_to
Returns a materialized valid-to value for the specified validity.
crates/model/src/quote.rs:198
↓ 1 callers
Method
add_contract
(mut self, contract: Contract)
contracts/src/codegen.rs:81
↓ 1 callers
Method
add_ethflow_indexing
Registers all maintenance tasks that are necessary to correctly support ethflow orders.
crates/autopilot/src/maintenance.rs:248
↓ 1 callers
Method
add_submodule
(mut self, submodule: Submodule)
contracts/src/codegen.rs:86
↓ 1 callers
Function
address
(id: u64)
crates/autopilot/src/domain/competition/winner_selection.rs:1152
↓ 1 callers
Method
adjust_query
Builds the query forwarded to the inner estimator, substituting the native token for an ETH side and reporting the gas adjustment that has to be appli
crates/price-estimation/src/sanitized.rs:68
↓ 1 callers
Function
adjust_quote_to_order_limits
(order: Order, quote: Quote)
crates/autopilot/src/domain/settlement/trade/math.rs:571
↓ 1 callers
Method
adjusted_reserve_b
Restores reserve_b value from the given reserve_a and the quote. Reverse operation for the `blockchain::Pool::out` function <https://en.wikipedia.org/
crates/driver/src/tests/setup/mod.rs:449
↓ 1 callers
Function
advance_checkpoint
Moves the checkpoint from `from` to `to`. If the stored checkpoint no longer matches `from` (another writer already advanced it), this is a no-op and
crates/pool-indexer/src/db/uniswap_v3.rs:59
↓ 1 callers
Method
aggregate
(data: &[u8])
contracts/generated/contracts-generated/multicall3/src/lib.rs:3994
↓ 1 callers
Method
aggregate3
(data: &[u8])
contracts/generated/contracts-generated/multicall3/src/lib.rs:4056
↓ 1 callers
Function
all_settlement_tx_hashes
( ex: &mut PgConnection, )
crates/database/src/settlements.rs:127
↓ 1 callers
Method
all_solvable_orders
Finds solvable orders based on the order's min validity period.
crates/autopilot/src/infra/persistence/mod.rs:173
↓ 1 callers
Method
all_solvable_orders
(&self, min_valid_to: u32)
crates/autopilot/src/database/auction.rs:72
↓ 1 callers
Function
all_tables
()
crates/database/src/lib.rs:81
↓ 1 callers
Function
allow_failed_buy_token_transfer
The simulation requires the settlement contract to have enough buy tokens to pay out the order directly. But it's also possible that we fail to comput
crates/shared/src/order_creation_simulation.rs:259
↓ 1 callers
Function
allow_unfunded_presign_order
PreSign orders are currently the only ones that are allowed to be placed without any balance at all. If we detect a revert of the sell token transfer
crates/shared/src/order_creation_simulation.rs:289
↓ 1 callers
Method
allowance
( &self, owner: Address, token: Address, source: SellTokenSource, )
crates/account-balances/src/simulation.rs:135
↓ 1 callers
Method
allowance
Fetch the ERC20 allowance for the spender. See the allowance method in EIP-20. https://eips.ethereum.org/EIPS/eip-20#allowance
crates/driver/src/infra/blockchain/token.rs:30
↓ 1 callers
Method
allowances
Return the allowances in a normalized form, where there is only one allowance per [`eth::allowance::Spender`], and they're ordered deterministically.
crates/driver/src/domain/competition/solution/mod.rs:515
↓ 1 callers
Method
amount
Returns the order swapped amount as an asset. The token associated with the asset is dependent on the side of the DEX order.
crates/solvers/src/domain/dex/mod.rs:47
↓ 1 callers
Method
amount_in
(&self, amount_out: U256, reserve_in: U256, reserve_out: U256)
crates/liquidity-sources/src/uniswap_v2/pool_fetching.rs:136
↓ 1 callers
Method
amount_out
(&self, amount_in: U256, reserve_in: U256, reserve_out: U256)
crates/liquidity-sources/src/uniswap_v2/pool_fetching.rs:119
↓ 1 callers
Function
analyze_simulation
Runs the simulation, handles errors caused by fundamental limitations of the simulation approach and returns a comprehensive report in case of an erro
crates/shared/src/order_creation_simulation.rs:158
← previous
next →
2,201–2,300 of 10,776, ranked by callers