Upgrade dependencies, fix contracts linking #198

Merged
raucao merged 2 commits from chore/dependencies into master 2022-04-27 16:17:20 +00:00
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.
* `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
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`
* `npm run start:local` - WEB3_PROVIDER_URL=http://localhost:8545 must be set for local settings
#### 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
+3 -5
View File
@@ -7,14 +7,12 @@ export default class ApplicationRoute extends Route {
@service communityFunds;
beforeModel(/* transition */) {
const kredits = this.kredits;
return kredits.setup().then(() => {
kredits.kredits.preflightChecks().catch((error) => {
return this.kredits.setup().then(() => {
this.kredits.kredits.preflightChecks().catch(error => {
console.error('Kredits preflight check failed!');
console.error(error);
});
}).catch((error) => {
}).catch(error => {
console.log('Error initializing Kredits', error);
});
}
+15 -20
View File
@@ -111,28 +111,23 @@ export default Service.extend({
});
},
setup () {
return this.getEthProvider().then((providerAndSigner) => {
let kredits = new Kredits(providerAndSigner.ethProvider, providerAndSigner.ethSigner, {
addresses: { Kernel: config.kreditsKernelAddress },
apm: config.kreditsApmDomain,
async setup () {
const kredits = await this.getEthProvider().then((providerAndSigner) => {
return new Kredits(providerAndSigner.ethProvider, providerAndSigner.ethSigner, {
ipfsConfig: config.ipfs
});
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;
});
}).init();
});
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() {
-10
View File
@@ -25,16 +25,6 @@ module.exports = function(environment) {
// when it is created
},
browserify: {
tests: true,
transform: [
["babelify", {
presets: ["es2015"],
global: true
}]
]
},
web3ProviderUrl: 'https://rinkeby.infura.io/v3/d4f788b7a6584f7db2fc3c268d4d09e9',
web3RequiredNetwork: 'rinkeby',
+6 -6
View File
@@ -17,12 +17,12 @@ module.exports = function(defaults) {
webpack: {
module: {
rules: [
{
// inline json files instead of using fs.readFileSync
enforce: 'post',
test: /kosmos-schemas\/index\.js$/,
loader: 'transform-loader?brfs'
}
// {
// // inline json files instead of using fs.readFileSync
// enforce: 'post',
// test: /kosmos-schemas\/index\.js$/,
// loader: 'transform-loader?brfs'
// }
]
},
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",
"test": "npm-run-all lint:* 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-prod": "rm -rf release/* && ember build -prod --output-path release",
"preversion": "npm test",
@@ -29,13 +29,10 @@
"@ember/optional-features": "^1.3.0",
"@glimmer/component": "^1.0.0",
"@glimmer/tracking": "^1.0.0",
"@kosmos/schemas": "^3.0.0",
"babel-eslint": "^10.1.0",
"babel-preset-es2015": "^6.22.0",
"babelify": "^7.3.0",
"brfs": "^2.0.2",
"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-cli": "~3.18.0",
"ember-cli-app-version": "^3.2.0",
@@ -62,13 +59,13 @@
"ember-resolver": "^8.0.0",
"ember-source": "~3.18.0",
"ember-template-lint": "^2.8.0",
"ember-truth-helpers": "github:jmurphyau/ember-truth-helpers#31a14373a31f1f82c77537720549b47a95c28e5f",
"eslint": "^7.1.0",
"eslint-plugin-ember": "^8.5.2",
"ember-truth-helpers": "^3.0.0",
"eslint": "^8.14.0",
"eslint-plugin-ember": "^10.6.0",
"eslint-plugin-node": "^11.1.0",
"ethers": "^4.0.47",
"ethers": "^5.4.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",
"localforage": "^1.7.3",
"ndjson": "github:hugomrdias/ndjson#feat/readable-stream3",
@@ -77,10 +74,10 @@
"sass": "^1.26.7",
"transform-loader": "^0.2.4",
"tv4": "^1.3.0",
"web3-utils": "^1.2.8"
"web3-utils": "^1.7.3"
},
"engines": {
"node": "10.* || >= 12"
"node": ">= 14"
},
"ember": {
"edition": "octane"