Create a new event monitor based on the provided blockchain, contract address, and event signature.
Represents the input for creating an event monitor.
The blockchain network that the resource is to be created on or is currently on. Required along with sourceAddress
if you don't provide walletId
. The blockchain
and walletId
fields are mutually exclusive.
The on-chain address of this contract.
The specific event to which you want to subscribe. Please ensure no spaces are included.
The optional idempotency key. An idempotency key is a unique identifier used to identify and handle duplicate requests in order to ensure idempotent behavior, where multiple identical requests have the same effect as a single request.
We will generate one if you do not provide it.
1const response = await client.createEventMonitor({
2 blockchain: 'ETH',
3 contractAddress: '0x71C7656EC7ab88b098defB751B7401B5f6d8976F',
4 eventSignature: 'Transfer(address,address,uint256)',
5})
6console.log(response.data)
1{
2 "data": {
3 "eventMonitor": {
4 "id": "e3c998a5-bdf1-4f3e-812f-24da238c0fff",
5 "blockchain": {},
6 "contractAddress": "0x1e124d7384cd34448ea5907bd0052a79355ab5eb",
7 "eventSignature": "Transfer(address indexed from, address indexed to, uint256 value)",
8 "eventSignatureHash": "0xd3d3dd4b1fd3e53f94deb24e763485b4c925345c5abfa9ad529c67aa55a3b784",
9 "isEnabled": true
10 }
11 }
12}