Browse Source

Expose new contracts in index.js

develop
Ezerous 4 years ago
parent
commit
aad4d470cb
  1. 4
      packages/concordia-contracts/.eslintrc.js
  2. 8
      packages/concordia-contracts/index.js

4
packages/concordia-contracts/.eslintrc.js

@ -31,7 +31,9 @@ module.exports = {
'no-unused-vars': 'warn', 'no-unused-vars': 'warn',
'no-console': 'warn', 'no-console': 'warn',
'no-shadow': 'warn', 'no-shadow': 'warn',
"no-multi-str": "warn" 'no-multi-str': 'warn',
'one-var': ["error", { "uninitialized": "always" }],
'one-var-declaration-per-line': ['error', 'initializations']
}, },
'settings': { 'settings': {
'import/resolver': { 'import/resolver': {

8
packages/concordia-contracts/index.js

@ -1,14 +1,16 @@
let Forum; let Forum, Voting, PostVoting;
/* eslint-disable global-require */
try { try {
// eslint-disable-next-line global-require
Forum = require('./build/Forum.json'); Forum = require('./build/Forum.json');
Voting = require('./build/Voting.json');
PostVoting = require('./build/PostVoting.json');
} catch (e) { } catch (e) {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.error("Could not require contract artifacts. Haven't you run compile yet?"); console.error("Could not require contract artifacts. Haven't you run compile yet?");
} }
module.exports = { module.exports = {
contracts: [Forum], contracts: [Forum, Voting, PostVoting],
forumContract: Forum, forumContract: Forum,
}; };

Loading…
Cancel
Save