@stargatefinance/stg-error-parser
v1.2.2
Published
This package provides utilities for handling errors returned by Stargate contracts. It offers a streamlined way to check and parse hexadecimal strings that may represent errors sent by Solidity contracts.
Readme
Overview
This package provides utilities for handling errors returned by Stargate contracts. It offers a streamlined way to check and parse hexadecimal strings that may represent errors sent by Solidity contracts.
Installation
To use this package, include it in your project using npm or yarn:
npm install @stargatefinance/stg-error-parseror
yarn add @stargatefinance/stg-error-parserUsage
The package exports two main functions:
checkError(data: string): voidThis function checks a given string for any errors sent by a Stargate contract.
parseError(data: string): LayerZeroParsedError | nullThis function parses a given string for an error and decodes it.
