Documentation ¶
Index ¶
- Constants
- type TransferResultItem
- type VTransfer
- type VirtualTransaction
- func (vtx *VirtualTransaction) AppendVCreation(to common.Address, amount *big.Int, assets *protos.Asset, vTransferType uint8)
- func (vtx *VirtualTransaction) AppendVTransfer(sender common.Address, to common.Address, amount *big.Int, ...)
- func (vtx *VirtualTransaction) GetAllTransfers() map[protos.Asset]*TransferResultItem
- func (vtx *VirtualTransaction) GetIncoming(addr common.Address, assets *protos.Asset, voucherId int64) *big.Int
Constants ¶
View Source
const ( // transfer asset VTransferTypeNormal uint8 = 1 // create new asset VTransferTypeCreation uint8 = 2 // mint existing asset VTransferTypeMint uint8 = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TransferResultItem ¶
type TransferResultItem struct { Asset []byte // not used Erc20 bool Create bool // true if a new asset is created Mint bool // true if asset is mint // 721 asset mint record Erc721Mint map[int64]struct{} // asset transfer record Erc20Change map[common.Address]int64 // 20 asset transfer record Erc721Change map[common.Address]map[int64]struct{} // 721 asset transfer record }
type VirtualTransaction ¶
type VirtualTransaction struct { VTransfer []*VTransfer // contains filtered or unexported fields }
func NewVirtualTransaction ¶
func NewVirtualTransaction() *VirtualTransaction
func (*VirtualTransaction) AppendVCreation ¶
func (*VirtualTransaction) AppendVTransfer ¶
func (*VirtualTransaction) GetAllTransfers ¶
func (vtx *VirtualTransaction) GetAllTransfers() map[protos.Asset]*TransferResultItem
func (*VirtualTransaction) GetIncoming ¶
func (vtx *VirtualTransaction) GetIncoming(addr common.Address, assets *protos.Asset, voucherId int64) *big.Int
return total incoming for 20 asset return voucher id for 721 asset; return 0 if voucher id not in change list
Click to show internal directories.
Click to hide internal directories.