LogoLogo
  • Swarm Network
  • Swarm Network
    • Network Governance
      • Getting started
      • Voting App
      • The Swarm Network
        • Powers
        • Governance
        • Members
        • Swarm Council
        • Treasury
      • Initiating Governance Actions
        • Introduction
        • Proposals
        • Ballot Types
        • Submitting a GAP
      • Governance Action Voting Process
        • Ballots
        • Retrieving the text of previous ballots
        • Voting
    • SWM Token
    • SWM Staking
  • Swarm Protocol
    • SRC20
      • SRC20 Token Contract
      • Transfer Rules Contract
      • Featured Contract
      • Roles Contract
      • SRC20 Registry Contract
      • Asset Registry Contract
      • Minter Contract
      • SRC20Factory Contract
    • Swarm Powered Fundraise
      • Uniswap Proxy Contract
      • Currency Registry Contract
      • Affiliate Manager Contract
      • Swarm Powered Fundraise Contract
      • Contributor Restrictions Contract
    • mySwarm.app
    • kovan.mySwarm.app (test version, please use this)
    • Mumbai Testnet
  • Open tools
    • Legacy Masternode Reward Collection
    • VerifiedExistence
    • Market Access Protocol
  • Keep up
    • Blog
    • Twitter
    • Discourse
    • Telegram
    • Voting App
    • FAQ
Powered by GitBook
On this page

Was this helpful?

  1. Swarm Protocol
  2. SRC20

Minter Contract

PreviousAsset Registry ContractNextSRC20Factory Contract

Last updated 5 years ago

Was this helpful?

  • Smart Contract: globally across all SRC20

  • Created: pre-exists / created once

  • Purpose: manages the minting of SRC20 and corresponding SWM stakes of additional tokens added to an existing SRC20

  • Example:

Feature Description

Read Functions

Function

Description

calcStake()

Returns the SWM stake amount needed to mint an additional amount of specific SRC20 tokens; this function translates the Net Asset Value into USD denominated staking amounts based on the network policy and then uses the referenced SWMPriceOracle to translate them into SWM values based on current prices

_SWMPriceOracle() returns (address)

Displays the address for the price oracle contract used to determine the SWM price

_registry() returns (address)

Displays the SRC20 Registry contract used in this contract

_asset() returns (address)

Displays the Asset Registry contract used in this contract

Write Functions

Function

Description

stakeAndMint()

Calling this function withdraws the previously authorized number of SWM tokens required for staking from the caller’s address, and then mints numSRC20Tokens of src20 tokens in the caller’s address.; returns True on success |

On Ropsten