Development resources at your finger tips
Build with the coolest Web3 projects
Recurring funding for Open Source
Ethical ads to power Open Source
Learn about Web3 & earn rewards
Show appreciation for each other
Meet fellow developers, designers, futurists and more. Collaborate and BUIDL awesome projects together.
Discover great web3 organizations, work on meaningful projects and build relationships with like minded people. Browse Tribes
Meet the top hunters and contributors from our community.
KERNEL is an 8-week, invite-only program for top tech talent looking to build relationships, products, and companies in blockchain and Web 3. 100 tal…
Heyo Gitcoiners! With an entire city of hackers, coders and blockchain innovators relocated on our platform, the atmosphere is just buzzing with crea…
Type in [[ 2- term.length]] more characters to get results
[[ result.title ]]
[[ result.description | truncate(70) ]]
No matches found
Gitcoin is GDPR complaint. Learn more in
Gitcoin's Terms & Conditions.
Check out the Issue Explorer
Looking to fund some work? You can submit a new Funded Issue here.
Currently, it is not easy to set this app up locally. While we have scripts for building the app.zip we need for development and production, these do not cater for local deployment and testing.
From the root directory, you can run `./node_modules/.bin/embark build` (which defaults to `localhost` and deploys contracts locally), change the `_ipfsConnection.id() -> .version()` at L125 of `src/embarkArtifacts/embarkjs.js` yourself, and `npm run start` to get things going. However, the app will fail to connect to `http://localhost/metadata/all` - the endpoint it is expecting to fetch metadata from (because `npm run start` only sets up the frontend).
See the `error Error: "Request failed with status code 404"` in the web console, go to the Network tab to see the `404` failing at http://localhost:3000/metadata/all. This is because the back-end is not running, obviously.
1. I would create another ENV variable - `localhost` - in the Makefile so that the build script can also build locally (it can use the same mnemonic and pswd as `development` does).
2. Skip the app.zip step if `localhost` is set - that is only need for ElasticBeanstalk (dev and prod)
3. The Makefile creates a `full-build` directory - you need to `cd` into it, `npm install` the necessary packages and make sure that `node server.js` runs correctly and allows you to develop and test locally without issues.
4. Make sure you can submit a DApp successfully.
5. Document your changes in the README
**Actually**, it's gonna be hack to `npm install` every time you want to rebuild with changes, so if `process.node.ENV == localhost` then don't delete the `full-build` dir, just replace what is in there leaving `node_modules` intact. There must be a better way to do this... Let's see what Jakub says when he is around, because I am invariably wrong about these things...
There's another problem: in order to submit to a contract running locally, you'll actually need to have Embark running, rather than just building and pointing to a specific contract on Ropsten or Mainnet (as we do for dev or prod builds). You would need to connect MM or Status to your localhost, and make sure tokens are generated in an account you can access there. This is a lot of work, and doesn't make getting set up easier.
I have a potential hack. For local deployment:
1. We still target Ropsten and `STT` (because anyone can get it easily from simpledapp.eth), but we deploy a new Discover contract so as not to mess with the one on dev.dap.ps. To do this, change the [config/contracts.js](https://github.com/dap-ps/discover/blob/master/config/contracts.js) using `args: ['$MiniMeToken']` as the param for `Discover` for local development. The current wallet has some Ropsten ETH, or developers can create their own WALLET_MNEMONIC env variable with rETH in it.
2. This means you you can still just `embark build` for `localhost` and exit that process. No funny stuff with MM/Status either. Just connect to Ropsten and get STT from simpledapp.eth
3. We still need to set up the `metadata/all` endpoint (i.e. run the back-end)