GET
/
api
/
v1
/
erc20
/
permit
/
batch
curl 'https://groupos.xyz/api/v1/erc20/permit/batch' \
--request GET \
-d 'chainId=1' \
-d 'contractAddress=0x67F4732266C7300cca593C814d46bee72e40659F' \
-d 'ownerAddress=0xc517c83f417b73dA98647dad0FCB80af9f3b9531' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
{
  "success": true,
  "totalAmount": "17.5",
  "totalAmountRaw": "17500000000000000000",
  "preparedCall": {
    "to": "0xfb7b7f2d7ecef20a3a7a8ff4b3ae4a66d06a8df7",
    "value": "0",
    "data": "0x23b872dd000000000000000000000000c517c83f417b73da98647dad0fcb80af9f3b9531000000000000..."
  }
}

Batch Permiting

If a particular user has earned a large amount of permits, it may be easier to batch them together. This way, the user only needs to execute a single transaction to claim all of their available permits. This endpoint batches all of the permits for a user from a particular token collection together and returns a single transaction that can be used to claim all of the tokens at once.

Body

chainId
number
required

The id of the chain supporting the token.

contractAddress
string
required

The token smart contract address of the permits to batch.

recipientAddress
string
required

The address to recipient owning the permits to batch.

Response

success
boolean

Indicates whether the call was successful.

totalAmount
string

The total amount redeemable by the batch permit in human-readable form.

totalAmountRaw
string

The total amount redeemable by the batch permit in raw uint256 units.

preparedCall
object

A call object prepared to be used in a new transaction.