The service account is the account that manages the core protocol requirements of Flow.
Network | Contract Address |
---|---|
Emulator | 0xf8d6e0586b0a20c7 |
Cadence Testing Framework | 0x0000000000000001 |
Testnet | 0x8c5303eaa26202d6 |
Mainnet | 0xe467b9dd11fa00df |
Here are three important contracts deployed to the service account:
FlowServiceAccount
FlowServiceAccount
tracks transaction fees, deployment permissions, and provides
some convenience methods for Flow Token operations.
Source: FlowServiceAccount.cdc
Events
Important events from FlowServiceAccount
are:
_10access(all) event TransactionFeeUpdated(newFee: UFix64)_10access(all) event AccountCreationFeeUpdated(newFee: UFix64)
RandomBeaconHistory
RandomBeaconHistory
stores the history of random sources generated by the Flow network. The defined Heartbeat resource is updated by the Flow Service Account at the end of every block with that block's source of randomness.
Source: RandomBeaconHistory.cdc
Events
Important events from RandomBeaconHistory
are:
_12// Event emitted when missing SoRs from past heartbeats are detected and will be backfilled:_12// - `blockHeight` is the height where the gap is detected_12// - `gapStartHeight` is the height of the first missing entry detected_12access(all) event RandomHistoryMissing(blockHeight: UInt64, gapStartHeight: UInt64)_12_12// Event emitted when missing SoRs are backfilled on the current heartbeat:_12// - `blockHeight` is the height where the backfill happened, it also defines the SoR used to backfill_12// - `gapStartHeight` is the height of the first backfilled entry_12// - `count` is the number of backfilled entries_12// Note that in very rare cases, the backfilled gap may not be contiguous. This event does not_12// fully define the backfilled entries in this case._12access(all) event RandomHistoryBackfilled(blockHeight: UInt64, gapStartHeight: UInt64, count: UInt64)
NodeVersionBeacon
NodeVersionBeacon
holds the past and future protocol versions that should be used to execute/handle blocks at a given block height.
Source: NodeVersionBeacon.cdc
Events
Important events from NodeVersionBeacon
are:
_13/// Event emitted when the version table is updated._13/// It contains the current version and all the upcoming versions_13/// sorted by block height._13/// The sequence increases by one each time an event is emitted._13/// It can be used to verify no events were missed._13access(all) event VersionBeacon(_13 versionBoundaries: [VersionBoundary],_13 sequence: UInt64_13)_13_13/// Event emitted any time the version boundary freeze period is updated._13/// freeze period is measured in blocks (from the current block)._13access(all) event NodeVersionBoundaryFreezePeriodChanged(freezePeriod: UInt64)