Documentation ¶
Overview ¶
Package systemcontracts stores canonical address locations for all system smart contracts and service events.
System contracts are special smart contracts controlled by the service account, a Flow account with special privileges to administer the network.
Service events are special events defined within system contracts which are included within execution receipts and processed by the consensus committee to enable message-passing to the protocol state.
For transient networks, all system contracts can be deployed to the service account. For long-lived networks, system contracts are spread across several accounts for historical reasons.
Index ¶
Constants ¶
const ( ContractNameEpoch = "FlowEpoch" ContractNameClusterQC = "FlowClusterQC" ContractNameDKG = "FlowDKG" ContractServiceAccount = "FlowServiceAccount" ContractNameFlowFees = "FlowFees" ContractStorageFees = "FlowStorageFees" EventNameEpochSetup = "EpochSetup" EventNameEpochCommit = "EpochCommit" ContractServiceAccountFunction_setupNewAccount = "setupNewAccount" ContractServiceAccountFunction_defaultTokenBalance = "defaultTokenBalance" ContractServiceAccountFunction_deductTransactionFee = "deductTransactionFee" ContractServiceAccountFunction_verifyPayersBalanceForTransactionExecution = "verifyPayersBalanceForTransactionExecution" ContractStorageFeesFunction_calculateAccountCapacity = "calculateAccountCapacity" ContractStorageFeesFunction_getAccountsCapacityForTransactionStorageCheck = "getAccountsCapacityForTransactionStorageCheck" ContractStorageFeesFunction_defaultTokenAvailableBalance = "defaultTokenAvailableBalance" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceEvent ¶
ServiceEvent represents a service event on a particular chain.
func (ServiceEvent) EventType ¶
func (se ServiceEvent) EventType() flow.EventType
EventType returns the full event type identifier, including the address, the contract name, and the event type name.
func (ServiceEvent) QualifiedIdentifier ¶
func (se ServiceEvent) QualifiedIdentifier() string
QualifiedIdentifier returns the Cadence qualified identifier of the service event, which includes the contract name and the event type name.
type ServiceEvents ¶
type ServiceEvents struct { EpochSetup ServiceEvent EpochCommit ServiceEvent }
ServiceEvents is a container for all service events on a particular chain.
func ServiceEventsForChain ¶
func ServiceEventsForChain(chainID flow.ChainID) (*ServiceEvents, error)
ServiceEventsForChain returns the service event confirmation for the given chain.
func (ServiceEvents) All ¶
func (se ServiceEvents) All() []ServiceEvent
All returns all service events as a slice.
type SystemContract ¶
SystemContract represents a system contract on a particular chain.
type SystemContracts ¶
type SystemContracts struct { Epoch SystemContract ClusterQC SystemContract DKG SystemContract }
SystemContracts is a container for all system contracts on a particular chain.
func SystemContractsForChain ¶
func SystemContractsForChain(chainID flow.ChainID) (*SystemContracts, error)
SystemContractsForChain returns the system contract configuration for the given chain.