Skip to content

Commit

Permalink
Merge 035f363 into 02d0bf4
Browse files Browse the repository at this point in the history
  • Loading branch information
AugustoL authored Mar 6, 2023
2 parents 02d0bf4 + 035f363 commit b70116a
Show file tree
Hide file tree
Showing 27 changed files with 287 additions and 1,554 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/artifacts
/cache
.temp
src/configs/localhost/config.json
/src/configs/localhost.json

# production
/build
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ With the requirements mentioned above, DXdao built DXvote, an application that,

### Stable Release

Hosted in https://dxvote.eth.link/ and under control of dxdao.
Hosted in https://dxvote.eth.limo/ and under control of dxdao.

### Release Candidate

Source code of `master` branch built and hosted on IPFS in https://dxvote.dev/ and under control of DXgovernance code owners.

### Developer Version

Source code of `develop` branch built and hosted on IPFS in https://develop.dxvote.dev/ and under control of DXgovernance developers.
Source code of `develop` branch built and hosted on IPFS in https://dxgovernance.github.io/dxvote/ and under control of DXgovernance developers.

## Maintenance

Expand All @@ -29,7 +29,7 @@ All maintenance actions are executed in the blockchain network through transacti

### Cache

To update the cache, a script must be executed; this script will fetch and index all the necessary information to be served in the dapp when it starts, so the dapp will only need to fetch the remaining information to the last block.
To update the cache, the app needs to be open on the /cache page and fill the block numbers of the latest networks, the cache would be generated to that blocks. Once the build of the cache finishes you can paste the cache hash obtained on each network on the target hash fields and then click on the download all button. The file on the files on the cache folder has to be uploaded to ipfs and the ones in configs are to be placed in the `src/configs` folder.

Example: If the dapp is used in mainnet and the last block number is 11 million, and the cache file has all the data till block number 10 million, the application will get all the remaining data between block number 10 million and 11 million before starting, once it finishes it will begin to the dapp.

Expand Down Expand Up @@ -61,7 +61,7 @@ The development script will start a local hardhat node, deploy all dxdao contrac

`yarn dev`

To understand a bit better what the script will do you can see `scripts/dev.sh` and `scripts/deployDevContracts.ts`.
To understand a bit better what the script will do you can see `scripts/dev.sh`.

## Start

Expand Down
22 changes: 0 additions & 22 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,6 @@ module.exports = {
gasLimit: 9000000,
timeout: 20000,
},
goerli: {
url:
ALCHEMY_API_KEY.length > 0
? `https://eth-goerli.alchemyapi.io/v2/${ALCHEMY_API_KEY}`
: `https://goerli.infura.io/v3/${INFURA_API_KEY}`,
accounts: { mnemonic: MNEMONIC },
gasLimit: 9000000,
gasPrice: 1000000000, // 1 gwei
},
xdai: {
url: `https://poa-xdai-archival.gateway.pokt.network/v1/lb/61b4a50ec922b9003a3a93dc`,
accounts: { mnemonic: MNEMONIC },
Expand All @@ -148,19 +139,6 @@ module.exports = {
accounts: { mnemonic: MNEMONIC },
chainId: 42161,
timeout: 60000,
},
arbitrumTestnet: {
url: 'https://rinkeby.arbitrum.io/rpc',
accounts: { mnemonic: MNEMONIC },
chainId: 421611,
timeout: 60000,
},
arbitrumNitroTestnet: {
url: "https://goerli-rollup.arbitrum.io/rpc",
accounts: { mnemonic: MNEMONIC },
gasPrice: 1000000000, // 1 gwei
chainId: 421613,
timeout: 600000, // 10 minutes
}
},
typechain: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dxvote",
"version": "1.0.19",
"version": "1.0.20",
"description": "dxvote application of DXdao.",
"scripts": {
"dev": "./scripts/dev.sh",
Expand Down
6 changes: 1 addition & 5 deletions scripts/beforeBuild.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
const fs = require('fs');

if (!fs.existsSync('./src/configs/localhost')) {
fs.mkdirSync('./src/configs/localhost');
}

fs.writeFileSync(
'./src/configs/localhost/config.json',
'./src/configs/localhost.json',
JSON.stringify(
{
cache: {
Expand Down
7 changes: 2 additions & 5 deletions scripts/dev.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mkdirSync, writeFileSync } from 'fs';
import { writeFileSync } from 'fs';
import path from 'path';
import {
ANY_FUNC_SIGNATURE,
Expand Down Expand Up @@ -682,11 +682,8 @@ async function main() {
],
};

mkdirSync(path.resolve(__dirname, '../src/configs/localhost'), {
recursive: true,
});
writeFileSync(
path.resolve(__dirname, '../src/configs/localhost/config.json'),
path.resolve(__dirname, '../src/configs/localhost.json'),
JSON.stringify(developConfig, null, 2)
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"cache": {
"fromBlock": 338923,
"ipfsHash": "QmZpq7M1CDcWvpZaxjmbFSLoPHcyMpNgc6zUj7DbDG7j3R",
"toBlock": "52085833"
"ipfsHash": "QmbkaPxW9CjNqBs7AkF9M7Z5KT8R8jYk2Ar2J6SHJ7JLCG",
"toBlock": "65787230"
},
"contracts": {
"avatar": "0x2B240b523f69b9aF3adb1C5924F6dB849683A394",
Expand Down
Loading

0 comments on commit b70116a

Please sign in to comment.