Giter VIP home page Giter VIP logo

pet-shop's Introduction

阅读参考:https://learnblockchain.cn/2018/01/12/first-dapp/

Mac下部署步骤(亲测): 一、环境搭建 1、安装 Node 2、安装 Truffle :npm install -g truffle 3、安装 Ganache

二、部署 1、编译 dapp 的根目录 pet-shop-tutorial 下

truffle compile --network ropsten 2、部署 truffle migrate --network ropsten 可能会报错:"Migrations" -- Returned error: authentication needed: password or unlock. 需要去geth节点解锁账户:personal.unlockAccount(‘0x822531774f9af49f60b4b527d61b647d8d459bbb‘, ‘7878’) 3、运行 npm run dev

三、测试 1、执行 truffle test 时有报错 address expected = address(this); 需强制转换下 this类型

四、MetaMask 使用 Ganache 提供的助记词 导入到 MetaMask中,选择 Custom RPC,添加一个网络:http://127.0.0.1:7545, 链ID使用的是1337 为什么 不是Ganache 中的 5777 ?

五、test

pet-shop's People

Contributors

ethanhee avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.