MOUNTAIN Public API for Developers
{- "data": {
- "project": {
- "id": 1,
- "projectName": "My NFT Project",
- "apiKey": "mtn_pj_Aa8hK9jL2mN4pQ7rT3vW5xY9zC1bD4fG"
}, - "mSystemWalletMainnet": {
- "id": 1,
- "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
- "type": "fireblocks",
- "networkType": "mainnet",
- "ownerType": "shared"
}, - "mSystemWalletTestnet": {
- "id": 1,
- "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
- "type": "fireblocks",
- "networkType": "mainnet",
- "ownerType": "shared"
}
}, - "meta": { }
}
subscriptionName required | string Subscription name |
networkId required | number Enum: 1 137 42161 11155111 80002 421614 1337 Network ID |
address required | string Contract address |
formattedAbiEvent required | string Complete ABI event definition including parameter names and types. Use abitype's formatAbiItem() to generate this format from raw ABI. |
initialBlockNumber required | number >= 0 Initial block number to start scanning from |
scanInterval required | number >= 5 Scan interval in seconds |
webhookURL | string <uri> Webhook URL for notifications |
webhookMaxRetries | number >= 0 Maximum number of webhook retry attempts |
{- "subscriptionName": "Transfer Subscription",
- "networkId": 1,
- "address": "0x1234567890123456789012345678901234567890",
- "formattedAbiEvent": "event Transfer(address indexed from, address indexed to, uint256 value)",
- "initialBlockNumber": 1000000,
- "scanInterval": 10,
- "webhookMaxRetries": 3
}
{- "eventNotifierSubscription": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "projectId": 1,
- "subscriptionName": "Transfer Subscription",
- "networkId": 1,
- "address": "0x1234...",
- "formattedAbiEvent": "\"function mint(address to, uint256 amount)\"",
- "scanEnabled": true,
- "initialBlockNumber": 0,
- "scanInterval": 5,
- "webhookEnabled": true,
- "webhookMaxRetries": 3,
- "webhookSecret": "mtn_whsec_...",
- "scanStatus": "idle",
- "lastScannedBlock": 0,
- "lastScannedAt": "2021-01-01T00:00:00.000Z",
- "lastScanFailureMessage": "Failed to scan block",
- "nextScanAt": "2021-01-01T00:00:00.000Z"
}
}
{- "eventNotifierSubscriptions": [
- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "projectId": 1,
- "subscriptionName": "Transfer Subscription",
- "networkId": 1,
- "address": "0x1234...",
- "formattedAbiEvent": "\"function mint(address to, uint256 amount)\"",
- "scanEnabled": true,
- "initialBlockNumber": 0,
- "scanInterval": 5,
- "webhookEnabled": true,
- "webhookMaxRetries": 3,
- "webhookSecret": "mtn_whsec_...",
- "scanStatus": "idle",
- "lastScannedBlock": 0,
- "lastScannedAt": "2021-01-01T00:00:00.000Z",
- "lastScanFailureMessage": "Failed to scan block",
- "nextScanAt": "2021-01-01T00:00:00.000Z"
}
]
}
id required | string Subscription ID |
webhookEnabled | boolean Enable or disable webhook |
webhookURL | string <uri> Webhook URL for notifications |
webhookMaxRetries | number >= 0 Maximum number of webhook retry attempts |
{- "id": "123e4567-e89b-12d3-a456-426614174000",
- "webhookEnabled": true,
- "webhookMaxRetries": 3
}
{- "eventNotifierSubscription": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "projectId": 1,
- "subscriptionName": "Transfer Subscription",
- "networkId": 1,
- "address": "0x1234...",
- "formattedAbiEvent": "\"function mint(address to, uint256 amount)\"",
- "scanEnabled": true,
- "initialBlockNumber": 0,
- "scanInterval": 5,
- "webhookEnabled": true,
- "webhookMaxRetries": 3,
- "webhookSecret": "mtn_whsec_...",
- "scanStatus": "idle",
- "lastScannedBlock": 0,
- "lastScannedAt": "2021-01-01T00:00:00.000Z",
- "lastScanFailureMessage": "Failed to scan block",
- "nextScanAt": "2021-01-01T00:00:00.000Z"
}
}
subscriptionId required | string Event Notifier Subscription ID |
{- "subscriptionId": "123e4567-e89b-12d3-a456-426614174000"
}
{- "eventNotifierRecords": [
- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "eventNotifierSubscriptionId": "123e4567-e89b-12d3-a456-426614174000",
- "status": "scanned",
- "statusChangedAt": "2024-03-20T00:00:00.000Z",
- "blockTimestamp": 1710892800,
- "transactionHash": "0x1234...",
- "blockNumber": 123456,
- "transactionIndex": 0,
- "logIndex": 0,
- "decodedLog": {
- "from": "0x1234...",
- "to": "0x5678...",
- "value": "1000000000000000000"
}, - "lastNotificationFailedAt": "2024-03-20T00:00:00.000Z",
- "lastNotificationFailureMessage": "Failed to send webhook",
- "notificationFailureCount": 0,
- "createdAt": "2024-03-20T00:00:00.000Z",
- "updatedAt": "2024-03-20T00:00:00.000Z"
}
]
}
subscriptionId required | string Event Notifier Subscription ID |
force | boolean Force resend webhook even if webhook is disabled or max retries has been reached |
{- "subscriptionId": "123e4567-e89b-12d3-a456-426614174000",
- "force": false
}
{- "record": {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "eventNotifierSubscriptionId": "123e4567-e89b-12d3-a456-426614174000",
- "status": "scanned",
- "statusChangedAt": "2024-03-20T00:00:00.000Z",
- "blockTimestamp": 1710892800,
- "transactionHash": "0x1234...",
- "blockNumber": 123456,
- "transactionIndex": 0,
- "logIndex": 0,
- "decodedLog": {
- "from": "0x1234...",
- "to": "0x5678...",
- "value": "1000000000000000000"
}, - "lastNotificationFailedAt": "2024-03-20T00:00:00.000Z",
- "lastNotificationFailureMessage": "Failed to send webhook",
- "notificationFailureCount": 0,
- "createdAt": "2024-03-20T00:00:00.000Z",
- "updatedAt": "2024-03-20T00:00:00.000Z"
}
}
networkId required | number Enum: 1 137 42161 11155111 80002 421614 1337 Network ID |
address required | string Contract address |
formattedAbi required | Array of strings Formatted ABI by abitype using formatAbi. Can be parsed by viem using parseAbi. |
{- "networkId": 1,
- "address": "0x1234567890123456789012345678901234567890",
- "formattedAbi": "[\"function mint(address to, uint256 amount)\"]"
}
{- "contract": {
- "id": 1,
- "projectId": 1,
- "networkId": 1,
- "address": "0x1234...",
- "type": "imported",
- "formattedAbi": "[\"function mint(address to, uint256 amount)\"]"
}
}
contractId required | number Contract ID |
formattedAbiFunction required | string Complete ABI function definition including parameter names and types. Use abitype's formatAbiItem() to generate this format from raw ABI. |
{- "contractId": 1,
- "formattedAbiFunction": "function mint(address to, uint256 amount)"
}
{- "contractActivatedFunction": {
- "id": 1,
- "contractId": 1,
- "formattedAbiFunction": "function transfer(address to, uint256 value)"
}
}
contractId required | number Contract ID |
formattedAbiFunction required | string Complete ABI function definition including parameter names and types. Use abitype's formatAbiItem() to generate this format from raw ABI. |
{- "contractId": 1,
- "formattedAbiFunction": "function mint(address to, uint256 amount)"
}
{- "message": "Contract function deactivated successfully"
}
contractId required | number Contract ID |
{- "contractId": 1
}
{- "contractActivatedFunctions": [
- {
- "id": 1,
- "contractId": 1,
- "formattedAbiFunction": "function transfer(address to, uint256 value)"
}
]
}
contractActivatedFunctionId required | number Contract activated function ID |
functionArgs required | Array of strings Function arguments |
idempotencyKey required | string Idempotency key to prevent duplicate transactions |
{- "contractActivatedFunctionId": 1,
- "functionArgs": [
- "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
- "1000000000000000000"
], - "idempotencyKey": "unique-key-12345"
}
{- "transaction": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "projectId": 1,
- "contractActivatedFunctionId": 1,
- "mSystemWalletId": 1,
- "networkId": 1,
- "functionArgs": [
- "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
- "1000000000000000000"
], - "status": "created",
- "transactionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
- "nonce": 42,
- "gasPrice": "20000000000",
- "gasLimit": "21000",
- "gasUsed": "21000",
- "blockNumber": 18500000,
- "errorMessage": "Transaction reverted: insufficient balance",
- "idempotencyKey": "unique-key-12345",
- "createdAt": "2023-12-01T10:00:00.000Z",
- "updatedAt": "2023-12-01T10:05:00.000Z"
}
}
transactionId required | string Example: transactionId=550e8400-e29b-41d4-a716-446655440000 Transaction ID |
{- "transaction": {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "projectId": 1,
- "contractActivatedFunctionId": 1,
- "mSystemWalletId": 1,
- "networkId": 1,
- "functionArgs": [
- "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
- "1000000000000000000"
], - "status": "created",
- "transactionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
- "nonce": 42,
- "gasPrice": "20000000000",
- "gasLimit": "21000",
- "gasUsed": "21000",
- "blockNumber": 18500000,
- "errorMessage": "Transaction reverted: insufficient balance",
- "idempotencyKey": "unique-key-12345",
- "createdAt": "2023-12-01T10:00:00.000Z",
- "updatedAt": "2023-12-01T10:05:00.000Z"
}
}
Get transactions for a project. Results are ordered by createdAt in descending order (newest first).
page | number Default: 1 Example: page=1 Page number |
perPage | number Default: 20 Example: perPage=20 Number of items per page |
status | string Enum: "created" "processing" "broadcasted" "succeeded" "broadcast-failed" "monitor-failed" "reverted" Example: status=succeeded Filter by transaction status |
{- "data": {
- "transactions": [
- {
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "projectId": 1,
- "contractActivatedFunctionId": 1,
- "mSystemWalletId": 1,
- "networkId": 1,
- "functionArgs": [
- "0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6",
- "1000000000000000000"
], - "status": "created",
- "transactionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
- "nonce": 42,
- "gasPrice": "20000000000",
- "gasLimit": "21000",
- "gasUsed": "21000",
- "blockNumber": 18500000,
- "errorMessage": "Transaction reverted: insufficient balance",
- "idempotencyKey": "unique-key-12345",
- "createdAt": "2023-12-01T10:00:00.000Z",
- "updatedAt": "2023-12-01T10:05:00.000Z"
}
]
}, - "meta": {
- "pageNumber": 1,
- "perPage": 20,
- "totalPage": 5,
- "totalItems": 100
}
}