Skip to main content

stPWN

1. Summary

The Staked PWN (stPWN) token is a representation of a stake in the PWN DAO. The stPWN token is mintable and burnable by the VoteEscrowedPWN contract.

3. Contract details

  • StakedPWN.sol is written in Solidity version 0.8.25

Features

  • Mint and Burn tokens (stakes)
  • Transfers are disabled by default, but can be enabled by the PWN DAO

Inherited contracts, implemented Interfaces and ERCs

Functions

enableTransfers

Overview

Function to enable permissionless stPWN token transfers. Transfers cannot be disabled once they have been enabled.

This function doesn't take any arguments.

Implementation

function enableTransfers() external onlyOwner {
if (transfersEnabled) {
revert Error.TransfersAlreadyEnabled();
}
transfersEnabled = true;
}
setTransferAllowlist

Overview

Function to enable token transfers for an address before transferes are enabled for all holders.

This function takes two arguments:

  • addressaddr
  • boolisAllowed

Implementation

function setTransferAllowlist(address addr, bool isAllowed) external onlyOwner {
transferAllowlist[addr] = isAllowed;
}
mint

Overview

Function to mint new stPWN tokens. Only supply manager (vePWN) can call this function.

This function takes two arguments:

  • addressto
  • uint256tokenId

Implementation

function mint(address to, uint256 tokenId) external onlySupplyManager {
_mint(to, tokenId);
}
burn

Overview

Function to burn stPWN tokens. Only supply manager (vePWN) can call this function.

This function takes one argument:

  • uint256tokenId

Implementation

function burn(uint256 tokenId) external onlySupplyManager {
_burn(tokenId);
}