Merge pull request #198 from 67P/chore/dependencies

Upgrade dependencies, fix contracts linking
This commit was merged in pull request #198.
This commit is contained in:
2022-04-27 18:17:20 +02:00
committed by GitHub
7 changed files with 37166 additions and 13368 deletions
+2 -8
View File
@@ -92,17 +92,11 @@ for details.
With IPFS and Ethereum/ganache running, you can now start this Ember app. With IPFS and Ethereum/ganache running, you can now start this Ember app.
* `npm link kredits-contracts` - link the local `kredits-contracts` package * `npm link kredits-contracts` - link the local `kredits-contracts` package
* `npm run start:local` - WEB3_PROVIDER_URL=http://localhost:7545 must be set for local settings * `npm run start:local` - WEB3_PROVIDER_URL=http://localhost:8545 must be set for local settings
If you restart the devchain your network ID changes. So kredits-contracts does not find the correct DAO address.
If that is the case the DAO address must be provided as `KREDITS_DAO_ADDRESS` environment variable.
* `npm run dao:address` in the kredits-contracts repo to find your address
* `KREDITS_DAO_ADDRESS=<0xYOURADDRESS> npm run start:local`
#### 4. Metamask network #### 4. Metamask network
Switch the network in Metamask to "Custom RPC" with the RPC URL `http://localhost:7545`. Switch the network in Metamask to "Custom RPC" with the RPC URL `http://localhost:8545`.
#### IPFS #### IPFS
+3 -5
View File
@@ -7,14 +7,12 @@ export default class ApplicationRoute extends Route {
@service communityFunds; @service communityFunds;
beforeModel(/* transition */) { beforeModel(/* transition */) {
const kredits = this.kredits; return this.kredits.setup().then(() => {
this.kredits.kredits.preflightChecks().catch(error => {
return kredits.setup().then(() => {
kredits.kredits.preflightChecks().catch((error) => {
console.error('Kredits preflight check failed!'); console.error('Kredits preflight check failed!');
console.error(error); console.error(error);
}); });
}).catch((error) => { }).catch(error => {
console.log('Error initializing Kredits', error); console.log('Error initializing Kredits', error);
}); });
} }
+15 -20
View File
@@ -111,28 +111,23 @@ export default Service.extend({
}); });
}, },
setup () { async setup () {
return this.getEthProvider().then((providerAndSigner) => { const kredits = await this.getEthProvider().then((providerAndSigner) => {
let kredits = new Kredits(providerAndSigner.ethProvider, providerAndSigner.ethSigner, { return new Kredits(providerAndSigner.ethProvider, providerAndSigner.ethSigner, {
addresses: { Kernel: config.kreditsKernelAddress },
apm: config.kreditsApmDomain,
ipfsConfig: config.ipfs ipfsConfig: config.ipfs
}); }).init();
return kredits
.init()
.then(async (kredits) => {
this.set('kredits', kredits);
this.set('currentBlock', await kredits.provider.getBlockNumber());
if (this.currentUserAccounts && this.currentUserAccounts.length > 0) {
this.getCurrentUser.then((contributorData) => {
this.set('currentUser', contributorData);
});
}
return kredits;
});
}); });
this.set('kredits', kredits);
this.set('currentBlock', await kredits.provider.getBlockNumber());
if (this.currentUserAccounts && this.currentUserAccounts.length > 0) {
this.getCurrentUser.then(contributorData => {
this.set('currentUser', contributorData);
});
}
return kredits;
}, },
getCurrentUser: computed('kredits.provider', 'currentUserAccounts.[]', function() { getCurrentUser: computed('kredits.provider', 'currentUserAccounts.[]', function() {
-10
View File
@@ -25,16 +25,6 @@ module.exports = function(environment) {
// when it is created // when it is created
}, },
browserify: {
tests: true,
transform: [
["babelify", {
presets: ["es2015"],
global: true
}]
]
},
web3ProviderUrl: 'https://rinkeby.infura.io/v3/d4f788b7a6584f7db2fc3c268d4d09e9', web3ProviderUrl: 'https://rinkeby.infura.io/v3/d4f788b7a6584f7db2fc3c268d4d09e9',
web3RequiredNetwork: 'rinkeby', web3RequiredNetwork: 'rinkeby',
+6 -6
View File
@@ -17,12 +17,12 @@ module.exports = function(defaults) {
webpack: { webpack: {
module: { module: {
rules: [ rules: [
{ // {
// inline json files instead of using fs.readFileSync // // inline json files instead of using fs.readFileSync
enforce: 'post', // enforce: 'post',
test: /kosmos-schemas\/index\.js$/, // test: /kosmos-schemas\/index\.js$/,
loader: 'transform-loader?brfs' // loader: 'transform-loader?brfs'
} // }
] ]
}, },
node: { node: {
+37131 -13307
View File
File diff suppressed because it is too large Load Diff
+9 -12
View File
@@ -17,7 +17,7 @@
"start": "ember serve", "start": "ember serve",
"test": "npm-run-all lint:* test:*", "test": "npm-run-all lint:* test:*",
"test:ember": "ember test", "test:ember": "ember test",
"start:local": "WEB3_PROVIDER_URL=http://localhost:7545 ember serve", "start:local": "WEB3_PROVIDER_URL=http://localhost:8545 ember serve",
"build": "ember build --environment=production", "build": "ember build --environment=production",
"build-prod": "rm -rf release/* && ember build -prod --output-path release", "build-prod": "rm -rf release/* && ember build -prod --output-path release",
"preversion": "npm test", "preversion": "npm test",
@@ -29,13 +29,10 @@
"@ember/optional-features": "^1.3.0", "@ember/optional-features": "^1.3.0",
"@glimmer/component": "^1.0.0", "@glimmer/component": "^1.0.0",
"@glimmer/tracking": "^1.0.0", "@glimmer/tracking": "^1.0.0",
"@kosmos/schemas": "^3.0.0",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-preset-es2015": "^6.22.0", "babel-preset-es2015": "^6.22.0",
"babelify": "^7.3.0",
"brfs": "^2.0.2",
"broccoli-asset-rev": "^3.0.0", "broccoli-asset-rev": "^3.0.0",
"ember-auto-import": "^1.5.3", "ember-auto-import": "^1.12.1",
"ember-awesome-macros": "0.41.0", "ember-awesome-macros": "0.41.0",
"ember-cli": "~3.18.0", "ember-cli": "~3.18.0",
"ember-cli-app-version": "^3.2.0", "ember-cli-app-version": "^3.2.0",
@@ -62,13 +59,13 @@
"ember-resolver": "^8.0.0", "ember-resolver": "^8.0.0",
"ember-source": "~3.18.0", "ember-source": "~3.18.0",
"ember-template-lint": "^2.8.0", "ember-template-lint": "^2.8.0",
"ember-truth-helpers": "github:jmurphyau/ember-truth-helpers#31a14373a31f1f82c77537720549b47a95c28e5f", "ember-truth-helpers": "^3.0.0",
"eslint": "^7.1.0", "eslint": "^8.14.0",
"eslint-plugin-ember": "^8.5.2", "eslint-plugin-ember": "^10.6.0",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"ethers": "^4.0.47", "ethers": "^5.4.7",
"fetch-mock": "^9.10.7", "fetch-mock": "^9.10.7",
"kredits-contracts": "github:67P/kredits-contracts#feature/expenses", "kredits-contracts": "github:67P/kredits-contracts#hardhat",
"loader.js": "^4.7.0", "loader.js": "^4.7.0",
"localforage": "^1.7.3", "localforage": "^1.7.3",
"ndjson": "github:hugomrdias/ndjson#feat/readable-stream3", "ndjson": "github:hugomrdias/ndjson#feat/readable-stream3",
@@ -77,10 +74,10 @@
"sass": "^1.26.7", "sass": "^1.26.7",
"transform-loader": "^0.2.4", "transform-loader": "^0.2.4",
"tv4": "^1.3.0", "tv4": "^1.3.0",
"web3-utils": "^1.2.8" "web3-utils": "^1.7.3"
}, },
"engines": { "engines": {
"node": "10.* || >= 12" "node": ">= 14"
}, },
"ember": { "ember": {
"edition": "octane" "edition": "octane"