Compound Transaction
Returns a transaction for depositing additional ETH to an active 0x02 validator. Deposit amount must be at least 1 ETH.
How to sign the compound tx
If funding_address is not provided, the API uses the validator's withdrawal address as the funding address by default. The transaction must be signed using the withdrawal address.
If funding_address is provided and it's a different address from withdrawal address, the transaction must be signed using the specified funding address.
signature and withdrawal_credentials are "all zeros"
When parsing the call data of the serialized transaction, you will notice that both signature and withdrawal_credentials are all-zeros. This is normal and expected for compound transactions. Here’s an example for reference
API Data Structure
network
- Type: string
- Allowed Values:
mainnet,hoodi - Required: Yes
amount
- Type: string
- Required: Yes
- Description: Amount to deposit in ETH
pubkey
- Type: string
- Required: Yes
funding_address
- Type: string
- Description: Address funding the transaction. Defaults to withdrawal address.
Responses
201 Created Deposit
{
"data": {
"network": "string",
"signing_payload": "string",
"unsigned_transaction_serialized": "string",
"contract_call_data": "string"
}
}
400 Bad Request
422 Unprocessable Content
Example cURL Request
curl --request POST \
--url https://api.figment.io/ethereum/compound \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: your-api-key-here' \
--data '{
"network": "mainnet"
}'
Example JSON Response
{
"data": {
"network": "string",
"signing_payload": "string",
"unsigned_transaction_serialized": "string",
"contract_call_data": "string"
}
}