Skip to content

core staking contracts

SDL Token Contract (StakingAllowance)

SDL is a staking allowance token which enables stakers to earn a percentage of protocol rewards and grants stakers the right to priority staking access over non SDL holders.

All standard ERC20 functions are implemented for StakingAllowance

Mints tokens to an account

function mint(address _account, uint256 _amount) public
Name Type Description
_account address Address to mint to
_amount uint256 Amount of tokens to mint

Mints tokens to a contract on behalf of an account via ERC677

function mintToContract(address _contract, address _account, uint256 _amount, bytes _calldata) public
Name Type Description
_contract address Address of contract to send tokens to
_account address Address to mint to
_amount uint256 Amount of tokens to mint
_calldata bytes

Burns tokens from the sender

function burn(uint256 _amount) public
Name Type Description
_amount uint256 Amount of tokens to burn

Burns _amount tokens from _account, deducting from the sender’s allowance

function burnFrom(address account, uint256 amount) public
Name Type Description
_account address Address to burn from
_amount uint256 Amount of tokens to burn

Transfers tokens to an address and calls onTokenTransfer with additional data if the recipient is a contract

function transferAndCall(address _to, uint256 _value, bytes _data) external returns (bool)
Name Type Description
_to address Address to send the tokens to
_value uint256 Value of token transfer
_data bytes Calldata included in the transfer

Similar to transferAndCall but allows the caller to specify a custom sender (used to mint allowance on behalf of an address and send to a contract fallback)

function transferAndCallWithSender(address _sender, address _to, uint256 _value, bytes _data) private returns (bool)
Name Type Description
_sender address Specified sender of the tokens, the party who ‘receives’ them into a contract
_to address Contract address to send the tokens to
_value uint256 Value of token transfer
_data bytes Calldata included in the transfer