handleContractError()
handleContractError()
function handleContractError<T>(func, callback?): Promise<T>;Defined in: utils.ts:37
Used to make on chain calls to the contract and wrap raised errors if any
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type | Description |
|---|---|---|
func | () => Promise<T> | function that interacts with the contract |
callback? | (err) => string | callback that may be used to extract error code |
Returns
Promise<T>