Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cowprotocol/services
/ TokenAmount
Class
TokenAmount
crates/shared/src/http_solver.rs:8–11 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
6
7
#[derive(Clone, Debug, Default, Eq, PartialEq)]
8
pub struct TokenAmount {
9
pub amount: U256,
10
pub token: Address,
11
}
12
13
impl TokenAmount {
14
pub fn new<T: Into<U256>>(token: Address, amount: T) -> Self {
Callers
10
haircut_tightens_buy_for_sell_order
Function · 0.50
haircut_tightens_sell_for_buy_order
Function · 0.50
tx
Function · 0.50
sell_amount
Method · 0.50
buy_amount
Method · 0.50
score
Method · 0.50
new
Method · 0.50
surplus_in_ether
Method · 0.50
fee_in_ether
Method · 0.50
protocol_fees
Method · 0.50
Calls
no outgoing calls
Tested by
3
haircut_tightens_buy_for_sell_order
Function · 0.40
haircut_tightens_sell_for_buy_order
Function · 0.40
new
Method · 0.40