Skip to main content
POST
/
webhook
/
contract-event
cURL
curl --request POST \
  --url https://api.uniblock.dev/uni/v1/webhook/contract-event \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "name": "My Webhook",
  "description": "My Webhook description",
  "webhookUrl": "https://webhook.uniblock.dev",
  "provider": "Alchemy",
  "metadata": {
    "source": "Uniblock"
  },
  "chainId": 1,
  "contractAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
  "filter": {
    "AND": [
      {
        "leaf": {
          "field": "topic0",
          "operator": "eq",
          "value": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
        }
      },
      {
        "leaf": {
          "field": "data",
          "operator": "gt",
          "value": "4294967295"
        }
      }
    ]
  },
  "abi": [
    {
      "inputs": [
        {
          "internalType": "bytes4",
          "name": "interfaceId",
          "type": "bytes4"
        }
      ],
      "name": "supportsInterface",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    }
  ]
}
'

Authorizations

X-API-KEY
string
header
required

API key to access the API (Optional)

Body

application/json
name
string
required

Name of webhook.

Example:

"My Webhook"

description
string
required

Description of webhook.

Example:

"My Webhook description"

webhookUrl
string
required

URL where webhooks are sent to.

Example:

"https://webhook.uniblock.dev"

provider
enum<string>
required

Provider of webhook service.

Available options:
Alchemy,
Moralis,
Tatum,
SimpleHash,
Helius
Example:

"Alchemy"

metadata
object
required

Additional metadata to be returned alongside a webhook response.

Example:
{ "source": "Uniblock" }
chainId
enum<string>
required

Unique identifier for a blockchain network.

Available options:
2741,
33139,
69000,
42161,
42170,
592,
1313161554,
43114,
223,
5165,
8453,
80094,
199,
200901,
81457,
60808,
288,
3637,
56,
42220,
88888,
1116,
21000000,
25,
4158,
666666666,
52014,
1,
61,
42793,
9001,
314,
14,
747,
252,
250,
9889,
122,
100,
2345,
71402,
1625,
11235,
1666600000,
128,
7332,
6985385,
999,
57073,
8822,
4689,
2222,
7887,
8217,
321,
613419,
232,
59144,
1135,
994873017,
5000,
698,
137,
4352,
1088,
34443,
143,
1284,
1285,
2818,
2810,
3073,
397,
42262,
248,
66,
204,
10,
11297108109,
7070,
9745,
98866,
1101,
369,
151,
570,
2020,
30,
534352,
5371,
360,
1514,
1329,
5031,
1868,
146,
50104,
5330,
1923,
510,
57,
239,
167000,
6122,
40,
1559,
130,
1111,
480,
869,
196,
660279,
50,
24132016,
16661,
7000,
32769,
324,
7777777,
allora,
aptos,
atleta,
avail,
bitcoin,
celestia,
iota,
kusama,
midnight,
movement,
nervos,
osmosis,
pokt,
polkadot,
radix,
secret-network,
solana,
sui,
starknet,
stellar-soroban,
toncoin,
tron,
stellar,
eth-mainnet-beacon,
eth-sepolia-beacon,
eth-holesky-beacon,
eth-hoodi-beacon,
gnosis-mainnet-beacon,
11124,
36900,
33111,
6900,
421614,
43113,
84532,
80069,
1028,
168587773,
23888,
97,
808813,
28882,
3636,
44787,
11142220,
88882,
5115,
4157,
560048,
545,
2522,
4002,
843843,
685685,
10200,
54211,
7080969,
998,
763373,
1001,
322,
37111,
59141,
4202,
2030232745,
5003,
80002,
43521,
919,
10143,
1287,
398,
266,
42261,
11155420,
5611,
11297108099,
9746,
2442,
11155931,
2021,
31,
534351,
1328,
5373,
11011,
53302,
1315,
11155111,
1946,
14601,
57054,
531050104,
1924,
167009,
10218,
1301,
1112,
4801,
37714555429,
51,
241320161,
351243127,
7001,
33101,
300,
999999999,
bitcoin-testnet,
bitcoin-testnet4,
solana-devnet,
starknet-sepolia,
stellar-soroban-testnet,
tron-testnet,
stellar-testnet,
RISE (Experimental),
GENSYN (Experimental)
Example:

1

contractAddress
string
required

Address of contract to watch.

Example:

"0xdAC17F958D2ee523a2206206994597C13D831ec7"

filter
object

An object representing the desired filters.

Example:
{
"AND": [
{
"leaf": {
"field": "topic0",
"operator": "eq",
"value": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
}
},
{
"leaf": {
"field": "data",
"operator": "gt",
"value": "4294967295"
}
}
]
}
abi
string[]

ABI of contract to be watched. This field is required for usage with Moralis and is otherwise ignored.

Example:
[
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
}
]

Response

201 - undefined