NativeTokenStakingManager

Deploy the NativeTokenStakingManager implementation contract

Abstract Contract in Solidity

The StakingManager is an abstract contract in Solidity, meaning it cannot be deployed directly—it only defines the structure and shared logic for staking operations. Abstract contracts exist to provide reusable code that child contracts can inherit and build upon.

Code Example: How Inheritance Works

The abstract StakingManager defines a _reward() function that must be implemented by child contracts:

// In StakingManager (abstract contract)
function _reward(address account, uint256 amount) internal virtual;

The NativeTokenStakingManager implements this function to mint native tokens:

// In NativeTokenStakingManager (concrete implementation)
function _reward(address account, uint256 amount) internal virtual override {
    NATIVE_MINTER.mintNativeCoin(account, amount);
}

This is why we must deploy NativeTokenStakingManager rather than StakingManager—the abstract contract leaves _reward() undefined, while the concrete implementation provides the actual logic for distributing rewards via the Native Minter precompile.

Deploying NativeTokenStakingManager

In the embedded console view below, be sure you have your own L1 selected in the header of the view:

Is this guide helpful?