SFC

Sonic Browse chains

0xfc00face00000000000000000000000000000000

Proxy implementation: 0xf46ab7507088cc9d3f58bb85ae2c36c86103447d

Solidity v0.8.27+commit.40a35a09

🤖
Query this contract from your AI
Reference: 0xfc00face00000000000000000000000000000000
Sample prompt: "Tell me the current state of sonic/0xfc00face00000000000000000000000000000000"
No AI wired up yet? → mcp.smarts.md · Browse chains
Sonic is a docs-only chain on Smarts: source code and ABI are indexed, but live on-chain data (state, recent events, admin profile) is not currently available. AI agents can still query get_contract_info and get_contract_source via MCP.

Overview

Read Functions
40
Write Functions
28
Events
16

Read Functions

UPGRADE_INTERFACE_VERSION() view

Returns the upgrade interface version string for this SFC contract.✨ AI

Returns

Name Type Description
string The semantic or numeric version identifier for the upgrade interface.✨ AI
constsAddress() view

Get consts address.

Returns

Name Type Description
address
currentEpoch() view

Get the current epoch number.

Returns

Name Type Description
uint256
currentSealedEpoch() view

Returns the current sealed epoch identifier.✨ AI

Returns

Name Type Description
uint256 The current sealed epoch as a uint256.✨ AI
epochEndTime(epoch: uint256) view

Get epoch end time.

Parameters

Name Type Description
epoch uint256

Returns

Name Type Description
uint256
getEpochAccumulatedOriginatedTxsFee(epoch: uint256, validatorID: uint256) view

Get accumulated originated txs fee for a validator in a given epoch.

Parameters

Name Type Description
epoch uint256
validatorID uint256

Returns

Name Type Description
uint256
getEpochAccumulatedRewardPerToken(epoch: uint256, validatorID: uint256) view

Get accumulated reward per token for a validator in a given epoch.

Parameters

Name Type Description
epoch uint256
validatorID uint256

Returns

Name Type Description
uint256
getEpochAccumulatedUptime(epoch: uint256, validatorID: uint256) view

Get accumulated uptime for a validator in a given epoch.

Parameters

Name Type Description
epoch uint256
validatorID uint256

Returns

Name Type Description
uint256
getEpochAverageUptime(epoch: uint256, validatorID: uint256) view

Get average uptime for a validator in a given epoch.

Parameters

Name Type Description
epoch uint256
validatorID uint256

Returns

Name Type Description
uint64
getEpochEndBlock(epoch: uint256) view

Get end block for a given epoch.

Parameters

Name Type Description
epoch uint256

Returns

Name Type Description
uint256
getEpochOfflineBlocks(epoch: uint256, validatorID: uint256) view

Get offline blocks for a validator in a given epoch.

Parameters

Name Type Description
epoch uint256
validatorID uint256

Returns

Name Type Description
uint256
getEpochOfflineTime(epoch: uint256, validatorID: uint256) view

Get offline time for a validator in a given epoch.

Parameters

Name Type Description
epoch uint256
validatorID uint256

Returns

Name Type Description
uint256
getEpochReceivedStake(epoch: uint256, validatorID: uint256) view

Get received stake for a validator in a given epoch.

Parameters

Name Type Description
epoch uint256
validatorID uint256

Returns

Name Type Description
uint256
getEpochSnapshot(epoch: uint256) view

Return the stored snapshot data for a specific epoch.✨ AI

Parameters

Name Type Description
epoch uint256 Epoch index to query.✨ AI

Returns

Name Type Description
endTime uint256 End timestamp (unix seconds) of the epoch snapshot.✨ AI
endBlock uint256 Block number at the end of the epoch.✨ AI
epochFee uint256 Total fees collected for the epoch (in contract token units).✨ AI
baseRewardPerSecond uint256 Base reward rate distributed per second during the epoch.✨ AI
totalStake uint256 Total amount staked at the epoch snapshot.✨ AI
totalSupply uint256 Total token supply recorded at the epoch snapshot.✨ AI
getEpochValidatorIDs(epoch: uint256) view

