Developer Docs
AppGitHub
  • Welcome!
  • Smart contracts
    • Core
      • Introduction
      • Deep Dive
      • Smart Contract Reference
        • PWN Hub
          • Tags
        • PWN Config
        • PWN Vault
        • Loan Types
          • Simple Loan
        • Proposals
          • Simple Loan Proposal
            • Simple Proposal
            • List Proposal
            • Elastic Proposal
            • Elastic Chainlink Proposal
            • Dutch Proposal
        • PWN Utilized Credit
        • PWN LOAN
        • PWN Revoked Nonce
        • Peripheral Contracts
          • Acceptor Controller
            • World ID
          • State Fingerprint Computer
            • UniV3
            • Chicken Bonds
          • Pool Adapter
            • Aave
            • Compound
            • ERC4626
        • Miscellaneous
          • PWN Fee Calculator
          • PWN Signature Checker
          • PWN Errors
          • PWN Periphery
          • Timelock
    • PWN DAO
      • Governance
        • Optimistic
        • Token
      • Tokens
        • PWN
        • stPWN
        • vePWN
          • Stake
          • Power
          • Metadata
      • Epoch Clock
      • Miscellaneous
        • Errors
        • EpochPowerLib
    • Tools
      • PWN Safe
        • Architecture
        • Security considerations
        • Smart Contract Reference
          • PWN Safe Factory
          • ATR Module
            • Tokenized Asset Manager
            • Recipient Permission Manager
          • Whitelist
          • ATR Guard
            • Operators context
      • Token Bundler
      • PWN Deployer
    • Libraries
      • MultiToken
    • Contract Addresses
  • More documentation
    • PWN Docs
    • FAQ
    • Audits
    • Using PWN without front-end
  • Deprecated
    • PWN Beta
      • Architecture
      • PWN
        • Off-chain signed offer
        • Offer types
      • PWN Vault
      • PWN LOAN
Powered by GitBook
On this page
  • 1. Summary
  • 2. Important links
  • 3. Contract details
  • Features
  • Inherited contracts, implemented Interfaces and ERCs
  • Functions
Edit on GitHub
  1. Smart contracts
  2. PWN DAO
  3. Tokens

stPWN

PreviousPWNNextvePWN

Last updated 6 months ago

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.

2. Important links

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

This function takes two arguments:

  • addressto

  • uint256tokenId

Implementation

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

Overview

This function takes one argument:

  • uint256tokenId

Implementation

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

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

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

Ownable2Step
ERC721
vePWN
vePWN
pwn_dao/src/token/StakedPWN.sol at main · PWNDAO/pwn_daoGitHub
Logo
393KB
StakedPWN.json
ABI