AlchemyFactory
This contract creates new Alchemy Contracts which wrap NFT tokens into ERC20 tokens in order to create a DAO around them.
init
init
This 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
_burn
Internal function to burn amount x from the total supply.
burnForETH
burnForETH
This 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
Buyshares
This function allows anyone to buy shares from the DAO contract. These shares have to be issued from the DAO before.
buyout
buyout
This 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
burnSharesForSale
This function will decrease the number of shares for sale in the DAO. Can only be called by the Timelock.
mintSharesForSale
mintSharesForSale
This function will increase the number of shares for sale in the DAO. Can only be called by the Timelock.
changeBuyoutPrice
changeBuyoutPrice
This function will change the buyout price for the DAO. Can only be called by the Timelock.
setNftSale
setNftSale
This 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
buySingleNft
This 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
addNft
This function adds a specific NFT to the DAOs NFT treasury array. Can only be called by the Timelock.
returnNft
returnNft
This function returns the original NFT to the owner. Can only be called by the Timelock.
executeTransaction
executeTransaction
This function can execute any contract call. Can only be called by the Timelock.
getCurrentVotes
getCurrentVotes
This function is used to get the current votes of an address based on the timestamp.
delegate
delegate
This function is used to delegate votingpower to an address.
getPriorVotes
getPriorVotes
This function is used to determine the prior votes of an address.
_delegate
_delegate
Internal function to set the delegatee.
_moveDelegates
_moveDelegates
Internal function to move delegate votes to another address.
_writeCheckpoint
_writeCheckpoint
Internal function to write a snapshot of current votes for later processing.
distributeAlc
distributeAlc
A function used to distribute the ALCH token amongst the community → people who mint an Alchemy contract.
NFTDAOMint
NFTDAOMint
Minting function for a new Alchemy contract.
newFactoryOwner
newFactoryOwner
A function used to change the factory owner of the AlchemyFactory.
getFactoryOwner
getFactoryOwner
View function to get the current owner of the AlchemyFactory.
Last updated