Get validator IDs for given epoch.

Parameters

Name Type Description
epoch uint256

Returns

Name Type Description
uint256[]
getRedirection(delegator: address) view

Return the address that receives delegated votes or rewards for a given delegator.✨ AI

Parameters

Name Type Description
delegator address Address of the delegator whose redirection target will be queried.✨ AI

Returns

Name Type Description
receiver address Receiver address that the delegator redirects to, or the zero address if no redirection is set.✨ AI
getRedirectionRequest(delegator: address) view

Get the current redirection target for the given delegator.✨ AI

Parameters

Name Type Description
delegator address Delegator address to query the redirection for.✨ AI

Returns

Name Type Description
receiver address Receiver address that receives redirected rewards, or the zero address if no redirection is set.✨ AI
getSelfStake(validatorID: uint256) view

Get self-stake of a validator.

Parameters

Name Type Description
validatorID uint256

Returns

Name Type Description
uint256
getStake(delegator: address, validatorID: uint256) view

Returns the amount of stake the delegator has assigned to the given validator.✨ AI

Parameters

Name Type Description
delegator address Address of the delegator whose stake is being queried.✨ AI
validatorID uint256 Identifier of the validator for which to query the delegator's stake.✨ AI

Returns

Name Type Description
stake uint256 The staked token amount (in contract base units) that the delegator has for the validator.✨ AI
getValidator(validatorID: uint256) view

Fetches and returns on-chain details for the specified validator ID.✨ AI

Parameters

Name Type Description
validatorID uint256 Identifier of the validator to query.✨ AI

Returns

Name Type Description
status uint256 Validator status code as stored on-chain.✨ AI
receivedStake uint256 Total stake received by the validator, denominated in wei.✨ AI
auth address Address authorized to manage the validator (operator or owner).✨ AI
createdEpoch uint256 Epoch when the validator was created.✨ AI
createdTime uint256 Creation timestamp (unix seconds) for the validator.✨ AI
deactivatedTime uint256 Deactivation timestamp (unix seconds); zero if the validator is still active.✨ AI
deactivatedEpoch uint256 Epoch when the validator was deactivated; zero if still active.✨ AI
getValidatorID(auth: address) view

Return the validator identifier associated with the given address.✨ AI

Parameters

Name Type Description
auth address Address to query for its associated validator identifier.✨ AI

Returns

Name Type Description
validatorID uint256 The uint256 validator identifier associated with the provided address.✨ AI
getValidatorPubkey(validatorID: uint256) view

Fetches the validator's public key for the specified validator ID.✨ AI

Parameters

Name Type Description
validatorID uint256 ID of the validator whose public key to retrieve.✨ AI

Returns

