从Dao聊到Aragon
前言
之前兩篇(淺談區(qū)塊鏈DAPP學(xué)習(xí)?和 淺談區(qū)塊鏈DAPP學(xué)習(xí)·續(xù)),我們聊了DAPP以及DAPP的一個(gè)簡(jiǎn)單的投票實(shí)現(xiàn),可能還是有很多非技術(shù)類的朋友,他們不理解web3.0這樣一種可以擁有的網(wǎng)絡(luò)到底有什么用。
這一篇我準(zhǔn)備拿現(xiàn)在國(guó)外這幾年比較流行DAO聊一下web3.0的未來(lái)應(yīng)用。
首先什么是DAO
DAO是 Decentralized Autonomous Organization 的簡(jiǎn)寫(xiě),即去中心化自治組織,有時(shí)也被稱為分布式自治公司(DAC);有共同的目標(biāo)或是共識(shí),有明確的核心價(jià)值觀。它的民主化的投票機(jī)制,決定了組織的方向和運(yùn)作方式。
DAO的意義
首先DAO是用智能合約和開(kāi)源編碼的。該組織所做的是完全透明的。決策是通過(guò)DAO成員的基層投票做出的。在這樣一種公開(kāi)公平的區(qū)塊鏈技術(shù)加持下,我們可以在互聯(lián)網(wǎng)上成立各種不需要見(jiàn)面但可以為一個(gè)共同目標(biāo)而努力的組織。
很魔幻,但在當(dāng)下疫情肆虐的情況下卻有著他生長(zhǎng)的基礎(chǔ),元宇宙大概率會(huì)在DAO的基礎(chǔ)上結(jié)合其他技術(shù)慢慢成長(zhǎng)或是快速成長(zhǎng)。
DAO的項(xiàng)目
理論上,任何組織都可以是DAO。投資DAO和贈(zèng)款DAO可以資助項(xiàng)目。收藏家DAO可以收集NFT數(shù)字藝術(shù)和其他收藏品。社交DAO可以為其成員提供一定的社交圈。
DAO Operation Systems
作為技術(shù)我不像做預(yù)言家,我還是切入我文章的主題,去介紹DAO的技術(shù)(DAO Operation Systems),相關(guān)的技術(shù)蠻多的。
好在區(qū)塊鏈要用智能合約管理加密貨幣,所以你要通過(guò)合約審核必須開(kāi)源,我們能找到很多國(guó)外關(guān)于DAO的技術(shù),今天我就來(lái)介紹一下ARAGON這個(gè)項(xiàng)目。
什么是ARAGON
Aragon使用區(qū)塊鏈來(lái)提高公司和組織的效率和透明度。公司可以使用Aragon彼此簽署智能合約協(xié)議,然后可以將它們安全地存儲(chǔ)在區(qū)塊鏈上,以供任何一方在需要時(shí)訪問(wèn)。
Aragon喜歡視自己為數(shù)字司法管轄區(qū)。該網(wǎng)絡(luò)正在創(chuàng)建一個(gè)去中心化的結(jié)算系統(tǒng),該系統(tǒng)可用于在相關(guān)各方之間快速有效地進(jìn)行仲裁。該平臺(tái)具有自己的Token 令牌 Aragon Network Token - 簡(jiǎn)稱“ANT” - 用于支付費(fèi)用,并托管在第三方中以提供激勵(lì)給良好誠(chéng)實(shí)的用戶行為。
如何開(kāi)始一個(gè)ARAGON
首先https://aragon.org/是他的官網(wǎng),你可以上官網(wǎng)創(chuàng)建自己的DAO組織我們當(dāng)然不會(huì)只使用他們官網(wǎng)來(lái)建立自己的DAO;使用他的技術(shù)架構(gòu)才是我們的目的。
快速搭建ARAGON DAO本地架構(gòu)
首先來(lái)到ARAGON GITHUB
https://github.com/aragon/找到aragon-cli項(xiàng)目
https://github.com/aragon/aragon-cli首先全局安裝aragon/cli
npm install --global @aragon/cli npm install --global @aragon/cli@nightly創(chuàng)建你第一個(gè)ARAGON DAO項(xiàng)目
npx create-aragon-app myapp cd myapp npm start項(xiàng)目打開(kāi)后會(huì)用默認(rèn)瀏覽器打開(kāi) http://localhost:3000/可以看到啟動(dòng)了一個(gè)ganache初始化了8個(gè)賬號(hào);以及ENS,DAO APM等的address;簡(jiǎn)單的說(shuō)他初始化了一個(gè)aragon的本地環(huán)境。從右上角看默認(rèn)鏈接了本地ganache的錢(qián)包,同時(shí)已經(jīng)顯示了本地錢(qián)包的地址。
代碼分析
看了以后大家會(huì)發(fā)現(xiàn)和我們以前的結(jié)構(gòu)很類似contracts下有個(gè)CounterApp.sol合約
pragma solidity ^0.4.24;import "@aragon/os/contracts/apps/AragonApp.sol"; import "@aragon/os/contracts/lib/math/SafeMath.sol";contract CounterApp is AragonApp {using SafeMath for uint256;/// Eventsevent Increment(address indexed entity, uint256 step);event Decrement(address indexed entity, uint256 step);/// Stateuint256 public value;/// ACLbytes32 constant public INCREMENT_ROLE = keccak256("INCREMENT_ROLE");bytes32 constant public DECREMENT_ROLE = keccak256("DECREMENT_ROLE");function initialize(uint256 _initValue) public onlyInit {value = _initValue;initialized();}/*** @notice Increment the counter by `step`* @param step Amount to increment by*/function increment(uint256 step) external auth(INCREMENT_ROLE) {value = value.add(step);emit Increment(msg.sender, step);}/*** @notice Decrement the counter by `step`* @param step Amount to decrement by*/function decrement(uint256 step) external auth(DECREMENT_ROLE) {value = value.sub(step);emit Decrement(msg.sender, step);} }這個(gè)就是一個(gè)計(jì)數(shù)合約加減兩個(gè)功能,其實(shí)和原來(lái)投票幾乎一樣,少了個(gè)身份認(rèn)證,可以從上一篇加進(jìn)來(lái)相關(guān)代碼來(lái)不足。
scripts目錄下 buidler-hooks.js 這些鉤子由 Aragon Buidler 插件在start任務(wù)的生命周期中調(diào)用的,結(jié)合buidler配置文件(buidler.config.js)部署和掛鉤合約。
const { usePlugin } = require('@nomiclabs/buidler/config') const hooks = require('./scripts/buidler-hooks')usePlugin('@aragon/buidler-aragon')module.exports = {// Default Buidler configurations. Read more about it at https://buidler.dev/config/defaultNetwork: 'localhost',networks: {localhost: {url: 'http://localhost:8545',},},solc: {version: '0.4.24',optimizer: {enabled: true,runs: 10000,},},// Etherscan plugin configuration. Learn more at https://github.com/nomiclabs/buidler/tree/master/packages/buidler-etherscanetherscan: {apiKey: '', // API Key for smart contract verification. Get yours at https://etherscan.io/apis},// Aragon plugin configurationaragon: {appServePort: 8001,clientServePort: 3000,appSrcPath: 'app/',appBuildOutputPath: 'dist/',appName: 'myapp',hooks, // Path to script hooks}, }buidler.config.js代碼可見(jiàn)默認(rèn)是鏈接本地localhost的ganache 并部署相關(guān)合約。
src目錄下的App.js
import { useAragonApi } from '@aragon/api-react'const { api, appState, path, requestPath } = useAragonApi() const { count, isSyncing } = appState很清楚是通過(guò) useAragonApi 去獲得 api 方法和 appState 的 count 值的 附上 app.js 源碼
import React from 'react' import { useAragonApi } from '@aragon/api-react' import {Box,Button,GU,Header,IconMinus,IconPlus,Main,SyncIndicator,Tabs,Text,textStyle, } from '@aragon/ui' import styled from 'styled-components'function App() {const { api, appState, path, requestPath } = useAragonApi()const { count, isSyncing } = appStateconst pathParts = path.match(/^\/tab\/([0-9]+)/)const pageIndex = Array.isArray(pathParts)? parseInt(pathParts[1], 10) - 1: 0return (<Main>{isSyncing && <SyncIndicator />}<Headerprimary="Counter"secondary={<spancss={`${textStyle('title2')}`}>{count}</span>}/><Tabsitems={['Tab 1', 'Tab 2']}selected={pageIndex}onChange={index => requestPath(`/tab/${index + 1}`)}/><Boxcss={`display: flex;align-items: center;justify-content: center;text-align: center;height: ${50 * GU}px;${textStyle('title3')};`}>Count: {count}<Buttons><Buttondisplay="icon"icon={<IconMinus />}label="Decrement"onClick={() => api.decrement(1).toPromise()}/><Buttondisplay="icon"icon={<IconPlus />}label="Increment"onClick={() => api.increment(1).toPromise()}css={`margin-left: ${2 * GU}px;`}/></Buttons></Box></Main>) }const Buttons = styled.div`display: grid;grid-auto-flow: column;grid-gap: 40px;margin-top: 20px; `export default Appapi.decrement(1).toPromise() api.increment(1).toPromise() 兩個(gè)方法調(diào)用加減來(lái)實(shí)現(xiàn)合約接口的,點(diǎn)擊加號(hào)或減號(hào)功能就這么簡(jiǎn)單的完成了,用它改建一個(gè)投票是非常簡(jiǎn)單的。
部署aragon
除了這樣一步步,能快速部署aragon的功能官網(wǎng)部分功能嗎?可以
mkdir aragon npm init npm install @aragon/aragen npx aragen start可以看到初始化了一個(gè)aragon的ganache環(huán)境。
其中就包括了:ENS instance deployed at: 0x5f6f7e8cc7346a11ca2def8f827b7a0b612c56a1(use-token:用于獲取以太坊上代幣相關(guān)信息的 React 實(shí)用程序,包括相關(guān)合約)。
啟動(dòng)client項(xiàng)目
首先來(lái)到ARAGON GITHUB找到Aragon Client
https://github.com/aragon/client下載項(xiàng)目進(jìn)入項(xiàng)目根目錄
yarn npm run start:local服務(wù)啟動(dòng)在:http://localhost:3000 在項(xiàng)目根目錄下有個(gè)arapp.json里面的內(nèi)容默認(rèn)的是rpc網(wǎng)絡(luò)也就是本地網(wǎng)絡(luò)localhost:8545
"environments": {"default": {"registry": "0x5f6f7e8cc7346a11ca2def8f827b7a0b612c56a1","appName": "aragon.aragonpm.eth","network": "rpc"},他的registry address和aragon啟動(dòng)的網(wǎng)絡(luò)是一樣的
現(xiàn)在打開(kāi)http://localhost:3000
改造錢(qián)包
右上角你會(huì)發(fā)現(xiàn)錢(qián)包無(wú)法連接本地鏈; 看來(lái)我們要改造他們項(xiàng)目的錢(qián)包了。 廢話少說(shuō),在項(xiàng)目src/contexts/目錄下有一個(gè)wellet.js附上代碼
import React, {useContext,useEffect,useMemo,useCallback,useState, } from 'react' import PropTypes from 'prop-types' import BN from 'bn.js' import {useWallet as useWalletBase,UseWalletProvider,ChainUnsupportedError,chains, } from 'use-wallet' import { getWeb3, filterBalanceValue } from '../util/web3' import { useWalletConnectors } from '../ethereum-providers/connectors' import { useAPM, updateAPMContext } from './elasticAPM' import { LocalStorageWrapper } from '../local-storage-wrapper'export const WALLET_STATUS = Object.freeze({providers: 'providers',connecting: 'connecting',connected: 'connected',disconnected: 'disconnected',error: 'error', })// default network is mainnet if user is not connected const NETWORK_TYPE_DEFAULT = chains.getChainInformation(1)?.typeconst WalletContext = React.createContext()function WalletContextProvider({ children }) {const {account,balance,ethereum,connector,status,chainId,providerInfo,type,networkName,...walletBaseRest} = useWalletBase()const initialNetwork = useMemo(() => {const lastNetwork = LocalStorageWrapper.get('last-network', false)if (!lastNetwork) return NETWORK_TYPE_DEFAULTreturn lastNetwork}, [])const [walletWeb3, setWalletWeb3] = useState(null)const [disconnectedNetworkType, setDisconnectedNetworkType] = useState(initialNetwork)const connected = useMemo(() => status === 'connected', [status])const networkType = useMemo(() => {const newNetwork = connected ? networkName : disconnectedNetworkTypeLocalStorageWrapper.set('last-network', newNetwork, false)return newNetwork}, [connected, networkName, disconnectedNetworkType])const changeNetworkTypeDisconnected = useCallback(newNetworkType => {if (status === 'disconnected') {setDisconnectedNetworkType(newNetworkType)}},[status])// get web3 and set local storage prefix whenever networkType changesuseEffect(() => {let cancel = falseif (!ethereum) {return}const walletWeb3 = getWeb3(ethereum)if (!cancel) {setWalletWeb3(walletWeb3)}return () => {cancel = truesetWalletWeb3(null)}}, [ethereum, networkType])const wallet = useMemo(() => ({account,balance: new BN(filterBalanceValue(balance)),ethereum,networkType,providerInfo: providerInfo,web3: walletWeb3,status,chainId: connected ? chainId : 1, // connect to mainnet if wallet is not connectedconnected,changeNetworkTypeDisconnected,...walletBaseRest,}),[account,balance,ethereum,networkType,providerInfo,status,chainId,walletBaseRest,walletWeb3,connected,changeNetworkTypeDisconnected,])const { apm } = useAPM()useEffect(() => {updateAPMContext(apm, wallet.networkType)}, [apm, wallet.networkType])return (<WalletContext.Provider value={wallet}>{children}</WalletContext.Provider>) } WalletContextProvider.propTypes = { children: PropTypes.node }export function WalletProvider({ children }) {return (<UseWalletProvider connectors={useWalletConnectors} autoConnect><WalletContextProvider>{children}</WalletContextProvider></UseWalletProvider>) } WalletProvider.propTypes = { children: PropTypes.node }export function useWallet() {return useContext(WalletContext) }export { ChainUnsupportedError }連接本地錢(qián)包
經(jīng)過(guò)一番仔細(xì)的閱讀發(fā)覺(jué)錢(qián)包掉用的是'use-wallet',而且判斷是否可以鏈接的代碼在被調(diào)用的modules里,只有改了它才能本地部署aragon的本地client;use-wallet的源碼地址
文件位置src/connectors/ConnectorInjected.ts
#添加的代碼就這一段;這個(gè)就是添加錢(qián)包可以鏈接的本地chainId chainId.push(1337)配置本地EDC鏈
文件地址src/chains.ts,添加以下代碼:
const EDC: Currency = {name: 'Ether',symbol: 'ETH',decimals: 18, } .....................[1337,{id: 1337,nativeCurrency: EDC,fullName: 'EDC',shortName: 'EDC',type: 'local',testnet: true,},],附上完整代碼
import { ChainUnknownError } from './errors' import { ChainInformation, ChainType, Currency } from './types'const ETH: Currency = {name: 'Ether',symbol: 'ETH',decimals: 18, }const MATIC: Currency = {name: 'Matic Token',symbol: 'MATIC',decimals: 18, }const AVAX: Currency = {name: 'Avax',symbol: 'AVAX',decimals: 9, }const ONE: Currency = {name: 'ONE Token',symbol: 'ONE',decimals: 18, }const XDAI: Currency = {name: 'xDAI',symbol: 'xDAI',decimals: 18, }const BNB: Currency = {name: 'Binance Token',symbol: 'BNB',decimals: 18, }const TT: Currency = {name: 'Thunder Token',symbol: 'TT',decimals: 18, }const CELO: Currency = {name: 'Celo',symbol: 'CELO',decimals: 18, }const METIS: Currency = {name: 'METIS',symbol: 'METIS',decimals: 18, }const FTM: Currency = {name: 'FTM',symbol: 'FTM',decimals: 18, }const DEV: Currency = {name: 'DEV',symbol: 'DEV',decimals: 18, } const MOVR: Currency = {name: 'Moonriver',symbol: 'MOVR',decimals: 18, } const GLMR: Currency = {name: 'Glimmer',symbol: 'GLMR',decimals: 18, } const EDC: Currency = {name: 'Ether',symbol: 'ETH',decimals: 18, } const CHAIN_INFORMATION = new Map<number, ChainInformation | ChainType>([[1,{id: 1,nativeCurrency: ETH,type: 'main',fullName: 'Ethereum Mainnet',shortName: 'Ethereum',explorerUrl: `https://etherscan.io`,testnet: false,},],[3,{id: 3,nativeCurrency: ETH,type: 'ropsten',fullName: 'Ropsten Testnet',shortName: 'Ropsten',explorerUrl: `https://ropsten.etherscan.io`,testnet: true,},],[4,{id: 4,nativeCurrency: ETH,type: 'rinkeby',fullName: 'Rinkeby Testnet',shortName: 'Rinkeby',explorerUrl: `https://rinkeby.etherscan.io`,testnet: true,},],[5,{id: 5,nativeCurrency: ETH,type: 'goerli',fullName: 'Goerli Testnet',shortName: 'Goerli',explorerUrl: `https://goerli.etherscan.io`,testnet: true,},],[42,{id: 42,nativeCurrency: ETH,type: 'kovan',fullName: 'Kovan Testnet',shortName: 'Kovan',explorerUrl: `https://kovan.etherscan.io`,testnet: true,},],[43112,{id: 43112,nativeCurrency: AVAX,type: 'avalocal',shortName: 'Avalanche Local',fullName: 'Avalanche Local',testnet: true,},],[43113,{id: 43113,nativeCurrency: AVAX,type: 'fuji',fullName: 'Avalanche Fuji',shortName: 'Fuji',explorerUrl: 'https://testnet.snowtrace.io/',testnet: true,},],[43114,{id: 43114,nativeCurrency: AVAX,type: 'avalanche',fullName: 'Avalanche Mainnet',shortName: 'Avalanche',explorerUrl: 'https://snowtrace.io/',testnet: false,},],[100,{id: 100,nativeCurrency: XDAI,type: 'xdai',fullName: 'xDAI',shortName: 'xDAI',explorerUrl: 'https://blockscout.com/xdai/mainnet/',testnet: false,},],[137,{id: 137,nativeCurrency: MATIC,type: 'matic',fullName: 'Polygon Mainnet',shortName: 'Polygon',explorerUrl: `https://polygonscan.com`,testnet: false,},],[80001,{id: 80001,nativeCurrency: MATIC,type: 'mumbai',fullName: 'Mumbai Testnet',shortName: 'Mumbai',explorerUrl: `https://mumbai.polygonscan.com`,testnet: true,},],[250,{id: 250,nativeCurrency: FTM,type: 'fantom',fullName: 'Fantom Opera Mainnet',shortName: 'FTM',explorerUrl: `https://ftmscan.com/`,testnet: false,},],[1666600000,{id: 1666600000,nativeCurrency: ONE,type: 'harmony',fullName: 'Harmony ONE',shortName: 'Harmony',explorerUrl: `https://explorer.harmony.one/`,testnet: false,},],[1666700000,{id: 1666700000,nativeCurrency: ONE,type: 'harmonyTest',fullName: 'Harmony ONE Testnet',shortName: 'Harmony Testnet',explorerUrl: `https://explorer.testnet.harmony.one/`,testnet: true,},],[56,{id: 56,nativeCurrency: BNB,type: 'bsc',fullName: 'Binance Smart Chain',shortName: 'BSC',explorerUrl: `https://bscscan.com/`,testnet: false,},],[97,{id: 97,nativeCurrency: BNB,type: 'bscTest',fullName: 'Binance Smart Chain Testnet',shortName: 'BSC Testnet',explorerUrl: `https://testnet.bscscan.com/`,testnet: true,},],[108,{id: 108,nativeCurrency: TT,type: 'thundercore',fullName: 'ThunderCore Mainnet',shortName: 'ThunderCore',explorerUrl: `https://scan.thundercore.com/`,testnet: false,},],[18,{id: 18,nativeCurrency: TT,type: 'thundercoreTest',fullName: 'ThunderCore Testnet',shortName: 'ThunderCore Testnet',explorerUrl: `https://scan-testnet.thundercore.com/`,testnet: true,},],[421611,{id: 421611,nativeCurrency: ETH,type: 'arbitrumTest',fullName: 'Arbitrum Testnet',shortName: 'Arbitrum Testnet',explorerUrl: 'https://testnet.arbiscan.io/',testnet: true,},],[42161,{id: 42161,nativeCurrency: ETH,type: 'arbitrum',fullName: 'Arbitrum Mainnet',shortName: 'Arbitrum',explorerUrl: 'https://arbiscan.io/',testnet: false,},],[42220,{id: 42220,nativeCurrency: CELO,type: 'celo',fullName: 'Celo (Mainnet)',shortName: 'Celo',explorerUrl: 'https://explorer.celo.org/',testnet: false,},],[44787,{id: 44787,nativeCurrency: CELO,type: 'celoTest',fullName: 'Celo (Alfajores Testnet)',shortName: 'Alfajores',explorerUrl: 'https://alfajores-blockscout.celo-testnet.org/',testnet: true,},],[588,{id: 588,nativeCurrency: METIS,type: 'stardust',fullName: 'Metis Stardust Testnet',shortName: 'Stardust',explorerUrl: 'https://stardust-explorer.metis.io/',testnet: true,},],[1088,{id: 1088,nativeCurrency: METIS,type: 'andromeda',fullName: 'Metis Andromeda',shortName: 'Andromeda',explorerUrl: 'https://andromeda-explorer.metis.io/',testnet: false,},],[1313161555,{id: 1313161555,nativeCurrency: ETH,type: 'aurora',fullName: 'Aurora Testnet',shortName: 'AuroraTest',explorerUrl: 'https://explorer.testnet.aurora.dev/',testnet: true,},],[1313161554,{id: 1313161554,nativeCurrency: ETH,type: 'aurora',fullName: 'Aurora Mainnet',shortName: 'Aurora',explorerUrl: 'https://explorer.mainnet.aurora.dev/',testnet: false,},],[1287,{id: 1287,nativeCurrency: DEV,type: 'moonbase',fullName: 'moonbase',shortName: 'Moonbase Alphanet',explorerUrl: 'https://moonbase.moonscan.io/',testnet: true,},],[1285,{id: 1285,nativeCurrency: MOVR,type: 'moonriver',fullName: 'Moonriver',shortName: 'Moonriver',explorerUrl: 'https://moonriver.moonscan.io/',testnet: false,},],[1284,{id: 1284,nativeCurrency: GLMR,type: 'moonbeam',fullName: 'Moonbeam',shortName: 'Moonbeam',explorerUrl: 'https://moonbeam.moonscan.io/',testnet: false,},],[1337,{id: 1337,nativeCurrency: EDC,fullName: 'EDC',shortName: 'EDC',type: 'local',testnet: true,},],[5777,{id: 5777,type: 'ganache',testnet: true,},], ])/*** This method checks whether a particular chain id is known.** @param {number} chainId chain id to check* @returns {boolean} true if chain is known*/ export function isKnownChain(chainId: number): boolean {return CHAIN_INFORMATION.has(chainId) }/**** @param {number} chainId chain id to retrieve information for* @throws {ChainUnknownError} if chain is unknown* @returns {boolean} information for specified chain*/ export function getChainInformation(chainId: number ): ChainInformation | ChainType {const chainInfo = CHAIN_INFORMATION.get(chainId)if (!chainInfo) throw new ChainUnknownError(`Unknown chain id: ${chainId}`)return chainInfo }/*** This is a getter method to returns the chain ids of all known chains.** @returns {number[]} array of chain Ids*/ export function getKnownChainsIds(): number[] {return Array.from(CHAIN_INFORMATION.keys()) }/*** This is a getter method to return all information available for each known chain.** @returns {ChainInformation | ChainType[]} An array containing information for* each known chain*/ export function getKnownChainInformation(): ChainInformation | ChainType[] {return Array.from(CHAIN_INFORMATION.values()) }export function getDefaultChainId(): number {return 1 }開(kāi)始編譯
yarn run buildbuild完成把dist目錄下的文件復(fù)制到client項(xiàng)目node_modules/use-wallet/dist/下
配置client項(xiàng)目
src/network-config.js把 isActive: false,改成isActive: true,
ensRegistry: localEnsRegistryAddress,要改成(ensRegistry: localEnsRegistryAddress||"0x5f6f7e8cc7346a11ca2def8f827b7a0b612c56a1")
運(yùn)行前端頁(yè)面
我們發(fā)現(xiàn)Testnets多了EDC,然后本地鏈的錢(qián)包鏈上了,可以盡情的玩他的功能不用膽心加密幣不夠了。
創(chuàng)建本地組織
下面演示本地創(chuàng)建一個(gè)組織的過(guò)程:
點(diǎn)擊 create
點(diǎn)擊membership
點(diǎn)擊 Use this template
點(diǎn)擊 next
點(diǎn)擊 next 輸入一個(gè)本地賬戶地址
繼續(xù) next
投票和轉(zhuǎn)賬功能
對(duì)的在這個(gè)組織里做什么都需要投票通過(guò)就算你轉(zhuǎn)賬也需要全員投票哦。
小結(jié)
以上只是簡(jiǎn)單介紹了aragon部署,我們剛才沒(méi)有用company原因我們沒(méi)有部署合約;
合約可以在dao-templates里下載部署有機(jī)會(huì)后面可以寫(xiě)一下;其實(shí)項(xiàng)目里的配置文件寫(xiě)的很清楚。
還有就是我們用的都是aragon默認(rèn)的ganache環(huán)境可以改嗎?也可以aragen下載源碼;
web3.0是python2的nodejs版本選擇很重要;
項(xiàng)目會(huì)自動(dòng)下載所有主要項(xiàng)目,其中幾個(gè)項(xiàng)目的環(huán)境有差異,但可以分塊切換環(huán)境部署,
還有就是ipfs其實(shí)很多圖片都存在ipfs里需要本地部署的通過(guò)aragon項(xiàng)目發(fā)布到ipfs本地服務(wù)上;
ipfs官網(wǎng)地址,
不多說(shuō)了,其實(shí)還有很多技術(shù)細(xì)節(jié)還沒(méi)寫(xiě)完,本人技術(shù)也有限,有什么錯(cuò)漏的希望大家指正。
總結(jié)
以上是生活随笔為你收集整理的从Dao聊到Aragon的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: mediainfo工具查看文件信息
- 下一篇: Java ArrayList应用之抽奖软