Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanket's PR on adding history to contract archives + fixes #713

Open
wants to merge 3 commits into
base: poc-slc
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26,524 changes: 26,468 additions & 56 deletions package-lock.json

Large diffs are not rendered by default.

35 changes: 27 additions & 8 deletions packages/cicero-cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ require('yargs')
describe: 'path to the JSON state',
type: 'string'
});
yargs.option('party', {
describe: 'party which triggers the contract',
type: 'string'
});
yargs.option('currentTime', {
describe: 'set current time',
type: 'string',
Expand Down Expand Up @@ -314,7 +318,7 @@ require('yargs')
offline: argv.offline,
warnings: argv.warnings,
};
return Commands.trigger(argv.template, argv.contract, argv.sample, argv.data, argv.request, argv.state, argv.currentTime, argv.utcOffset, options)
return Commands.trigger(argv.template, argv.contract, argv.sample, argv.data, argv.request, argv.state, argv.party, argv.currentTime, argv.utcOffset, options)
.then((result) => {
if(result) {Logger.info(JSON.stringify(result));}
})
Expand Down Expand Up @@ -356,6 +360,10 @@ require('yargs')
describe: 'path to the JSON state',
type: 'string'
});
yargs.option('party', {
describe: 'party which invokes the contract',
type: 'string'
});
yargs.option('currentTime', {
describe: 'set current time',
type: 'string',
Expand Down Expand Up @@ -383,7 +391,7 @@ require('yargs')
offline: argv.offline,
warnings: argv.warnings,
};
return Commands.invoke(argv.template, argv.contract, argv.sample, argv.data, argv.clauseName, argv.params, argv.state, argv.currentTime, argv.utcOffset, options)
return Commands.invoke(argv.template, argv.contract, argv.sample, argv.data, argv.clauseName, argv.params, argv.state, argv.party, argv.currentTime, argv.utcOffset, options)
.then((result) => {
if(result) {Logger.info(JSON.stringify(result));}
})
Expand Down Expand Up @@ -417,6 +425,10 @@ require('yargs')
describe: 'path to the parameters',
type: 'string'
});
yargs.option('party', {
describe: 'party which initializes the contract',
type: 'string'
});
yargs.option('currentTime', {
describe: 'initialize with this current time',
type: 'string',
Expand Down Expand Up @@ -445,7 +457,7 @@ require('yargs')
offline: argv.offline,
warnings: argv.warnings,
};
return Commands.initialize(argv.template, argv.contract, argv.sample, argv.data, argv.params, argv.currentTime, argv.utcOffset, options)
return Commands.initialize(argv.template, argv.contract, argv.sample, argv.data, argv.params, argv.party, argv.currentTime, argv.utcOffset, options)
.then((result) => {
if(result) {Logger.info(JSON.stringify(result));}
})
Expand Down Expand Up @@ -531,6 +543,10 @@ require('yargs')
type: 'string',
default: 'ergo'
});
yargs.option('instantiator', {
describe: 'name of the instantiator',
type: 'string'
});
yargs.option('output', {
describe: 'file name for new archive',
type: 'string',
Expand All @@ -551,7 +567,7 @@ require('yargs')
const options = {
warnings: argv.warnings,
};
return Commands.instantiate(argv.template, argv.data, argv.target, argv.output, options)
return Commands.instantiate(argv.template, argv.data, argv.target, argv.output, argv.instantiator, options)
.catch((err) => {
Logger.error(err.message);
});
Expand Down Expand Up @@ -618,9 +634,8 @@ require('yargs')
default: null
});
yargs.option('signatory', {
describe: 'name of the signatory',
type: 'string',
default: null
describe: 'name of the party/signatory signing the contract',
type: 'string'
});
yargs.option('output', {
describe: 'file name for new archive',
Expand Down Expand Up @@ -686,6 +701,10 @@ require('yargs')
describe: 'path to a smart legal contract',
type: 'string'
});
yargs.option('party', {
describe: 'party which exports the contract',
type: 'string'
});
yargs.option('output', {
describe: 'path to the output file',
type: 'string'
Expand Down Expand Up @@ -723,7 +742,7 @@ require('yargs')
warnings: argv.warnings,
format: argv.format,
};
return Commands.export(argv.contract, argv.output, argv.currentTime, argv.utcOffset, options)
return Commands.export(argv.contract, argv.party, argv.output, argv.currentTime, argv.utcOffset, options)
.then((result) => {
})
.catch((err) => {
Expand Down
Loading