πŸ“”DAO4ART Contract

Contract Architecture Overview

D4A is a decentralized autonomous organization (DAO) platform that enables the creation of art projects through smart contracts. Under this contract architecture, the user interacts with the D4ACreateProjectProxy contract to create the DAO, which calls the createProjectProxy method of the D4AProtocol contract. The D4AProtocol contract is linked to three external libraries (D4APrice, D4ACanvas, and D4AProject) to make specific calls, and the D4AReward contract is internally linked to the D4AProtocol contract. The D4ADRB contract controls the token rewards based on block time and is located at the lowest level. Other user actions, such as creating a canvas, casting NFTs, and receiving token rewards, directly interact with the D4AProtocol and D4AClaimer contracts. The setting contract controls important parameters such as the royalty fee ratio, the maximum supply of ERC20 tokens, and the floor price of ERC721 tokens. The main contracts that users interact with in D4A are the D4ACreateProjectProxy, D4AProtocol, and D4AClaimer contracts.

D4A Smart Contract Details

D4ACreateProjectProxy Contract

Users can create a DAO by calling the createProject method of the D4ACreateProjectProxy contract. Within the DAO, the corresponding an ERC20 contract, an ERC721 contract, a asset fee pool contract and a royalty auto-splitting contract will also be created. The D4A offcial is able to create a DAO with a specific index number by calling the createOwnerProject method.

D4AProtocol Contract

The user can create a "Canvas" under a selected DAO by calling the createCanvas method. Once the canvas creator uploads an unminted work, the user can call the mintNFT method to mint the work.

D4AClaimer Contract

After the user selects some projects and canvases of which he’s eligible to receive rewards, the front-end will set the parameters and call the claimMultiReward method to receive the corresponding ERC20 reward. The user can also choose to receive the rewards and exchanging them for ETH in one transaction by calling the claimMultiRewardWithETH method.

D4AFeePool Contract

The DAO creator will create a D4AFeePool subordinate contract during the creation of the DAO. All royalty shares will be transferred to this contract, and the transfer method can be used to specify the address of the ERC20 token. If the ERC20 address is set to the zero address (0x0), ETH will be transferred instead.

Addresses (Ethereum Mainnet)

Last updated