Verifying payloads
Decode a campaign creation payload back into a readable configuration to confirm exactly what you're signing
Before signing a campaign creation payload — especially one prepared by someone else — you can decode it back into a readable configuration and confirm exactly what you're approving. The Merkl API exposes decode endpoints for this, whether you're checking a whole Safe batch or a single createCampaign transaction.
Verify a whole Safe payload
To check every campaign contained in a Safe transaction batch at once, pass the payload to the POST /v4/config/decode/safe endpoint. It returns the decoded configuration of each campaign in the batch — the quickest way for a preparer to sanity-check a payload before sharing it, or for a signer to review the whole batch in one call.
Verify a single createCampaign transaction
If you're a signer reviewing a payload someone else prepared, you can verify the campaign configuration directly from the transaction data before signing.
The createCampaign transaction (the last transaction in the batch) contains an array of encoded parameters:
"[\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"0x0000000000000000000000000000000000000000\",\"0xD53f905D140dA38FB6505756A5D1eD14599BcdE5\",\"6185567010309278351\",4,1771521860,3600,\"0xcd7b313f6fb732723e6a48935f34d18fd944050bccc526494e54de4b94dc1474\"]"
To decode and verify this data:
- Extract the values from the array. In order, they are the fields of the
CampaignParametersstruct:campaignId,creator,rewardToken,amount,campaignType,startTimestamp,duration, andcampaignData— see Transactions to sign for what each field means. - Send them to the
POST /v4/config/decode/{distributionChainId}endpoint in the request body:
{
"campaignId": "0x0000000000000000000000000000000000000000000000000000000000000000",
"creator": "0x0000000000000000000000000000000000000000",
"rewardToken": "0xD53f905D140dA38FB6505756A5D1eD14599BcdE5",
"amount": "6185567010309278351",
"campaignType": 4,
"startTimestamp": 1771521860,
"duration": 3600,
"campaignData": "0xcd7b313f6fb732723e6a48935f34d18fd944050bccc526494e54de4b94dc1474"
}
The API returns the full campaign configuration, so you can verify every parameter — the campaign type, the distribution method, and any customization options. Use the schema explorer to interpret any enum values (such as the campaignType) you get back.
Preview before signing
Once you have the decoded configuration, you can also:
- Preview how the campaign will appear in the Merkl app.
- Estimate the expected TVL for the campaign.
Together, these checks ensure you understand exactly what you're signing before approving the transaction.
