Documentation
¶
Index ¶
- Constants
- Variables
- func CollectActionsAndValueFlow(bubble *Bubble, forAccount *tongo.AccountID) ([]Action, *ValueFlow)
- func FindExtendedSubscription(bubble *Bubble) bool
- func FindGetGemsNftPurchase(bubble *Bubble) bool
- func FindInitialSubscription(bubble *Bubble) bool
- func FindJettonTransfer(bubble *Bubble) bool
- func FindNFTTransfer(bubble *Bubble) bool
- func MergeAllBubbles(bubble *Bubble, straws []Straw)
- type Account
- type AccountValueFlow
- type Action
- type ActionType
- type ActionsList
- type AuctionBidAction
- type Bubble
- type BubbleGetGemsNftPurchase
- type BubbleJettonTransfer
- type BubbleNftTransfer
- type BubbleSubscription
- type BubbleTx
- type ContractDeployAction
- type GetGemsNftPurchaseAction
- type JettonTransferAction
- type Merge
- type NftTransferAction
- type Option
- type Options
- type Refund
- type RefundType
- type SmartContractAction
- type Straw
- type SubscriptionAction
- type TonTransferAction
- type UnSubscriptionAction
- type ValueFlow
Constants ¶
View Source
const ( Empty ActionType = "Empty" TonTransfer ActionType = "TonTransfer" SmartContractExec ActionType = "SmartContractExec" NftItemTransfer ActionType = "NftItemTransfer" GetGemsNftPurchase ActionType = "GetGemsNftPurchase" JettonTransfer ActionType = "JettonTransfer" ContractDeploy ActionType = "ContractDeploy" Subscription ActionType = "Subscription" UnSubscription ActionType = "UnSubscribe" AuctionBid ActionType = "AuctionBid" AuctionTgInitBid ActionType = "AuctionTgInitBid" RefundDnsTg RefundType = "DNS.tg" RefundDnsTon RefundType = "DNS.ton" RefundGetGems RefundType = "GetGems" RefundUnknown RefundType = "unknown" )
Variables ¶
View Source
var DefaultStraws = []Straw{ FindGetGemsNftPurchase, FindNFTTransfer, FindJettonTransfer, FindInitialSubscription, FindExtendedSubscription, }
Functions ¶
func FindGetGemsNftPurchase ¶
func FindInitialSubscription ¶
func FindJettonTransfer ¶
func FindNFTTransfer ¶
func MergeAllBubbles ¶
Types ¶
type AccountValueFlow ¶
AccountValueFlow contains a change of assets for a particular account.
type Action ¶
type Action struct {
TonTransfer *TonTransferAction
SmartContractExec *SmartContractAction
NftItemTransfer *NftTransferAction
GetGemsNftPurchase *GetGemsNftPurchaseAction
JettonTransfer *JettonTransferAction
ContractDeploy *ContractDeployAction
Subscription *SubscriptionAction
UnSubscription *UnSubscriptionAction
AuctionBid *AuctionBidAction
Success bool
Type ActionType
}
func (Action) ContributeToExtra ¶
type ActionType ¶
type ActionType string
type ActionsList ¶
func FindActions ¶
func FindActions(trace *core.Trace, opts ...Option) (*ActionsList, error)
FindActions finds known action patterns in the given trace and returns a list of actions.
type AuctionBidAction ¶
type Bubble ¶
type Bubble struct {
Info actioner
Accounts []tongo.AccountID
Children []*Bubble
ValueFlow *ValueFlow
}
Bubble represents a transaction in the beginning. But we can merge neighbour bubbles together if we find a known action pattern like an NFT Transfer or a SmartContractExecution in a trace.
func ProcessChildren ¶
type BubbleGetGemsNftPurchase ¶
func (BubbleGetGemsNftPurchase) ToAction ¶
func (b BubbleGetGemsNftPurchase) ToAction() *Action
type BubbleJettonTransfer ¶
type BubbleJettonTransfer struct {
// contains filtered or unexported fields
}
func (BubbleJettonTransfer) ToAction ¶
func (b BubbleJettonTransfer) ToAction() (action *Action)
type BubbleNftTransfer ¶
type BubbleNftTransfer struct {
// contains filtered or unexported fields
}
func (BubbleNftTransfer) ToAction ¶
func (b BubbleNftTransfer) ToAction() (action *Action)
type BubbleSubscription ¶
type BubbleSubscription struct {
Subscription, Subscriber, Beneficiary Account
Amount int64
Success bool
First bool
}
func (BubbleSubscription) ToAction ¶
func (b BubbleSubscription) ToAction() (action *Action)
type ContractDeployAction ¶
type JettonTransferAction ¶
type NftTransferAction ¶
type Option ¶
type Option func(*Options)
func ForAccount ¶
func WithStraws ¶
WithStraws provides functions to find actions in a trace.
type Refund ¶
type Refund struct {
Type RefundType
Origin string
}
type RefundType ¶
type RefundType string
type SmartContractAction ¶
type SmartContractAction struct {
TonAttached int64
Executor tongo.AccountID
Contract tongo.AccountID
Operation string
Payload string
}
func (*SmartContractAction) ContributeToExtra ¶
func (a *SmartContractAction) ContributeToExtra(account tongo.AccountID, extra int64) int64
type Straw ¶
Straw extracts information from the given bubble and its children and modifies the bubble if needed. If the bubble is modified this function return true.
type SubscriptionAction ¶
type TonTransferAction ¶
type TonTransferAction struct {
Amount int64
Comment *string
Recipient tongo.AccountID
Sender tongo.AccountID
Refund *Refund
}
func (*TonTransferAction) ContributeToExtra ¶
func (a *TonTransferAction) ContributeToExtra(account tongo.AccountID, extra int64) int64
type UnSubscriptionAction ¶
type ValueFlow ¶
type ValueFlow struct {
Accounts map[tongo.AccountID]*AccountValueFlow
}
ValueFlow contains a change of assets for each account involved in a trace.
func (*ValueFlow) AddJettons ¶
Click to show internal directories.
Click to hide internal directories.