Contract Addresses#
The most secure way to retrieve contract addresses is from the blockchain itself.
Alternatively, you can also get the addresses from the blockchain's source code.
Attention
Applications should NOT have Flare contract addresses in their source code, as these might change from time to time.
Instead, applications are strongly encouraged to retrieve any contract address they need directly from the blockchain.
Retrieval from Blockchain#
The PriceSubmitter
smart contract is deployed in the Genesis block at an immutable address: 0x1000000000000000000000000000000000000003
, both on Flare and Songbird.
From it, the following contract addresses can be retrieved:
FTSOManager
:PriceSubmitter.getFtsoManager()
- Individual
FTSO
contracts:FtsoManager.getFtsos()
FTSORewardManager
:FtsoManager.rewardManager()
WNat
:FtsoRewardManager.wNat()
- Individual
FTSORegistry
:PriceSubmitter.getFtsoRegistry()
FTSOWhitelister
:PriceSubmitter.voterWhitelister()
Additionally, on the Flare Network, there is also a handy contract named AddressUpdater
accessible through the PriceSubmitter
which lists all other contracts via the getContractNamesAndAddresses()
method.
AddressUpdater
:PriceSubmitter.getAddressUpdater()
Retrieval from Source Code#
The Flare Smart Contracts repository contains an autogenerated JSON file listing the latest deployed addresses of all Flare contracts.
You can find this file in the deployment/deploys
folder, and parse it to retrieve the addresses of any Flare contract.
Attention
As stated at the beginning, applications should NOT have Flare contract addresses in their source code, as these might change from time to time.
Instead, applications are strongly encouraged to retrieve any contract address they need directly from the blockchain.
Flare | Songbird | |
---|---|---|
Branch | flare_network_deployed_code |
songbird_network_deployed_code |
JSON file | flare.json | songbird.json |