Crescendo
NFT drop utilizing a gas-optimzed version of ERC1155 with bonding curves to enable dynamic pricing for fan powered price discovery and guarantee liquidity to collectors.
Getting Started Module Methods Smart Contract Methods
Getting Started
To begin we'll import the FrostySDK, chain configurations, and the Crescendo module.
Then we'll setup our signer (via wagmi/ethers) and create a new instance of the FrostySDK.
Module Methods
deploy Deploy a minimal proxy clone of the Crescendo implementation contract.
getContract Get an ethers contract instance of a previously deployed Crescendo contract.
deploy
Deploy a minimal proxy clone of the Crescendo implementation contract.
sdk (SDK) An instance of the FrostySDK, configured with a chain and signer.
name (string) The name of the NFT collection.
symbol (string) The symbol of the NFT collection.
initialPrice (BigNumber) The initial price (in Wei) to mint a token from the collection.
step1 (BigNumber) The amount to increment/decrement the per token price pre-hitch.
step2 (BigNumber) The amount to increment/decrement the per token price post-hitch.
hitch (number) Once total supply exceeds the hitch, the amount by which we increment/decrement pricing increases.
takeRateBPS (number) The take rate in basis points used to calculate reserve funds for trading liquidity.
unlockDate (number) The timestamp at which crescendo will unlock and allow profit distributions.
royaltyBPS (number) The maximum number of tokens allowed per mint.
metadataURI (string) The base URI for the collection metadata.
metadataRendererInit (MetadataRendererInit) An object containing metadata to initialize with the on-chain metadata renderer.
onTxPending (Function) - optional A callback function executed upon submission of the deploy transaction.
onTxReceipt (Function) - optional A callback function executed upon receipt of the deploy transaction.
getContract
Get an ethers contract instance of a previously deployed Crescendo contract.
sdk (SDK) An instance of the FrostySDK, configured with a chain and signer.
address (string) The contract address of a previously deployed Crescendo contract.
Smart Contract Methods
buy Mint an NFT at the current mint rate
sell Sell an NFT at the current burn rate
totalSupply Returns the total number of NFTs currently in circulation.
flipSaleState Toggles whether to allow minting.
withdraw Allows the account authorized for payouts to withdraw dividends at the specified take rate.
liquidity Returns the peak liquidity held by the contract.
reserveAmt Returns the peak reserve funds held by the contract.
updateUri Allows the owner to update the URI serving metadata for the NFT collection.
buy
Mint an NFT at the current mint rate
tokenId (uint256) The id of the token.
sell
Sell an NFT at the current burn rate
tokenId (uint256) The id of the token. (must be zero)
totalSupply
Returns the total number of NFTs currently in circulation.
tokenId (uint256) The id of the token. (must be zero)
flipSaleState
Toggles whether to allow minting.
withdraw
Allows the contract owner to withdraw dividends at the specified take rate.
liquidity
Returns the peak liquidity held by the contract.
reserveAmt
Returns the peak reserve funds held by the contract.
updateUri
Allows the owner to update the URI serving metadata for the NFT collection.
uri (uint256) The URI serving metadata for the NFT collection.
Last updated