Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cowprotocol/solver-rewards/llms.txt
Use this file to discover all available pages before exploring further.
Transfer is the core payment primitive in the solver rewards pipeline. Every reimbursement — whether in a network’s native token or in COW — is represented as a Transfer before being encoded into a Safe multisend transaction.
Defined in src/models/transfer.py.
TokenType enum
TokenType lives in src/models/token.py and classifies whether a transfer sends the chain’s native asset or an ERC-20 token.
Token class
Token pairs an on-chain address with its decimal precision. When decimals is omitted the value is fetched via eth_call. Providing it explicitly avoids an RPC call and is preferred in unit tests.
Transfer class
Constructor parameters
The ERC-20 token to transfer. Pass
None for a native token transfer (ETH, xDAI, etc.). When None, token_type returns TokenType.NATIVE and amount is divided by 10¹⁸.The
dune_client.types.Address of the solver wallet that will receive the payment.Transfer amount in the smallest token unit (wei / atoms). Must be strictly positive — the constructor raises
AssertionError if amount_wei <= 0.Properties
Read-only access to the
_recipient field.Returns
TokenType.NATIVE when token is None, otherwise TokenType.ERC20.Human-readable transfer amount in token units (not atoms).
- Native transfers:
amount_wei / 10¹⁸ - ERC-20 transfers:
amount_wei / 10^token.decimals
Methods
Transfer.summarize(transfers)
Class-level utility that prints a one-line summary of a list of transfers, totalling native and COW amounts separately.
as_multisend_tx()
Encodes the transfer as a MultiSendTx ready to be batched into a Safe multisend call.
| Token type | to | value | data |
|---|---|---|---|
NATIVE | Recipient address | amount_wei | 0x (empty) |
ERC20 | Token contract address | 0 | ABI-encoded transfer(address,uint256) |
CSVTransfer
CSVTransfer is the serialisation-friendly variant used when writing output CSV files for import into the Safe app.
Transfer via the class method:
The Safe Airdrop app expects native transfers to have a
null / absent token_address. CSVTransfer.from_transfer() sets token_address=None when the source transfer has no token.