Error tracking and debugging
Overview
The MPC SDK provides an optional error tracking API. Users can consent to allow Sky Mavis servers to track errors and failed transactions for MPC improvement.
Function timeout
Sets the maximum amount of time an MPC SDK function call is allowed to execute before being considered unsuccessful.
Parameter | Type | Description |
---|---|---|
timeout | Number | Timeout in seconds. |
This example sets the timeout to 60 seconds:
const timeout: Number = 60 // Timeout is 60 seconds
User data tracking
Allows Sky Mavis servers to track success and failure rates of transactions for debugging and evaluation purposes. This data is anonymized and only the rates are collected.
Parameter | Type | Description |
---|---|---|
enable | Boolean | Enables or disables data tracking. |
timeout | Number | Timeout of the Tracking API in seconds. |
This example enables data tracking with a 3-second timeout:
import { ITrackParams, MpcCore, MpcProviders } from "@axieinfinity/mpcjs"
const trackParams: ITrackParams = {
enable: true,
timeout: 3,
}
Log control
Enables or disables verbose logging from the server and client. Use this only in development environments.
Parameter | Type | Description |
---|---|---|
optionalParams | Boolean | Enables or disables verbose logging. Disabled by default. |
This example sets verbose logging to true
(enabled) or false
(disabled):
let optionalParams = true // Enable verbose log
optionalParams = false // Disable verbose log
Was this helpful?
Happy React is loading...