SnowconeDAO
ResourcesMediaDocs
  • Introduction
  • Create
    • Make Your Snowcone Project
      • Project Details
      • Funding
      • Token
      • Rules
    • Governance Resources
      • Snapshot
      • Gnosis Safe
    • Community Resources
      • Make a Discord Server
  • Learn
    • Overview
    • Architecture
    • Administration
    • Risk
    • Glossary
      • Ballot
      • Data Source
      • Delegate
      • Discount Rate
      • Funding cycle
      • NFT rewards
      • Operator
      • Overflow
      • Payment terminal
      • Project
      • Redemption rate
      • Reserved tokens
      • Split allocator
      • Splits
      • Tokens
    • Tokenomics
  • Build
    • Getting Started
    • Basics
    • Project NFT
    • Programmable treasury
    • Treasury extensions
      • Ballot
      • Data Source
      • Pay delegate
      • Redemption Delegate
      • Split Allocator
    • Utilities
      • Project payer
      • Splits Payer
  • API
    • Data Structures
      • SNOW721PricingParams
      • SNOW721Tier
      • SNOW721TierParams
      • SNOWBitmapWord
      • SNOWDeployTiered721DelegateData
      • SNOWDidPayData
    • Contracts
      • SNWProjects
        • Event
          • Create
          • SetMetadata
          • SetTokenUriResolver
        • Properties
          • Count
          • metadataContentOf
          • tokenUriResolver
        • Read
          • supportsInterface
          • tokenURI
        • Write
          • createFor
          • setMetadataOf
          • setTokenUriResolver
  • Subgraph
    • Subgraph Entities
    • Sample Queries
Powered by GitBook

SnowconeDAO

On this page

Was this helpful?

Export as PDF
  1. Build
  2. Utilities

Project payer

Last updated 2 years ago

Was this helpful?

SNOWETHERC20ProjectPayer contracts make it easy to route funds to projects' treasuries from other contracts or within inheriting contracts. This is useful for routing funds to a Snowcone treasury within other contracts such as an NFT's minting function, or creating contracts that will automatically route any received funds to a project's treasury with preconfigured parameters to send along with the payment.

The SNOWETHERC20ProjectPayer can be inherited from any contract to facilitate internal transactions to Snowcone treasuries in AVAX or any ERC-20, assuming the project is using a payment terminal that accepts the tokens. They can also be deployed as standalone project payer copies using SNOWProjectPayerDeployer.

Inheriting SNOWProjectPayer

Inheriting from SNOWETHERC20ProjectPayer will give a contract access to a public SNOWProjectPayer.pay(...) function, a public SNOWProjectPayer.addToBalanceOf(...)function, an internal SNOWProjectPayer._pay(...) function, and an internal SNOWProjectPayer._addToBalanceOf(...) function. These can be used from within the contract to route funds to a Snowcone treasury while specifying all relevant parameters to contextualize the payment. Use the internal versions if the inheriting contract has already handled receiving the funds being forwarded.

Follow instructions in Getting started to import the SNOWProjectPayer files into a project.

​