-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9db2b8a
commit aae750d
Showing
51 changed files
with
1,787 additions
and
1,374 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
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 |
---|---|---|
|
@@ -16,7 +16,6 @@ linters: | |
- tagalign | ||
- zerologlint | ||
- copyloopvar | ||
- gosec | ||
- misspell | ||
- noctx | ||
- prealloc | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// SPDX-FileCopyrightText: 2024 PK Lab AG <[email protected]> | ||
// SPDX-License-Identifier: MIT | ||
|
||
package storage | ||
|
||
import ( | ||
"time" | ||
|
||
pkgTypes "github.com/celenium-io/astria-indexer/pkg/types" | ||
"github.com/dipdup-net/indexer-sdk/pkg/storage" | ||
"github.com/shopspring/decimal" | ||
"github.com/uptrace/bun" | ||
) | ||
|
||
type IFee interface { | ||
storage.Table[*Fee] | ||
} | ||
|
||
type Fee struct { | ||
bun.BaseModel `bun:"table:fee" comment:"Table with fees"` | ||
|
||
Id uint64 `bun:"id,pk,notnull,autoincrement" comment:"Unique internal identity"` | ||
Height pkgTypes.Level `bun:"height,notnull" comment:"The number (height) of this block"` | ||
Time time.Time `bun:"time,pk,notnull" comment:"The time of block"` | ||
Asset string `bun:"asset" comment:"Fee asset"` | ||
Amount decimal.Decimal `bun:"amount,type:numeric" comment:"Fee amount"` | ||
ActionId uint64 `bun:"action_id" comment:"Connected action id"` | ||
TxId uint64 `bun:"tx_id" comment:"Connected transaction id"` | ||
PayerId uint64 `bun:"payer_id" comment:"Who paid fee"` | ||
|
||
ActionType string `bun:"-"` | ||
Payer *Address `bun:"rel:belongs-to"` | ||
} | ||
|
||
func (Fee) TableName() string { | ||
return "fee" | ||
} |
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.