Documentation ¶
Index ¶
- Constants
- Variables
- func New(urls string) (*client, error)
- func NewContractsRegistry(cc *kliento.CeloClient, rc base.RequestCounter, height *big.Int) (*contractsRegistry, error)
- type AccountInfo
- type Block
- type BlockExtra
- type ChainParams
- type ChainStatus
- type Client
- type HeightMeta
- type Identity
- type IstanbulAggregatedSeal
- type Operation
- type Transaction
- type Transfer
- type Validator
- type ValidatorGroup
Constants ¶
View Source
const ( OperationTypeInternalTransfer = "InternalTransfer" OperationTypeValidatorGroupVoteCast = "ValidatorGroupVoteCast" OperationTypeValidatorGroupVoteActivated = "ValidatorGroupVoteActivated" OperationTypeValidatorGroupPendingVoteRevoked = "ValidatorGroupPendingVoteRevoked" OperationTypeValidatorGroupActiveVoteRevoked = "ValidatorGroupActiveVoteRevoked" OperationTypeAccountCreated = "AccountCreated" OperationTypeAccountSlashed = "AccountSlashed" OperationTypeVoteSignerAuthorized = "VoteSignerAuthorized" OperationTypeValidatorSignerAuthorized = "ValidatorSignerAuthorized" OperationTypeAttestationSignerAuthorized = "AttestationSignerAuthorized" OperationTypeGoldLocked = "GoldLocked" OperationTypeGoldRelocked = "GoldRelocked" OperationTypeGoldUnlocked = "GoldUnlocked" OperationTypeGoldWithdrawn = "GoldWithdrawn" OperationTypeValidatorEpochPaymentDistributed = "ValidatorEpochPaymentDistributed" OperationTypeProposalVoted = "ProposalVoted" OperationTypeProposalUpvoted = "ProposalUpvoted" OperationTypeProposalApproved = "ProposalApproved" OperationTypeProposalExecuted = "ProposalExecuted" OperationTypeProposalDequeued = "ProposalDequeued" OperationTypeProposalQueued = "ProposalQueued" OperationTypeProposalExpired = "ProposalExpired" )
View Source
const (
CeloClientFigment = "figment_celo_client"
)
Variables ¶
View Source
var (
ErrContractNotDeployed = errors.New("contract not deployed")
)
Functions ¶
func NewContractsRegistry ¶
func NewContractsRegistry(cc *kliento.CeloClient, rc base.RequestCounter, height *big.Int) (*contractsRegistry, error)
Types ¶
type AccountInfo ¶ added in v0.1.0
type Block ¶
type Block struct { Height int64 `json:"height"` Time uint64 `json:"time"` Hash string `json:"hash"` ParentHash string `json:"parent_hash"` Coinbase string `json:"coinbase"` Root string `json:"root"` TxHash string `json:"tx_hash"` RecipientHash string `json:"recipient_hash"` Size float64 `json:"size"` GasUsed uint64 `json:"gas_used"` TotalDifficulty uint64 `json:"total_difficulty"` Extra BlockExtra `json:"extra"` TxCount int `json:"tx_count"` }
type BlockExtra ¶
type BlockExtra struct { AddedValidators []string `json:"added_validators"` AddedValidatorsPublicKeys []blscrypto.SerializedPublicKey `json:"added_validators_public_keys"` RemovedValidators *big.Int `json:"removed_validators"` Seal []byte `json:"seal"` AggregatedSeal IstanbulAggregatedSeal `json:"aggregated_seal"` ParentAggregatedSeal IstanbulAggregatedSeal `json:"parent_aggregated_seal"` }
type ChainParams ¶ added in v0.1.0
type ChainStatus ¶
type Client ¶
type Client interface { base.Client WithAssignedNode(uint8) Client GetRequestCounter() base.RequestCounter GetChainStatus(context.Context) (*ChainStatus, error) GetChainParams(context.Context) (*ChainParams, error) GetMetaByHeight(context.Context, int64) (*HeightMeta, error) GetBlockByHeight(context.Context, int64) (*Block, error) GetTransactionsByHeight(context.Context, int64) ([]*Transaction, error) GetValidatorGroupsByHeight(context.Context, int64) ([]*ValidatorGroup, error) GetValidatorsByHeight(context.Context, int64) ([]*Validator, error) GetAccountByAddressAndHeight(context.Context, string, int64) (*AccountInfo, error) GetIdentityByHeight(context.Context, string, int64) (*Identity, error) }
type HeightMeta ¶
type IstanbulAggregatedSeal ¶
type Operation ¶
type Operation struct { Name string `json:"name"` Details interface{} `json:"details"` }
type Transaction ¶
type Transaction struct { Hash string `json:"hash"` To string `json:"to"` Height int64 `json:"height"` Time uint64 `json:"time"` Address string `json:"address"` Size string `json:"size"` Nonce uint64 `json:"nonce"` GasPrice *big.Int `json:"gas_price"` Gas uint64 `json:"gas"` GatewayFee *big.Int `json:"gateway_fee"` GatewayFeeRecipient string `json:"gateway_fee_recipient"` Index uint `json:"index"` GasUsed uint64 `json:"gas_used"` CumulativeGasUsed uint64 `json:"cumulative_gas_used"` Success bool `json:"success"` Operations []*Operation `json:"operations"` }
type ValidatorGroup ¶
type ValidatorGroup struct { Index uint64 `json:"index"` Address string `json:"address"` Commission *big.Int `json:"commission"` NextCommission *big.Int `json:"next_commission"` NextCommissionBlock int64 `json:"next_commission_block"` SlashMultiplier *big.Int `json:"slash_multiplier "` LastSlashed *big.Int `json:"last_slashed"` ActiveVotes *big.Int `json:"active_votes"` PendingVotes *big.Int `json:"pending_votes"` VotingCap *big.Int `json:"voting_cap"` Members []string `json:"members"` }
Click to show internal directories.
Click to hide internal directories.