在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:MenloOne/townhall开源软件地址:https://github.com/MenloOne/townhall开源编程语言:JavaScript 92.2%开源软件介绍:Menlo One TownHall has been replaced by Menlo One ExpoExpo GithubClick through to theUse Expo on KovanFind out about Menlo: https://www.menlo.one/ (Deprecated)https://www.menlo.one/#/townhall DevelopmentTo develop and run the town hall locally, install the following prerequisites and dependencies before running the app. PrerequisitesBrewWe assume
IPFSTownHall uses IPFS for storage of messages. Menlo specific setup of IPFS can be installed and configured via:
MetamaskMetamask or Mist should be used for interacting with the town hall dapp. Install Metamask extensions into your browser of choice, Chrome or Brave supported: http://metamask.io Import development chain accountImport this private key into MetaMask for use with
Install app and dependencies
Run the application
Interact with TownHallA browser window should open after starting: Ensure you are logged into MetaMask and switch to your imported account. Set the network in MetaMask to GanacheFor a light, easy to use private chain with a visual and cli interface, try Ganache. You can deploy and test using network ganache:
Note: Ganache and truffle develop are transitory. Once you shut them down, you will have to redeploy the contracts and redo any needed transactions. IntegrationFor a persistent local testing environment to test before deploying to testnet or mainnet, use a Dev chain with Parity or Geth. You can set the following environment variables in your local
ParityTo run a private dev chain with Parity, first run a dev chain, setup Menlo accounts, and then deploy contracts. Install ParityInstalling Parity:
Run unlocked dev chainAssuming a default Parity setup, the initial dev account address is static:
You need to unlock your dev account to be able to run Truffle migrations easily. The following script runs parity with an unlocked dev account, it will need to be modified if you've changed the default dev account:
Set up Menlo accountsCreate the needed Menlo accounts:
After running the account creation, a set of accounts will be displayed to
add to your Add Deploy ContractsOnce you add the environment variables to your account, rerun parity with the helper script:
Now deploy the contracts, use the
Your contracts will live between parity dev runs, you can check the contracts addresses to watch with Browse http://localhost:8180 to interact with the Parity wallet. Parity has a lot of config and features: Read the effin manual Subsequent runs
TestingFor testing the TownHall dapp:
For testing the town hall contracts:
DeploymentSet the following environment variables:
Deploy to server using
Staging and TestnetRinkeby & MistMetaMask can be used with a Rinkeby account to test against. The Mist browser can be used to test the Rinkeby testnet. Mist uses Geth underneath:
Run Geth against Rinkeby with the Apis needed by Truffle:
Now, run Mist against your local instance of Geth:
Wait for the blocks to sync , (go for a walk and enjoy the sunshine). After the blocks sycn, note your account hash in the Mist Wallet, you'll need it later. Close Mist, Stop Geth. Now, run Geth with the account you noted above unlocked:
Run Mist again:
Now you are ready to deploy contracts and test:
Go to the faucet to get some free Ether: Rinkeby Faucet Give your Mist account some TK/MET tokens:
Run the Town Hall and browse in Mist to http://localhost:3000. KovanTBD
Production and Mainnet... Overriding the default configurationThis repo uses create-react-app environment variables. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论