Documentation
¶
Index ¶
- Variables
- func AllOperationTypesString() []string
- func FilterChangesBySubAccount(op *Operation, subAccountType SubAccountType) map[common.Address]*big.Int
- func MatchChangesOnSubAccount(op1 *Operation, op2 *Operation, subAccountType SubAccountType) bool
- type Account
- type BalanceChange
- type BalanceSet
- type ChainParameters
- type Operation
- func ComputeEpochRewards(ctx context.Context, cc *client.CeloClient, db db.RosettaDBReader, ...) (*Operation, error)
- func NewActiveVotes(addr common.Address, group common.Address, value *big.Int) *Operation
- func NewCreateAccount(from common.Address) *Operation
- func NewEpochRewards(changes map[common.Address]*big.Int) *Operation
- func NewFee(changes map[common.Address]*big.Int) *Operation
- func NewLockGold(addr common.Address, lockedGoldAddr common.Address, value *big.Int) *Operation
- func NewRelockGold(addr common.Address, value *big.Int) *Operation
- func NewRevokeActiveVotes(addr common.Address, group common.Address, value *big.Int) *Operation
- func NewRevokePendingVotes(addr common.Address, group common.Address, value *big.Int) *Operation
- func NewSlash(slashed common.Address, slasher common.Address, communityFund common.Address, ...) *Operation
- func NewTransfer(from common.Address, to common.Address, value *big.Int, successful bool) *Operation
- func NewUnlockGold(addr common.Address, value *big.Int) *Operation
- func NewVote(addr common.Address, group common.Address, value *big.Int) *Operation
- func NewWithdrawGold(addr common.Address, lockedGoldAddr common.Address, value *big.Int) *Operation
- type OperationType
- type SubAccount
- type SubAccountType
- type Tracer
- func (tr *Tracer) TraceTransaction(blockHeader *types.Header, tx *types.Transaction, receipt *types.Receipt) ([]Operation, error)
- func (tr *Tracer) TxGasDetails(blockHeader *types.Header, tx *types.Transaction, receipt *types.Receipt) (*Operation, error)
- func (tr *Tracer) TxLockedGoldTransfers(blockHeader *types.Header, tx *types.Transaction, receipt *types.Receipt) ([]Operation, error)
- func (tr *Tracer) TxTransfers(blockHeader *types.Header, tx *types.Transaction, receipt *types.Receipt) ([]Operation, error)
- type Transfer
Constants ¶
This section is empty.
Variables ¶
View Source
var AllOperationTypes = []OperationType{ OpFee, OpTransfer, OpCreateAccount, OpLockGold, OpUnlockGold, OpRelockGold, OpWithdrawGold, OpVote, OpActiveVotes, OpRevokePendingVotes, OpRevokeActiveVotes, OpSlash, OpEpochRewards, }
Functions ¶
func AllOperationTypesString ¶
func AllOperationTypesString() []string
func MatchChangesOnSubAccount ¶
func MatchChangesOnSubAccount(op1 *Operation, op2 *Operation, subAccountType SubAccountType) bool
Types ¶
type Account ¶
type Account struct {
Address common.Address
SubAccount SubAccount
}
func NewAccount ¶
func NewAccount(addr common.Address, subAccount SubAccountType) Account
func NewVotingAccount ¶
type BalanceChange ¶
type BalanceSet ¶
type BalanceSet struct {
// contains filtered or unexported fields
}
func NewBalanceSet ¶
func NewBalanceSet() *BalanceSet
func (*BalanceSet) Add ¶
func (bs *BalanceSet) Add(addr common.Address, value *big.Int) *BalanceSet
type ChainParameters ¶
func (*ChainParameters) IsLastBlockOfEpoch ¶
func (cp *ChainParameters) IsLastBlockOfEpoch(blockNumber uint64) bool
type Operation ¶
type Operation struct {
Type OperationType
Changes []BalanceChange
Successful bool
}
func ComputeEpochRewards ¶
func ComputeEpochRewards(ctx context.Context, cc *client.CeloClient, db db.RosettaDBReader, header *types.Header) (*Operation, error)
func NewActiveVotes ¶
func NewCreateAccount ¶ added in v0.6.1
func NewLockGold ¶
func NewRevokeActiveVotes ¶
func NewRevokePendingVotes ¶
func NewTransfer ¶
type OperationType ¶
type OperationType string
const ( OpFee OperationType = "fee" OpTransfer OperationType = "transfer" OpCreateAccount OperationType = "createAccount" OpLockGold OperationType = "lockGold" OpUnlockGold OperationType = "unlockGold" OpRelockGold OperationType = "relockGold" OpWithdrawGold OperationType = "withdrawGold" OpVote OperationType = "vote" OpActiveVotes OperationType = "activateVotes" OpRevokePendingVotes OperationType = "revokePendingVotes" OpRevokeActiveVotes OperationType = "revokeActiveVotes" OpSlash OperationType = "slash" OpEpochRewards OperationType = "epochRewards" )
func (OperationType) String ¶
func (ot OperationType) String() string
type SubAccount ¶
type SubAccount struct {
Identifier SubAccountType
Metadata map[string]interface{}
}
type SubAccountType ¶
type SubAccountType string
const ( AccMain SubAccountType = "Main" AccLockedGoldNonVoting SubAccountType = "LockedGoldNonVoting" AccLockedGoldVotingActive SubAccountType = "LockedGoldVotingActive" AccLockedGoldVotingPending SubAccountType = "LockedGoldVotingPending" AccLockedGoldPending SubAccountType = "LockedGoldPending" )
type Tracer ¶
type Tracer struct {
// contains filtered or unexported fields
}
func NewTracer ¶
func NewTracer(ctx context.Context, cc *client.CeloClient, db db.RosettaDBReader) *Tracer
func (*Tracer) TraceTransaction ¶
func (*Tracer) TxGasDetails ¶
func (*Tracer) TxLockedGoldTransfers ¶
Click to show internal directories.
Click to hide internal directories.