AlchemyFactory
This contract creates new Alchemy Contracts which wrap NFT tokens into ERC20 tokens in order to create a DAO around them.
init
initfunction init(address governorFactory, uint votinginit, address timelockFactory, uint256 timelockinit) externalThis function initializes a new DAO for an NFT. It takes the address of the GovernorAlphaFactory and the TimelockFactory and the times for the voting period and also the timelock period.
After the function is run, a new DAO is fully functional and ready to use.
_burn
_burnfunction _burn(uint256 amount) internalInternal function to burn amount x from the total supply.
burnForETH
burnForETHfunction burnForETH() externalThis function can be called from each holder of the DAO token. If the Alchemy contract has an ETH balance the burner will get an adequate amount of ETH from the balancer and burns their DAO tokens for this event.
Buyshares
BuysharesThis function allows anyone to buy shares from the DAO contract. These shares have to be issued from the DAO before.
buyout
buyoutThis function can be called by anyone by sending the buyout price in terms of ETH to the contract function. This will trigger the buyout process and burn the shares of the buyer if he has some.
The buyout price will also decrease if the buyer is a shareholder of the DAO, and so he will get a discount.
Finally, all the NFTs in the DAO will be transferred to the buyer.
Also, a 0.5% fee from the buyout price is then sent from the Alchemy Contract to the Alchemy Router and split amongst the treasury and the Staking Pool.
burnSharesForSale
burnSharesForSaleThis function will decrease the number of shares for sale in the DAO. Can only be called by the Timelock.
mintSharesForSale
mintSharesForSaleThis function will increase the number of shares for sale in the DAO. Can only be called by the Timelock.
changeBuyoutPrice
changeBuyoutPriceThis function will change the buyout price for the DAO. Can only be called by the Timelock.
setNftSale
setNftSaleThis function will set a specific NFT in the DAO on sale, so it can be bought separately. Can only be called by the Timelock.
buySingleNft
buySingleNftThis function is used to buy a single NFT from the DAO. The NFT must have been set on sale before.
After the sale, the NFT is then transferred from the contract to the buyer and a 0.5% fee of the price is sent to the Alchemy Router.
addNft
addNftThis function adds a specific NFT to the DAOs NFT treasury array. Can only be called by the Timelock.
returnNft
returnNftThis function returns the original NFT to the owner. Can only be called by the Timelock.
executeTransaction
executeTransactionThis function can execute any contract call. Can only be called by the Timelock.
getCurrentVotes
getCurrentVotesThis function is used to get the current votes of an address based on the timestamp.
delegate
delegateThis function is used to delegate votingpower to an address.
getPriorVotes
getPriorVotesThis function is used to determine the prior votes of an address.
_delegate
_delegateInternal function to set the delegatee.
_moveDelegates
_moveDelegatesInternal function to move delegate votes to another address.
_writeCheckpoint
_writeCheckpointInternal function to write a snapshot of current votes for later processing.
distributeAlc
distributeAlcA function used to distribute the ALCH token amongst the community → people who mint an Alchemy contract.
NFTDAOMint
NFTDAOMintMinting function for a new Alchemy contract.
newFactoryOwner
newFactoryOwnerA function used to change the factory owner of the AlchemyFactory.
getFactoryOwner
getFactoryOwnerView function to get the current owner of the AlchemyFactory.
Last updated
Was this helpful?