Skip to content

Commit

Permalink
Merge branch 'accounts_stats'
Browse files Browse the repository at this point in the history
  • Loading branch information
zakhar-petukhov committed Nov 1, 2024
2 parents 2b4396f + 8ccaebc commit 63fa3c7
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions pkg/core/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ import (
"math/big"

"github.com/tonkeeper/tongo/abi"
"github.com/tonkeeper/tongo/ton"

"github.com/shopspring/decimal"
"github.com/tonkeeper/tongo"
"github.com/tonkeeper/tongo/tlb"
)

// Account holds low-level details about a particular account taken directly from the blockchain.
type Account struct {
AccountAddress tongo.AccountID
AccountAddress ton.AccountID
Status tlb.AccountStatus
TonBalance int64
ExtraBalances map[uint32]decimal.Decimal
LastTransactionLt uint64
LastTransactionHash tongo.Bits256
LastTransactionHash ton.Bits256
Code []byte
Data []byte
FrozenHash *tongo.Bits256
FrozenHash *ton.Bits256
Storage StorageInfo
Interfaces []abi.ContractInterface
LastActivityTime int64
GetMethods []string
Libraries map[tongo.Bits256]*SimpleLib
Libraries map[ton.Bits256]*SimpleLib
}

// StorageInfo is taken from TLB storage_stat:StorageInfo.
Expand All @@ -52,6 +52,14 @@ type Contract struct {
Balance int64
Code []byte
Data []byte
Libraries map[tongo.Bits256]*SimpleLib
Libraries map[ton.Bits256]*SimpleLib
LastTransactionLt uint64
}

type AccountStats struct {
AccountID ton.AccountID
NftsCount int32
JettonsCount int32
MultisigCount int32
StakingCount int32
}

0 comments on commit 63fa3c7

Please sign in to comment.