Project payer

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.

Last updated

SnowconeDAO