1
0
mirror of https://github.com/dap-ps/discover.git synced 2025-03-03 02:10:30 +00:00

New ropsten instance w clear DB

This commit is contained in:
andytudhope 2019-08-08 15:14:57 +02:00 committed by Andy Tudhope
parent 6e9c8f3070
commit 398909ebbb
3 changed files with 13 additions and 50 deletions

View File

@ -21,42 +21,28 @@ Check the `config/contracts.js` file in order to check you're working with the c
```
MiniMeToken: { address: '0xc55cf4b03948d7ebc8b9e8bad92643703811d162' },
Discover: { address: '0x9fb115BC152aE21ECDc81c73843673fa38e4D2dB' },
Discover: { address: '0x008db8b84547982e8F6677D38e9b9ea64F3ccB8B' },
```
On mainnet they are:
```
MiniMeToken: { address: '0x744d70fdbe2ba4cf95131626614a1763df805b9e' },
Discover: { address: 'TBA' },
Discover: { address: '0x5bCF2767F86f14eDd82053bfBfd5069F68C2C5F8' },
```
If you need to deploy your own, you simply need to target your local machine when deploying.
If you need to deploy your own, you need to target your local machine when deploying.
**Tips:** Remove any existing `.embark` directory and run `embark run testnet --noserver`. Use this etherscan address to check the address of the contract you last deployed.
**Tips:** Remove any existing `.embark` directory and run `embark run testnet --noserver`.
https://ropsten.etherscan.io/address/0x65767f95799109ba028e0397add89b0ef637e444
#### Step 1.2 Build the application and start it
#### Step 1.2 Generate the embark contract artifacts
Run `embark build` in order to generate `src/embarkArtifacts/`.
Observe that you find near the beginning of the Discover.js and MiniMeToken.js files the addresses you supplied in Step 1.1
#### Step 1.3 Fix embark configuration
In embarkjs.js line 125. If you find `this._ipfsConnection.id()` -> change it to `this._ipfsConnection.version()`
This is needed because Infura's IPFS has deprecated `id` endpoint, but this is only updated in Embark 4.1.
### Step 2. Run the client side app localy.
Run the client side application via `npm run start`.
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits. You will also see any lint errors in the console.
```bash
npm run build:dev
npm run start
```
**Important!** If you get `can't establish a connection to a node` error, try to open [http://localhost:3000](http://localhost:3000) in Chrome.
### Step 3 - Run the unit tests
### Running unit tests
Use `embark test`
@ -64,30 +50,7 @@ Will compile your contracts, with hot-reloading, and let you test them locally t
### Step 4 - Building for deployment
Run the build procedure via `npm run build`. Once you are done, copy the contents of the build directory, in the `frontend` directory in the branch called `app-deployment`.
## Deployments Steps AWS
0. Run `. build.sh`, and zip the resulting `full-build` folder. Use `. build.sh --dev` when building for our dev environment.
1. Go to [AWS ElasticBeanstal console](https://us-east-1.console.aws.amazon.com/elasticbeanstalk/home?region=us-east-1#/environment/dashboard?applicationName=dev-dap-ps-app&environmentId=e-zcpbhkm3gw)
2. Click Upload and deploy button in the middle of the screen.
3. Choose the .zip file containing the code
4. Change the version if want to keep some exact numbering
5. Click Deploy
## Changing .env variables in AWS
If you've changed some smart contracts you need to change their addresses in the env variables.
1. Go to [AWS Configuration](https://us-east-1.console.aws.amazon.com/elasticbeanstalk/home?region=us-east-1#/environment/configuration?applicationName=dev-dap-ps-app&environmentId=e-zcpbhkm3gw) and on Software section click Modify
2. Scroll down and find Environment Properties
3. Change whatever property needs changing
4. Click Apply at the bottom right
Run the build procedure via `npm run build`. Once you are done, upload the app.zip into the ElasticBean instance appropriate to the environment and it should handle the rest for you.
## Running slither

View File

@ -127,7 +127,7 @@ module.exports = {
address: '0xc55cf4b03948d7ebc8b9e8bad92643703811d162',
},
Discover: {
address: '0x9fb115BC152aE21ECDc81c73843673fa38e4D2dB',
address: '0x008db8b84547982e8F6677D38e9b9ea64F3ccB8B',
},
},
tracking: 'shared.testnet.chains.json',

View File

@ -11,7 +11,7 @@
},
"0x608829b14a067d406fd623b20919d4a7719c06bb7bccdc3a7d18b11f15d8e11a": {
"name": "Discover",
"address": "0x9fb115BC152aE21ECDc81c73843673fa38e4D2dB"
"address": "0x008db8b84547982e8F6677D38e9b9ea64F3ccB8B"
}
}
}