-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #436 from AssetMantle/deepanshutr/chore
Deepanshutr/chore
- Loading branch information
Showing
207 changed files
with
1,445 additions
and
1,073 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package base | ||
|
||
import ( | ||
"github.com/AssetMantle/modules/helpers" | ||
sdkErrors "github.com/cosmos/cosmos-sdk/types/errors" | ||
) | ||
|
||
var _ helpers.Error = (*sdkErrors.Error)(nil) | ||
|
||
func NewError(codeSpace string, code uint32, description string) helpers.Error { | ||
return sdkErrors.Register(codeSpace, code, description) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright [2021] - [2022], AssetMantle Pte. Ltd. and the code contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package constants | ||
|
||
import ( | ||
"github.com/AssetMantle/modules/helpers/base" | ||
) | ||
|
||
const projectRoute = "/AssetMantle" | ||
|
||
var ( | ||
MockError = base.NewError(projectRoute, 100, "mock error") | ||
EntityAlreadyExists = base.NewError(projectRoute, 102, "entity already exists") | ||
EntityNotFound = base.NewError(projectRoute, 103, "entity not found") | ||
IncorrectFormat = base.NewError(projectRoute, 104, "incorrect format") | ||
InvalidMessage = base.NewError(projectRoute, 105, "invalid message") | ||
InsufficientBalance = base.NewError(projectRoute, 106, "insufficient balance") | ||
InvalidParameter = base.NewError(projectRoute, 107, "invalid parameter") | ||
InvalidRequest = base.NewError(projectRoute, 108, "invalid request") | ||
MetaDataError = base.NewError(projectRoute, 109, "meta data error") | ||
NotAuthorized = base.NewError(projectRoute, 110, "not authorized") | ||
UninitializedUsage = base.NewError(projectRoute, 111, "uninitialized usage") | ||
InvalidKey = base.NewError(projectRoute, 112, "invalid key") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package constants | ||
|
||
const PaginationLimit = 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package helpers | ||
|
||
type Error interface { | ||
Wrapf(string, ...interface{}) error | ||
Is(error) bool | ||
error | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.