SFC

Sonic

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
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

Name Type Description
string
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

Name Type Description
uint256
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

Parameters

Name Type Description
epoch uint256

Returns

Name Type Description
endTime uint256
endBlock uint256
epochFee uint256
baseRewardPerSecond uint256
totalStake uint256
totalSupply uint256
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

Parameters

Name Type Description
delegator address

Returns

Name Type Description
receiver address
getRedirectionRequest(delegator: address) view

Parameters

Name Type Description
delegator address

Returns

Name Type Description
receiver address
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

Parameters

Name Type Description
delegator address
validatorID uint256

Returns

Name Type Description
stake uint256
getValidator(validatorID: uint256) view

Parameters

Name Type Description
validatorID uint256

Returns

Name Type Description
status uint256
receivedStake uint256
auth address
createdEpoch uint256
createdTime uint256
deactivatedTime uint256
deactivatedEpoch uint256
getValidatorID(auth: address) view

Parameters

Name Type Description
auth address

Returns

Name Type Description
validatorID uint256
getValidatorPubkey(validatorID: uint256) view

Parameters

Name Type Description
validatorID uint256

Returns

Name Type Description
pubkey bytes
getWithdrawalRequest(delegator: address, validatorID: uint256, wrID: uint256) view

Parameters

Name Type Description
delegator address
validatorID uint256
wrID uint256

Returns

Name Type Description
epoch uint256
time uint256
amount uint256
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

Returns

Name Type Description
uint256
owner() view
dev: Returns the address of the current owner.

Returns

Name Type Description
address
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
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
pubkeyAddressToValidatorID(pubkeyAddress: address) view

Parameters

Name Type Description
pubkeyAddress address

Returns

Name Type Description
validatorID uint256
redirectionAuthorizer() view

Returns

Name Type Description
address
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

Parameters

Name Type Description
validatorID uint256

Returns

Name Type Description
refundRatio uint256
stakeSubscriberAddress() view

Returns

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

Parameters

Name Type Description
delegator address
validatorID uint256

Returns

Name Type Description
epoch uint256
totalActiveStake() view

Returns

Name Type Description
uint256
totalStake() view

Returns

Name Type Description
uint256
totalSupply() view

Returns

Name Type Description
uint256
treasuryAddress() view

Returns

Name Type Description
address
unresolvedTreasuryFees() view

Returns

Name Type Description
uint256
version() pure
dev: Returns the version of the SFC contract

Returns

Name Type Description
bytes3

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
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
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
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
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
data bytes
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