Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

Commit

Permalink
fix contract exports
Browse files Browse the repository at this point in the history
  • Loading branch information
ewingrj committed Feb 11, 2019
1 parent 9a7830e commit 8ca217c
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 62 deletions.
56 changes: 53 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,63 @@
const contracts = require('./js/contracts');
const generateClass = require('eth-contract-class').default;

const LPFactoryArtifact = require('../dist/contracts/LPFactory.json');
const LiquidPledgingArtifact = require('../dist/contracts/LiquidPledging.json');
const LPVaultArtifact = require('../dist/contracts/LPVault.json');
const KernelArtifact = require('../dist/contracts/Kernel.json');
const DAOFactoryArtifact = require('../dist/contracts/DAOFactory.json');
const ACLArtifact = require('../dist/contracts/ACL.json');
const AppProxyUpgradeableArtifact = require('../dist/contracts/AppProxyUpgradeable.json');
const StandardTokenTestAtifact = require('../dist/contracts/StandardToken.json');
const LiquidPledgingMockArtifact = require('../dist/contracts/LiquidPledgingMock.json');
const RecoveryVaultArtifact = require('../dist/contracts/RecoveryVault.json');
const assertFail = require('./test/helpers/assertFail');
const { embarkConfig, deploy: deployLP } = require('./test/helpers/deployLP');

module.exports = {
...contracts,
LiquidPledging: generateClass(
LiquidPledgingArtifact.abiDefinition,
LiquidPledgingArtifact.code,
),
LPFactory: generateClass(
LPFactoryArtifact.abiDefinition,
LPFactoryArtifact.code,
),
LiquidPledgingState: require('../js/liquidPledgingState.js'),
LPVault: generateClass(
LPVaultArtifact.abiDefinition,
LPVaultArtifact.code,
),
DAOFactory: generateClass(
DAOFactoryArtifact.abiDefinition,
DAOFactoryArtifact.code,
),
Kernel: generateClass(
KernelArtifact.abiDefinition,
KernelArtifact.code,
),
ACL: generateClass(
ACLArtifact.abiDefinition,
ACLArtifact.code,
),
AppProxyUpgradeable: generateClass(
AppProxyUpgradeableArtifact.abiDefinition,
AppProxyUpgradeableArtifact.code,
),
test: {
RecoveryVault: generateClass(
RecoveryVaultArtifact.abiDefinition,
RecoveryVaultArtifact.code,
),
StandardTokenTest: generateClass(
StandardTokenTestAtifact.abiDefinition,
StandardTokenTestAtifact.code,
),
LiquidPledgingMock: generateClass(
LiquidPledgingMockArtifact.abiDefinition,
LiquidPledgingMockArtifact.code,
),
assertFail,
embarkConfig,
deployLP,
...contracts.test,
},
};
58 changes: 0 additions & 58 deletions js/contracts.js

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "giveth-liquidpledging",
"version": "2.0.0-beta.2",
"version": "2.0.0-beta.3",
"description": "Liquid Pledging Smart Contract",
"main": "index.js",
"directories": {
Expand Down

0 comments on commit 8ca217c

Please sign in to comment.