Skip to main content
Version: Next

Flow Token Contract

The FlowToken contract defines the FLOW network token.

Source: FlowToken.cdc

NetworkContract Address
Emulator/Canary0x0ae53cb6e3f42a79
Testnet0x7e60df042a9c0868
Sandboxnet0x0661ab7d6696a460
Mainnet0x1654653399040a61

Transactions

IDNameSource
FT.01Transfer FLOWflowToken/transfer_tokens.cdc
FT.02Get an account's balanceflowToken/scripts/get_balance.cdc
FT.03Get total supplyflowToken/scripts/get_supply.cdc

Events

Flow relies on a set of core contracts that define key portions of the Flow protocol. Those contracts are core contracts and are made to emit the events documented below. You can read about the core contracts here and view their source code and event definitions.

Events emitted from core contracts follow a standard format:


_10
A.{contract address}.{contract name}.{event name}

The components of the format are:

  • contract address - the address of the account the contract has been deployed to
  • contract name - the name of the contract in the source code
  • event name - the name of the event as declared in the source code

Flow Token Contract

Description of events emitted from the FLOW Token contract. The contract defines the fungible FLOW token. Please note that events for the fungible token contracts are the same if deployed to a different account but the contract address is changed to the address of the account the contract has been deployed to.

Tokens Initialized

Event that is emitted when the contract gets created.

  • Event name: TokensInitialized
  • Mainnet event: A.1654653399040a61.FlowToken.TokensInitialized
  • Testnet event: A.7e60df042a9c0868.FlowToken.TokensInitialized

_10
pub event TokensInitialized(initialSupply: UFix64)

FieldTypeDescription
initialSupplyUFix64The initial supply of the tokens

Tokens Withdrawn

Event that is emitted when tokens get withdrawn from a Vault.

  • Event name: TokensWithdrawn
  • Mainnet event: A.1654653399040a61.FlowToken.TokensWithdrawn
  • Testnet event: A.7e60df042a9c0868.FlowToken.TokensWithdrawn

_10
pub event TokensWithdrawn(amount: UFix64, from: Address?)

FieldTypeDescription
amountUFix64The amount of tokens withdrawn
fromAddress?Optional address of the account that owns the vault where tokens were withdrawn from. nil if the vault is not in an account's storage

Tokens Deposited

Event that is emitted when tokens get deposited to a Vault.

  • Event name: TokensDeposited
  • Mainnet event: A.1654653399040a61.FlowToken.TokensDeposited
  • Testnet event: A.7e60df042a9c0868.FlowToken.TokensDeposited

_10
pub event TokensDeposited(amount: UFix64, to: Address?)

FieldTypeDescription
amountUFix64The amount of tokens withdrawn
toAddress?Optional address of the account that owns the vault where tokens were deposited to. nil if the vault is not in an account's storage

Tokens Minted

Event that is emitted when new tokens gets minted.

  • Event name: TokensMinted
  • Mainnet event: A.1654653399040a61.FlowToken.TokensMinted
  • Testnet event: A.7e60df042a9c0868.FlowToken.TokensMinted

_10
pub event TokensMinted(amount: UFix64)

FieldTypeDescription
amountUFix64The amount of tokens to mint

Tokens Burned

Event that is emitted when tokens get destroyed.

  • Event name: TokensBurned
  • Mainnet event: A.1654653399040a61.FlowToken.TokensBurned
  • Testnet event: A.7e60df042a9c0868.FlowToken.TokensBurned

_10
pub event TokensBurned(amount: UFix64)

FieldTypeDescription
amountUFix64The amount of tokens to burn

Minter Created

Event that is emitted when a new minter resource gets created.

  • Event name: MinterCreated
  • Mainnet event: A.1654653399040a61.FlowToken.MinterCreated
  • Testnet event: A.7e60df042a9c0868.FlowToken.MinterCreated

_10
pub event MinterCreated(allowedAmount: UFix64)

FieldTypeDescription
allowedAmountUFix64The amount of tokens that the minter is allowed to mint

Burner Created

Event that is emitted when a new burner Resource gets created.

  • Event name: BurnerCreated
  • Mainnet event: A.1654653399040a61.FlowToken.BurnerCreated
  • Testnet event: A.7e60df042a9c0868.FlowToken.BurnerCreated

_10
pub event BurnerCreated()

Staking Events

To learn more about staking events, read staking/events/