Skip to main content

The service account is the account that manages the core protocol requirements of Flow.

NetworkContract Address
Emulator0xf8d6e0586b0a20c7
Cadence Testing Framework0x0000000000000001
Testnet0x8c5303eaa26202d6
Mainnet0xe467b9dd11fa00df

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:

access(all) event TransactionFeeUpdated(newFee: UFix64)
access(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:

// Event emitted when missing SoRs from past heartbeats are detected and will be backfilled:
// - `blockHeight` is the height where the gap is detected
// - `gapStartHeight` is the height of the first missing entry detected
access(all) event RandomHistoryMissing(blockHeight: UInt64, gapStartHeight: UInt64)

// Event emitted when missing SoRs are backfilled on the current heartbeat:
// - `blockHeight` is the height where the backfill happened, it also defines the SoR used to backfill
// - `gapStartHeight` is the height of the first backfilled entry
// - `count` is the number of backfilled entries
// Note that in very rare cases, the backfilled gap may not be contiguous. This event does not
// fully define the backfilled entries in this case.
access(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:

/// Event emitted when the version table is updated.
/// It contains the current version and all the upcoming versions
/// sorted by block height.
/// The sequence increases by one each time an event is emitted.
/// It can be used to verify no events were missed.
access(all) event VersionBeacon(
versionBoundaries: [VersionBoundary],
sequence: UInt64
)

/// Event emitted any time the version boundary freeze period is updated.
/// freeze period is measured in blocks (from the current block).
access(all) event NodeVersionBoundaryFreezePeriodChanged(freezePeriod: UInt64)
Rate this page