Name Type Description
pubkey bytes pubkey: Validator public key as raw bytes in serialized form (format depends on the chain's key scheme).✨ AI
getWithdrawalRequest(delegator: address, validatorID: uint256, wrID: uint256) view

Returns the withdrawal request details for a delegator's stake with a specific validator.✨ AI

Parameters

Name Type Description
delegator address Address of the delegator whose withdrawal request is being queried.✨ AI
validatorID uint256 Numeric identifier of the validator associated with the request.✨ AI
wrID uint256 Identifier or index of the withdrawal request for the given delegator and validator.✨ AI

Returns

Name Type Description
epoch uint256 Epoch when the withdrawal request was created or becomes effective.✨ AI
time uint256 Unix timestamp (seconds) associated with the withdrawal request.✨ AI
amount uint256 Amount of tokens requested for withdrawal (in the contract's token units).✨ AI
isSlashed(validatorID: uint256) view

Check whether the given validator is slashed - the stake (or its part) cannot be withdrawn because of misbehavior (double-sign) of the validator.

Parameters

Name Type Description
validatorID uint256

Returns

Name Type Description
bool
lastValidatorID() view

Return the ID of the last registered validator.✨ AI

Returns

Name Type Description
uint256 The uint256 identifier of the most recently added validator.✨ AI
owner() view

Returns the address of the contract owner.✨ AI

dev: Returns the address of the current owner.

Returns

Name Type Description
address The current owner address that holds administrative privileges over the contract.✨ AI
pendingRewards(delegator: address, toValidatorID: uint256) view

Get the amount of rewards which can be currently claimed by the given delegator for the given validator.

Parameters

Name Type Description
delegator address
toValidatorID uint256

Returns

Name Type Description
uint256
proxiableUUID() view

Retrieve the ERC1822 proxiable UUID that identifies the implementation storage slot.✨ AI

dev: Implementation of the ERC-1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.

Returns

Name Type Description
bytes32 A bytes32 UUID (ERC-1822) that uniquely identifies the storage slot used for the implementation address.✨ AI
pubkeyAddressToValidatorID(pubkeyAddress: address) view

Return the validator ID associated with a given pubkey mapping address.✨ AI

Parameters

Name Type Description
pubkeyAddress address Address that represents the stored validator public-key mapping entry.✨ AI

Returns

Name Type Description
validatorID uint256 Numeric identifier of the validator associated with the given pubkeyAddress.✨ AI
redirectionAuthorizer() view

Returns the address currently configured as the redirection authorizer.✨ AI

Returns

Name Type Description
address The address of the contract or account authorized to perform redirection authorization.✨ AI
rewardsStash(delegator: address, validatorID: uint256) view

Get amount of currently stashed rewards.

Parameters

Name Type Description
delegator address
validatorID uint256

Returns

Name Type Description
uint256
slashingRefundRatio(validatorID: uint256) view

Get the slashing refund ratio for a specific validator.✨ AI

Parameters

Name Type Description
validatorID uint256 Identifier of the validator to query.✨ AI

Returns

Name Type Description
refundRatio uint256 refundRatio: Slashing refund ratio for the validator, expressed in the contract's internal units.✨ AI
stakeSubscriberAddress() view

Returns the address currently set as the stake subscriber.✨ AI

Returns

Name Type Description
address The address registered as the stake subscriber.✨ AI
stashedRewardsUntilEpoch(delegator: address, validatorID: uint256) view

Get the total stashed rewards for a delegator toward a validator up to a given epoch.✨ AI

Parameters

Name Type Description
delegator address Address of the delegator whose stashed rewards are queried.✨ AI
validatorID uint256 ID of the validator for which stashed rewards are queried.✨ AI

Returns

Name Type Description
epoch uint256 Total stashed reward amount (in the contract's smallest token unit) for the delegator to the validator up to and including the specified epoch.✨ AI
totalActiveStake() view

Return the total active stake currently held by the protocol.✨ AI

Returns

Name Type Description
uint256 Total active stake across all accounts, expressed in wei as a uint256.✨ AI
totalStake() view

Returns the total amount of stake held by the contract.✨ AI

Returns

Name Type Description
uint256 Total staked amount currently held by the contract, in wei.✨ AI
totalSupply() view

Returns the total number of tokens in existence.✨ AI

Returns

Name Type Description
uint256 Total number of tokens in existence as a uint256.✨ AI
treasuryAddress() view

Returns the address of the treasury for this contract.✨ AI

Returns

Name Type Description
address The treasury address that receives fees or holds contract funds.✨ AI
unresolvedTreasuryFees() view

Returns the current amount of unresolved fees owed to the treasury.✨ AI

Returns

Name Type Description
uint256 Total unresolved fee amount owed to the treasury, expressed in the contract's base token smallest units.✨ AI
version() pure

Returns the contract's version encoded as a 3-byte value.✨ AI

dev: Returns the version of the SFC contract

Returns

Name Type Description
bytes3 A 3-byte value encoding the contract version (bytes3), typically major.minor.patch packed into three bytes.✨ AI

Write Functions

announceRedirection(to: address) nonpayable

Announce redirection of address to be called by validator whose auth key was compromised. Produced events are used to notify redirect authorizer about redirection request. Redirect authorizer then initiates creating of appropriate redirect by calling initiateRedirection().

Parameters

Name Type Description
to address
burnNativeTokens() payable

Burn native tokens by sending them to the SFC contract.

claimRewards(toValidatorID: uint256) nonpayable

Claim rewards for stake delegated to a validator.

Parameters

Name Type Description
toValidatorID uint256
createValidator(pubkey: bytes) payable

Create a validator with a given public key while using attached value as the validator's self-stake.

Parameters

Name Type Description
pubkey bytes
deactivateValidator(validatorID: uint256, status: uint256) nonpayable

Deactivate a validator. Called by network node when a double-sign of the given validator is registered. Is called before sealEpoch() call.

Parameters

Name Type Description
validatorID uint256
status uint256
delegate(toValidatorID: uint256) payable

Delegate stake to a validator.

Parameters

Name Type Description
toValidatorID uint256
distributeExtraReward(epoch: uint256, withBurn: bool) payable

Distribute extra rewards for validators at given epoch coming from an external source. The tokens received are burned and the reward share is added to the stash of each validator eligible for the reward in the given epoch. An optional `withBurn` flag allows the sender to signal that preconfigured percentage of the rewards should be burned.

Parameters

Name Type Description
epoch uint256
withBurn bool
initialize(sealedEpoch: uint256, _totalSupply: uint256, nodeDriver: address, _c: address, owner: address) nonpayable

Initialization is called only once, after the contract deployment. Because the contract code is written directly into genesis, constructor cannot be used.

Parameters

Name Type Description
sealedEpoch uint256
_totalSupply uint256
nodeDriver address
_c address
owner address
initiateRedirection(from: address, to: address) nonpayable

Initiate redirection of withdrawals/claims for a compromised validator account. Needs to be accepted by validator key holder before the redirect is active.

Parameters

Name Type Description
from address
to address
issueTokens(amount: uint256) nonpayable

Issue tokens to the issued tokens recipient as a counterparty to the burnt FTM tokens.

Parameters

Name Type Description
amount uint256
redirect(to: address) nonpayable

Accept redirection proposal. Redirection must by accepted by the validator key holder before it starts to be applied.

Parameters

Name Type Description
to address
renounceOwnership() nonpayable

Renounces ownership of the contract by transferring it to the zero address.✨ AI

dev: Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
resolveTreasuryFees() nonpayable

Resolve failed treasury transfers and send the unresolved fees to the treasury address.

restakeRewards(toValidatorID: uint256) nonpayable

Re-stake rewards - claim rewards for staking and delegate it immediately to the same validator - add it to the current stake.

Parameters

Name Type Description
toValidatorID uint256
sealEpoch(offlineTime: uint256[], offlineBlocks: uint256[], uptimes: uint256[], originatedTxsFee: uint256[]) nonpayable

Seal epoch. Called BEFORE epoch sealing made by the client itself.

Parameters

Name Type Description
offlineTime uint256[]
offlineBlocks uint256[]
uptimes uint256[]
originatedTxsFee uint256[]
sealEpochValidators(nextValidatorIDs: uint256[]) nonpayable

Seal epoch. Called AFTER epoch sealing made by the client itself.

Parameters

Name Type Description
nextValidatorIDs uint256[]
setGenesisDelegation(delegator: address, toValidatorID: uint256, stake: uint256) nonpayable

Set an initial delegation. Called only as part of network initialization/genesis file generating.

Parameters

Name Type Description
delegator address
toValidatorID uint256
stake uint256
setGenesisValidator(auth: address, validatorID: uint256, pubkey: bytes, createdTime: uint256) nonpayable

Set an initial validator. Called only as part of network initialization/genesis file generating.

Parameters

Name Type Description
auth address
validatorID uint256
pubkey bytes
createdTime uint256
setRedirectionAuthorizer(v: address) nonpayable

Set admin address responsible for initiating redirections.

Parameters

Name Type Description
v address
stashRewards(delegator: address, toValidatorID: uint256) nonpayable

Stash rewards for a delegator.

Parameters

Name Type Description
delegator address
toValidatorID uint256
transferOwnership(newOwner: address) nonpayable

Transfers contract ownership to the specified new owner address.✨ AI

dev: Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.

Parameters

Name Type Description
newOwner address Address that will become the contract owner.✨ AI
undelegate(toValidatorID: uint256, wrID: uint256, amount: uint256) nonpayable

Un-delegate stake from a validator.

Parameters

Name Type Description
toValidatorID uint256
wrID uint256
amount uint256
updateConstsAddress(v: address) nonpayable

Update consts address.

Parameters

Name Type Description
v address
updateSlashingRefundRatio(validatorID: uint256, refundRatio: uint256) nonpayable

Update slashing refund ratio for a validator. The refund ratio is used to calculate the amount of stake that can be withdrawn after slashing.

Parameters

Name Type Description
validatorID uint256
refundRatio uint256
updateStakeSubscriberAddress(v: address) nonpayable

Update voteBook address.

Parameters

Name Type Description
v address
updateTreasuryAddress(v: address) nonpayable

Update treasury address.

Parameters

Name Type Description
v address
upgradeToAndCall(newImplementation: address, data: bytes) payable

Upgrade the proxy's implementation to newImplementation and execute a call with data, forwarding any attached ETH.✨ AI

dev: Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

Parameters

Name Type Description
newImplementation address Address of the new implementation contract to set as the proxy target.✨ AI
data bytes Encoded function call and arguments to execute on the new implementation after upgrade; can be empty.✨ AI
withdraw(toValidatorID: uint256, wrID: uint256) nonpayable

Withdraw stake from a validator after its un-delegation. Un-delegated stake is locked for a certain period of time.

Parameters

Name Type Description
toValidatorID uint256
wrID uint256

Events

AnnouncedRedirection(from: address, to: address)
Name Type Indexed Description
from address
to address
BurntNativeTokens(amount: uint256)
Name Type Indexed Description
amount uint256
ChangedValidatorStatus(validatorID: uint256, status: uint256)
Name Type Indexed Description
validatorID uint256
status uint256
ClaimedRewards(delegator: address, toValidatorID: uint256, rewards: uint256)
Name Type Indexed Description
delegator address
toValidatorID uint256
rewards uint256
CreatedValidator(validatorID: uint256, auth: address, createdEpoch: uint256, createdTime: uint256)
Name Type Indexed Description
validatorID uint256
auth address
createdEpoch uint256
createdTime uint256
DeactivatedValidator(validatorID: uint256, deactivatedEpoch: uint256, deactivatedTime: uint256)
Name Type Indexed Description
validatorID uint256
deactivatedEpoch uint256
deactivatedTime uint256
Delegated(delegator: address, toValidatorID: uint256, amount: uint256)
Name Type Indexed Description
delegator address
toValidatorID uint256
amount uint256
DistributedExtraRewards(epochID: uint256, received: uint256, distributed: uint256)
Name Type Indexed Description
epochID uint256
received uint256
distributed uint256
Initialized(version: uint64)
Name Type Indexed Description
version uint64
OwnershipTransferred(previousOwner: address, newOwner: address)
Name Type Indexed Description
previousOwner address
newOwner address
RestakedRewards(delegator: address, toValidatorID: uint256, rewards: uint256)
Name Type Indexed Description
delegator address
toValidatorID uint256
rewards uint256
TreasuryFeesResolved(amount: uint256)
Name Type Indexed Description
amount uint256
Undelegated(delegator: address, toValidatorID: uint256, wrID: uint256, amount: uint256)
Name Type Indexed Description
delegator address
toValidatorID uint256
wrID uint256
amount uint256
UpdatedSlashingRefundRatio(validatorID: uint256, refundRatio: uint256)
Name Type Indexed Description
validatorID uint256
refundRatio uint256
Upgraded(implementation: address)
Name Type Indexed Description
implementation address
Withdrawn(delegator: address, toValidatorID: uint256, wrID: uint256, amount: uint256, penalty: uint256)
Name Type Indexed Description
delegator address
toValidatorID uint256
wrID uint256
amount uint256
penalty uint256