Skip to content

Commit

Permalink
Make deployable by Fabric
Browse files Browse the repository at this point in the history
  • Loading branch information
ghareeb-falazi committed Sep 29, 2024
1 parent 98e8e69 commit 11a1cc6
Show file tree
Hide file tree
Showing 18 changed files with 1,303 additions and 1,213 deletions.
5 changes: 3 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

// eslint-disable-next-line strict
module.exports = {
env: {
node: true,
Expand All @@ -12,7 +13,7 @@ module.exports = {
ecmaVersion: 8,
sourceType: 'script'
},
extends: "eslint:recommended",
extends: 'eslint:recommended',
rules: {
indent: ['error', 4],
'linebreak-style': ['error', 'unix'],
Expand All @@ -34,6 +35,6 @@ module.exports = {
'operator-linebreak': 'error',
yoda: 'error',
'quote-props': ['error', 'as-needed'],
'no-constant-condition': ["error", { "checkLoops": false }]
'no-constant-condition': ['error', { checkLoops: false }]
}
};
7 changes: 0 additions & 7 deletions eslint.config.mjs

This file was deleted.

13 changes: 6 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@

'use strict';

const test = require('./lib/smart-contracts/resource-manager-test.js');
const flightManager = require('./lib/smart-contracts/flight-booking-manager.js');
const rm = require('./lib/resource-manager/resource-manager.js');
module.exports.test = test;
module.exports.flightManager = flightManager;
module.exports.rm = rm;
module.exports.contracts = [ flightManager, rm, test ];
const rmsc = require('./lib/resourceManager');
const fbm = require('./lib/flight-booking-manager');

module.exports.ResourceManager = rmsc;
module.exports = fbm;
module.exports.contracts = [rmsc,fbm];
10 changes: 5 additions & 5 deletions ledger-api/statelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ SPDX-License-Identifier: Apache-2.0
*/

'use strict';
const { Context } = require('fabric-contract-api');
const State = require('./state.js');

const State = require('./state');

/**
* StateList provides a named virtual container for a set of ledger states.
Expand All @@ -28,8 +28,8 @@ class StateList {
* Add a state to the list. Creates a new state in worldstate with
* appropriate composite key. Note that state defines its own key.
* State object is serialized before writing.
* @param {State} state
* @returns
* @param {State} state
* @returns
*/
async addState(state) {
let key = this.ctx.stub.createCompositeKey(this.name, state.getSplitKey());
Expand Down Expand Up @@ -75,7 +75,7 @@ class StateList {
}

/**
*
*
* @returns {Promise<Array<State>>}
*/
async getAll() {
Expand Down
Loading

0 comments on commit 11a1cc6

Please sign in to comment.