Minting a smart common means that developers accept governance based on consensus Proof-of-Value, moving away from capitalist modes of production. The focus here is:
- Signing a license to contribute your work as a smart common, which is a kind of public good for humanity.
- Reap the rewards of a decentralized valuation market in Proof-of-Value 1.0.
Smart Commons
Smart Commons refers to smart creative commons (including dApp/dAIpps, AIs, games, EIPs, papers, technical standards, etc.) published under the SCC0 license, possessing their own valuation tokens, and enabling developers to receive awards based on consensus Proof-of-Value (PoV).
The menu "Smart Commons" provides a way for developers to mint their smart commons, and to manage the versions of their smart commons and the awards they've received.
{
{
string name; // Smart Common name, unique, cannot have the same name as other Smart Commons.
string symbol; // Smart Common token name, unique, cannot have the same name as other Smart Common tokens.
string desc; // Smart Common description.
address manager; // Smart Common's manager.
uint16 version; // Smart Common's version number, starting from 1.
string SC_Type // Type of Smart Common.
},
address[] calldata _members, // List of members.
uint16[] calldata _dividendRights, // Member voting rights (dividend rights), corresponding one-to-one with _members.
uint16 _strategy, // Proposal voting pass rate. One hundred percent (unanimous) is 2 to the power of 16 minus 1 (65535), can be changed by proposals.
uint32 _lifetime, // Proposal lifespan, in seconds, starting from proposal creation, invalidated if not completed within this time.
uint32 _coolingPeriod // Proposal cooling period, in seconds, starting from proposal creation, no new proposals can be created until this period has passed. Note: Cooling period must be greater than the lifetime.
{
string filetype // File extension for the logo, must be svg.
string fileContent // Pure text content of the svg.
}
}
- For non-dApp/dAIpp types of Smart Commons, pay attention to the exclusive naming method of the valuation token when minting. Relevant content (section "Naming Valuation Tokens") is at the bottom of this article.
Minting a Smart Common on DAism
- Only the owner of the smart contract can mint a Smart Common, please deploy an ownable smart contract on Ethereum Mainnet first.
- Each contract address could create only one Smart Common.
- When minting a Smart Common, you can also mint any set of Honor Tokens (a type of NFT commemorating the birth of your Smart Common). The number can be N times the number of dividend members of your smart common. Ensure that your smart contract has the necessary interface calling codes in advance.
- Non-dApp/dAIpp smart commons don't need to deploy their own contracts. After clicking the button "Mint Smart commons" on this webpage, just fill out the form as required. The following two articles provide more specific operational details:
Apply Proof-of-Value to all open-source software
Applying PoV Value Proof to EIPs, AI Fields or anything else - Due to the high cost of Ethereum gas, it is recommended that the logo is a SVG vector graphic below 2K.
Smart Contract Example
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract ThreeDapp {
address public owner;
constructor(){
owner = tx.origin;
}
function ownerOf() public view returns(address){
return owner;
}
}
Example of Deploying and Minting a Smart Common with Hardhat
const fs = require('fs')
const {ethers} = require('hardhat')
// You can create a smart common by using the following script.
async function main() {
await hre.run('compile');
const[owner] = await ethers.getSigners();
// The following script is an example to mint a smart common with a dApp/dAIpp.
// The name of your dApp/dAIpp's contract, use this name to load and deploy your dApp/dAIpp.
const contractName = 'ThreeDapp';
// The contract address for smart commons' registration. You need to call this address to register when minting a smart common.
const daismRegistrar_ = '0x3Bf70f9BfCfF20a90f0F36bAAF0d5afc3Ee232b7';
// The contract address of Honor Token. You need to call it when minting a Honor Token alongside minting a smart common.
const daismHonorTokens_ = '0xC473f79875F202D15b128f2a40dff7e35B972Fc4';
// Load and deploy your dapp by using the name of your dapp contract.
const dappContract = await daism_deploy(owner, contractName, [])
// Below is the ABI for the registration of your smart common. This script needs to call this registration method to mint your smart common.
let registerAbi = [{
"inputs": [{
"components": [{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
"name": "symbol",
"type": "string"
},
{
"internalType": "string",
"name": "desc",
"type": "string"
},
{
"internalType": "address",
"name": "manager",
"type": "address"
},
{
"internalType": "uint16",
"name": "version",
"type": "uint16"
},
{
"internalType": "string",
"name": "SCType",
"type": "string"
}],
"internalType": "struct SCInfo",
"name": "_SCInfo",
"type": "tuple"
},
{
"internalType": "address[]",
"name": "_members",
"type": "address[]"
},
{
"internalType": "uint16[]",
"name": "_dividendRights",
"type": "uint16[]"
},
{
"internalType": "uint16",
"name": "_strategy",
"type": "uint16"
},
{
"internalType": "uint32",
"name": "_lifetime",
"type": "uint32"
},
{
"internalType": "uint32",
"name": "_coolingPeriod",
"type": "uint32"
},
{
"components": [{
"internalType": "string",
"name": "fileType",
"type": "string"
},
{
"internalType": "string",
"name": "fileContent",
"type": "string"
}],
"internalType": "struct File",
"name": "_logo",
"type": "tuple"
},
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
}],
"name": "createSC",
"outputs": [{
"internalType": "uint256",
"name": "",
"type": "uint256"
}],
"stateMutability": "nonpayable",
"type": "function"
}]
//Load DAism's registration contract
const registerContract = new ethers.Contract(daismRegistrar_, registerAbi, owner)
// Parameters for minting a smart common (see the structural description above for parameter details). Note: your smart common's name and it's token name must not be the same.
let SCinfo = ["scname5", "scsymbol5", "scdesc5", await dappContract.getAddress(), 1, 'dapp']
// Mint a dApp/dAIpp type smart public asset.
let res = await registerContract.createSC(
SCinfo,
[owner.address], // member list
[10], // member voting rights (dividend rights), cannot be 1,2,3,4 because these four numbers have special uses.
(2 ** 16-1).toString(), // approval rate of proposal voting, percentage (full vote).
7 * 24 * 3600, // Lifetime is 7 days.
9 * 24 * 3600, // Cooldown period is 9 days.
[ 'svg', 'code of your svg'],
'0x' //0x indicates that no honor token will be minted.
)
console.log('createSC hash: ' + res.hash)
await res.wait()
console.log("createSC succeeded")
// The following is an example to mint an EIP-type smart common, along with minting a honor token.
let mintNum = 1 //Number of Honor Token's sets.
let abicoder = new ethers.AbiCoder()
//Package the owner list and number of honor token's sets.
let functionData = abicoder.encode(['address[]', 'uint256'], [[owner.address], mintNum])
//Package the honor token contract's address and parameters
let paras = abicoder.encode(["address", "bytes"], [daismHonorTokens_, functionData]);
//Parameters for minting a smart common (see the structural description above), note: name of your smart common and token name must not be the same.
SCinfo = ["scname6", "scsymbol6", "scdesc6", await dappContract.getAddress(), 1, 'EIP']
// Mint an EIP type smart common.
res = await registerContract.createSC(
SCinfo,
[owner.address], // member list
[10], // member voting rights (dividend rights), cannot be 1,2,3,4 because these four numbers have special uses.
(2 * *16 - 1).toString(), // approval rate of proposal voting, percentage (full vote).
7 * 24 * 3600, // Lifetime is 7 days.
9 * 24 * 3600, // Cooldown period is 9 days.
[ 'svg', 'code of your svg'],
paras)
console.log('createSC hash: ' + res.hash)
await res.wait()
console.log("createSC success")
console.log("--------------END--------------")
}
// Method to deploy the contract
async function daism_deploy(signer, contractName, paras = []) {
const factory = await ethers.getContractFactory(contractName, signer)
const product = await factory.deploy.apply(factory, paras)
await product.waitForDeployment()
const contract_address = await product.getAddress()
console.log('Deploy: ' + contractName + ' : ' + contract_address)
return await ethers.getContractAt(contractName, contract_address, signer)
}
main().then(() = >process.exit(0)).
catch((error) = >{
console.error(error);
process.exit(1);
});
Example of Minting a Smart Common on DAism's Webpage
First, deploy an ownable dApp/dAIpp capable of calling the mint Smart Common contract. Obtain the deployment address of this dApp/dAIpp.
Fill in the corresponding information on the webpage and mint, as shown in the image below:
Naming Valuation Tokens
We refer to common methods in operating systems Unix and Windows (Naming Files, Paths, and Namespaces), namely:
- The classification of Smart Commons is reflected in the directory name of the valuation token.
- The naming of the valuation token refers to the method in computer operating systems, which is divided into two parts by ".":
- The naming convention for valuation tokens is "name.extension". For example: UL.eip (indicating that its smart common is an EIP). Or: Aloha.ai (indicating that it is an AI project 😂). It is recommended that the extension be in lowercase to make the preceding name stand out. Anyone can set their smart common's extension arbitrarily—this is a decentralized naming standard. Of course, if someone else has already made a flawless naming in a particular category, it is hoped that subsequent developers will follow suit.
- To facilitate identification, the front end will display the name before the "." in the case you entered. The extension afterward will be in all lowercase. Please note that the name before the "." cannot be duplicated, regardless of case variations.
- The extension cannot be empty.
- Extensions can only be added, not deleted.
- Modifying the extension may actually involve adding a new one or selecting another existing extension.
- Whoever advocates for modification, whoever migrates—if a developer of a smart common decides to modify the extension name of its valuation token, it actually means he has added a new extension name or migrated to another existing extension name, and then his smart common is classified into a new category. However, the original extension name is not deleted. In this way, other smart commons that actively joined the original category (original extension name) remain completely unaffected.
- The adjustment of the extension name needs to be voted on through a proposal.
- (Frontend) Existing extensions automatically become optional when the user fills in. Once selected, a description of that extension will appear. This helps avoid the use of the same extension name across different categories.
- (Frontend) The naming of extensions is decentralized and unrestricted. However, considering that easier-to-remember names are better, users are still advised to use simple and easy-to-remember names, preferably using English letters and numbers to name valuation tokens. Generally, including special characters in file names is not recommended.