Request form
Cookbook may introduce a token in the future. Share and contribute to be eligible for future airdrops.
close icon
relevant tag icon
Data DAO Example
copy icon
Rishikesh-Kale
• version 1.0.0
FEVM
DAO

Data DAO Example

A simple DataDAOExample contract allows the admins to act as the censor board for the data that is stored via the Data DAO. The users with the Data DAO membership NFT can join the Data DAO as a member and would be able to create proposal to store their data.

*Visit desktop site to download or deploy

Version

1.0.0

Recent Use

🍞 0x6f3a deployed

Last Publish

3/18/2023
Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Documentation
Source Code
activateDataSetDealBySP(uint64) :
Activates the deal - _networkDealID: : Deal ID generated after the deal is created on Filecoin Network
approveOrRejectDataSet(bytes,uint8) :
Approves or Rejects the proposal - This would enable to govern the data that is stored by the DAO - _choice: : decision of the DAO on the proposal - _cidraw: : Id of the cred.
createDataSetDealProposal(bytes,uint256,uint256,uint256) :
Creates a new deal proposal. - _cidraw: : cid for which the deal proposal is to be created. - _dealDurationInDays: : deal duration in Days - _size: : size of cid
getDealState(bytes) :
Returns current state of the deal - _cidraw: : Id of the cred.
getRoleAdmin(bytes32) :
Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
grantRole(bytes32,address) :
Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.
hasRole(bytes32,address) :
Returns `true` if `account` has been granted `role`.
joinDAO() :
Function to allow members with membership NFT to join the DAO
renounceRole(bytes32,address) :
Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.
revokeRole(bytes32,address) :
Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.
supportsInterface(bytes4) :
See {IERC165-supportsInterface}.
withdrawReward(bytes) :
Once the deal is expired the SP can withdraw the rewards - _cidraw: : Id of the cred.

Get Cookin'
share iconShare

copy iconNo-Code Deploy
copy iconDownload Source
copy iconnpx cookbookdev i Data-DAO-Example
copy icon

Bytecode

Download

Verification

Download

Recent Use

🍞 0x6f3a deployed

Last Publish

3/18/2023

Solidity Compiler

v0.8.13+commit.abaa5c0e

Version

1.0.0

Cookbook is free.
Any contract you deploy is yours.
Your contract is owned and controlled by you.