Skip to main content
POST
/
operations
/
approve
Approve token
curl --request POST \
  --url https://relayer.forka.st/operations/approve \
  --header 'Content-Type: application/json' \
  --data '
{
  "token": "0x2791Bca1F2de4661ED88A30C99A7a9449Aa84174",
  "spender": "0x4d97dcd97ec945f40cf65f87097ace5ea0476045",
  "amount": "115792089237316195423570985008687907853269984665640564039457584007913129639935"
}
'
{
  "txHash": "0x61a1b449f2b534d08a2f807cd5de867f9013e44e2df421a1d8c5b7f467ff3154",
  "confirmations": 1
}
Ask the custodial relayer to submit an ERC-20 approve() transaction on your behalf. This is useful when you want the relayer to prime allowances before executing Safe calls.
POST to https://relayer.forka.st/operations/approve with the standard L2 headers. The relayer signs and broadcasts the allowance transaction from its managed operator.

Request body

FieldTypeRequiredDescription
tokenstringYesERC-20 token contract that will grant allowances.
spenderstringYesAddress that should be allowed to spend tokens.
amountstringYesDecimal string representing the allowance amount (use 2^256-1 for max).

Notes

  • Allowance approvals are executed sequentially to avoid nonce collisions; expect the relayer to reuse the same managed address.
  • Failed RPC calls respond with 502 and include the upstream error string.
  • Use POST /submit for user-owned approvals; this endpoint is strictly for custodial relayer operations.

Body

application/json
token
string
required

ERC-20 token contract.

spender
string
required

Address receiving the allowance.

amount
string
required

Allowance amount, typically 2^256-1 for max.

Response

Transaction broadcast by the relayer.

txHash
string
required
confirmations
integer<int32>
required