-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MOD: only handle 4swap lp / rings token;
- Loading branch information
Showing
28 changed files
with
631 additions
and
474 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 |
---|---|---|
|
@@ -15,3 +15,6 @@ ftoken | |
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
builds | ||
ftoken |
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,39 @@ | ||
package core | ||
|
||
import ( | ||
"context" | ||
"errors" | ||
"time" | ||
) | ||
|
||
var ( | ||
ErrAssetNotExist = errors.New("asset not exist") | ||
) | ||
|
||
type ( | ||
Asset struct { | ||
ID uint64 `sql:"PRIMARY_KEY;" json:"id"` | ||
AssetID string `sql:"size:36;" json:"asset_id,omitempty"` | ||
CreatedAt time.Time `json:"created_at,omitempty"` | ||
UpdatedAt time.Time `json:"updated_at,omitempty"` | ||
Version int64 `sql:"not null" json:"version,omitempty"` | ||
Verified bool `json:"verified"` | ||
Name string `sql:"size:64" json:"name,omitempty"` | ||
Symbol string `sql:"size:32" json:"symbol,omitempty"` | ||
DisplaySymbol string `sql:"size:32;default:null;" json:"display_symbol,omitempty"` | ||
ChainID string `sql:"size:36" json:"chain_id,omitempty"` | ||
} | ||
|
||
// AssetStore defines operations for working with assets on db. | ||
AssetStore interface { | ||
Save(ctx context.Context, asset *Asset) error | ||
Find(ctx context.Context, assetIDs ...string) ([]*Asset, error) | ||
ListAll(ctx context.Context) ([]*Asset, error) | ||
} | ||
|
||
// AssetService provides access to assets information | ||
// in the remote system like mixin network. | ||
AssetService interface { | ||
Find(ctx context.Context, assetID string) (*Asset, 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
Oops, something went wrong.