From 8c8e60c1d7abd14a0821812a5fb80a7123eee0ee Mon Sep 17 00:00:00 2001 From: owl352 Date: Sat, 27 Jul 2024 21:40:45 +0500 Subject: [PATCH 1/8] initial commit --- packages/data-contract/.env | 4 +- packages/data-contract/README.md | 38 ++++++++++++++- packages/data-contract/document.json | 4 ++ packages/data-contract/index.js | 28 ++++------- packages/data-contract/package.json | 4 +- packages/data-contract/src/pushDocument.js | 46 +++++++++++++++++++ .../data-contract/src/registerIdentity.js | 16 +++++++ packages/data-contract/src/utils.js | 36 +++++++++++++++ 8 files changed, 154 insertions(+), 22 deletions(-) create mode 100644 packages/data-contract/document.json create mode 100644 packages/data-contract/src/pushDocument.js create mode 100644 packages/data-contract/src/registerIdentity.js create mode 100644 packages/data-contract/src/utils.js diff --git a/packages/data-contract/.env b/packages/data-contract/.env index 10d267384..97d8ed4fd 100644 --- a/packages/data-contract/.env +++ b/packages/data-contract/.env @@ -1,3 +1,5 @@ SKIP_SYNCHRONIZATION_BEFORE_HEIGHT=1000000 MNEMONIC="" -OWNER_IDENTIFIER="" \ No newline at end of file +OWNER_IDENTIFIER="" +DOCUMENT_NAME="" +CONTRACT_ID="" \ No newline at end of file diff --git a/packages/data-contract/README.md b/packages/data-contract/README.md index bf8fa6e6a..2dba1fb7b 100644 --- a/packages/data-contract/README.md +++ b/packages/data-contract/README.md @@ -11,12 +11,46 @@ before launching, you need to enter your data in the `.env` file - Node.js 20+ Insert your data in .env +``` +npm install +``` +--- +## Register Identifier +We can register new identifier by this command +``` +npm run identity:register +``` +**Required env vars:** +* `MNEMONIC` +* `OWNER_IDENTIFIER` --- -### Start +## Deploy Contract +We can deploy data-contract from `schema.json` by this command +``` +npm run dataContract:deploy +``` +**Required env vars:** +* `MNEMONIC` +* `OWNER_IDENTIFIER` +--- +## Push Document +We can push document from `document.json` by this command ``` -npm install npm run dataContract:deploy ``` +**Required env vars:** +* `MNEMONIC` +* `OWNER_IDENTIFIER` +* `DOCUMENT_NAME` +* `CONTRACT_ID` +--- + +## Env Vars +* `MNEMONIC` - wallet mnemonic +* `OWNER_IDENTIFIER` - identifier which be used for interaction with blockchain +* `DOCUMENT_NAME` - name for document +* `CONTRACT_ID` - contract id for push +* `SKIP_SYNCHRONIZATION_BEFORE_HEIGHT` - core property \ No newline at end of file diff --git a/packages/data-contract/document.json b/packages/data-contract/document.json new file mode 100644 index 000000000..49d2041ce --- /dev/null +++ b/packages/data-contract/document.json @@ -0,0 +1,4 @@ +{ + "name": "Example1", + "identifier": "1234567890123456789012345678901234567890123" +} diff --git a/packages/data-contract/index.js b/packages/data-contract/index.js index ce02d101c..a7d13d6b6 100644 --- a/packages/data-contract/index.js +++ b/packages/data-contract/index.js @@ -1,37 +1,29 @@ require('dotenv').config() - -const Dash = require('dash') const schema = require('./schema.json') -function logInfo (...messages) { - console.log('\x1b[32m [INFO]', ...messages, '\x1b[0m ') -} +const { initClient, logInfo } = require('./src/utils') async function main () { logInfo('Client Initialization') + const client = initClient() - const options = { - network: 'testnet', - wallet: { - mnemonic: process.env.MNEMONIC - } - } - - if (process.env.SKIP_SYNCHRONIZATION_BEFORE_HEIGHT) { - options.wallet.unsafeOptions = { skipSynchronizationBeforeHeight: Number(process.env.SKIP_SYNCHRONIZATION_BEFORE_HEIGHT) } + logInfo('Getting Identity') + if (!process.env.OWNER_IDENTIFIER) { + logInfo('No identity in env :(') + process.exit() } - const client = new Dash.Client(options) - - logInfo('Contract Deployment') - const identity = await client.platform.identities.get(process.env.OWNER_IDENTIFIER) + logInfo(`Using: ${identity.toJSON().id}`) + logInfo('Contract Deployment') const contract = await client.platform.contracts.create(schema, identity) const deployedContract = await client.platform.contracts.publish(contract, identity) + console.log() logInfo('All Done!') logInfo(`Contract deployed at: ${deployedContract.getDataContract().getId()}`) + logInfo(`Used id: ${identity.toJSON().id}`) } main().catch(console.error) diff --git a/packages/data-contract/package.json b/packages/data-contract/package.json index e007f08a2..fa70fe10c 100644 --- a/packages/data-contract/package.json +++ b/packages/data-contract/package.json @@ -4,6 +4,8 @@ "main": "index.js", "scripts": { "dataContract:deploy": "node index.js", + "identity:register": "node ./src/registerIdentity.js", + "document:push": "node ./src/pushDocument.js", "lint": "standard ." }, "repository": { @@ -18,7 +20,7 @@ "homepage": "https://github.com/pshenmic/platform-explorer#readme", "description": "", "dependencies": { - "dash": "4.0.0-dev.12", + "dash": "^4.0.0-rc.2", "dotenv": "^16.4.5" }, "devDependencies": { diff --git a/packages/data-contract/src/pushDocument.js b/packages/data-contract/src/pushDocument.js new file mode 100644 index 000000000..ee0d6a8e3 --- /dev/null +++ b/packages/data-contract/src/pushDocument.js @@ -0,0 +1,46 @@ +require('dotenv').config() +const { initClient, logInfo } = require('./utils') +const doc = require('../document.json') + +async function pushDocument () { + logInfo('Client initialization') + const { platform } = initClient() + + logInfo('Getting identity') + if (!process.env.OWNER_IDENTIFIER) { + logInfo('No identity in env :(') + process.exit() + } + const identity = await platform.identities.get(process.env.OWNER_IDENTIFIER) + + if (!process.env.CONTRACT_ID) { + logInfo('No contract ID in env') + process.exit() + } + + if (!process.env.DOCUMENT_NAME) { + logInfo('No document name in env') + process.exit() + } + + logInfo('Creating Document') + const document = await platform.documents.create( + `contract.${process.env.DOCUMENT_NAME}`, + identity, + doc + ) + const documentBatch = { + create: [document], + replace: [], + delete: [] + } + + logInfo('Broadcasting Document') + await platform.documents.broadcast(documentBatch, identity) + + console.log() + logInfo('Done') + logInfo(`Document at: ${document.getId()}`) +} + +pushDocument().catch(console.error) diff --git a/packages/data-contract/src/registerIdentity.js b/packages/data-contract/src/registerIdentity.js new file mode 100644 index 000000000..722ee3994 --- /dev/null +++ b/packages/data-contract/src/registerIdentity.js @@ -0,0 +1,16 @@ +require('dotenv').config() +const { initClient, logInfo, registerIdentity } = require('./utils') + +async function createIdentity () { + logInfo('Client initialization') + const client = initClient() + + logInfo('Registering new identity') + const identity = await registerIdentity(client) + + console.log() + logInfo('Done') + logInfo(`Identity: ${identity.toJSON().id}`) +} + +createIdentity().catch(console.error) diff --git a/packages/data-contract/src/utils.js b/packages/data-contract/src/utils.js new file mode 100644 index 000000000..41d9b6f4e --- /dev/null +++ b/packages/data-contract/src/utils.js @@ -0,0 +1,36 @@ +const Dash = require('dash') + +function logInfo (...messages) { + console.log('\x1b[32m [INFO]', ...messages, '\x1b[0m ') +} + +function initClient () { + const options = { + network: 'testnet', + wallet: { + mnemonic: process.env.MNEMONIC + } + } + + if (process.env.SKIP_SYNCHRONIZATION_BEFORE_HEIGHT) { + options.wallet.unsafeOptions = + { skipSynchronizationBeforeHeight: Number(process.env.SKIP_SYNCHRONIZATION_BEFORE_HEIGHT) } + } + + if (process.env.CONTRACT_ID) { + options.apps = { + contract: { + contractId: process.env.CONTRACT_ID + } + } + } + + const client = new Dash.Client(options) + return client +} + +async function registerIdentity (client) { + return await client.platform.identities.register() +} + +module.exports = { initClient, logInfo, registerIdentity } From 39028bf41b13a4682e500063e408f7bc7f910310 Mon Sep 17 00:00:00 2001 From: owl352 Date: Sat, 27 Jul 2024 23:11:23 +0500 Subject: [PATCH 2/8] files structure update --- packages/data-contract/package.json | 6 +++--- .../{index.js => src/actions/deployContract.js} | 8 ++++---- packages/data-contract/src/{ => actions}/pushDocument.js | 4 ++-- .../data-contract/src/{ => actions}/registerIdentity.js | 3 ++- 4 files changed, 11 insertions(+), 10 deletions(-) rename packages/data-contract/{index.js => src/actions/deployContract.js} (81%) rename packages/data-contract/src/{ => actions}/pushDocument.js (91%) rename packages/data-contract/src/{ => actions}/registerIdentity.js (79%) diff --git a/packages/data-contract/package.json b/packages/data-contract/package.json index fa70fe10c..79c418ae1 100644 --- a/packages/data-contract/package.json +++ b/packages/data-contract/package.json @@ -3,9 +3,9 @@ "version": "1.0.0", "main": "index.js", "scripts": { - "dataContract:deploy": "node index.js", - "identity:register": "node ./src/registerIdentity.js", - "document:push": "node ./src/pushDocument.js", + "dataContract:deploy": "node ./src/actions/deployContract.js", + "identity:register": "node ./src/actions/registerIdentity.js", + "document:push": "node ./src/actions/pushDocument.js", "lint": "standard ." }, "repository": { diff --git a/packages/data-contract/index.js b/packages/data-contract/src/actions/deployContract.js similarity index 81% rename from packages/data-contract/index.js rename to packages/data-contract/src/actions/deployContract.js index a7d13d6b6..13e7ed356 100644 --- a/packages/data-contract/index.js +++ b/packages/data-contract/src/actions/deployContract.js @@ -1,9 +1,9 @@ require('dotenv').config() -const schema = require('./schema.json') +const schema = require('../../schema.json') -const { initClient, logInfo } = require('./src/utils') +const { initClient, logInfo } = require('../utils') -async function main () { +async function deployContract () { logInfo('Client Initialization') const client = initClient() @@ -26,4 +26,4 @@ async function main () { logInfo(`Used id: ${identity.toJSON().id}`) } -main().catch(console.error) +deployContract().catch(console.error) diff --git a/packages/data-contract/src/pushDocument.js b/packages/data-contract/src/actions/pushDocument.js similarity index 91% rename from packages/data-contract/src/pushDocument.js rename to packages/data-contract/src/actions/pushDocument.js index ee0d6a8e3..3af697b45 100644 --- a/packages/data-contract/src/pushDocument.js +++ b/packages/data-contract/src/actions/pushDocument.js @@ -1,6 +1,6 @@ require('dotenv').config() -const { initClient, logInfo } = require('./utils') -const doc = require('../document.json') +const { initClient, logInfo } = require('../utils') +const doc = require('../../document.json') async function pushDocument () { logInfo('Client initialization') diff --git a/packages/data-contract/src/registerIdentity.js b/packages/data-contract/src/actions/registerIdentity.js similarity index 79% rename from packages/data-contract/src/registerIdentity.js rename to packages/data-contract/src/actions/registerIdentity.js index 722ee3994..e38609a2a 100644 --- a/packages/data-contract/src/registerIdentity.js +++ b/packages/data-contract/src/actions/registerIdentity.js @@ -1,5 +1,5 @@ require('dotenv').config() -const { initClient, logInfo, registerIdentity } = require('./utils') +const { initClient, logInfo, registerIdentity } = require('../utils') async function createIdentity () { logInfo('Client initialization') @@ -11,6 +11,7 @@ async function createIdentity () { console.log() logInfo('Done') logInfo(`Identity: ${identity.toJSON().id}`) + return identity } createIdentity().catch(console.error) From c5bf3cb00eb3510164ebb29733eef4c755cf245c Mon Sep 17 00:00:00 2001 From: owl352 Date: Mon, 12 Aug 2024 12:52:35 +0500 Subject: [PATCH 3/8] logging fix, duplicate removed, format, exits removed --- .../src/actions/deployContract.js | 20 ++++++------- .../data-contract/src/actions/pushDocument.js | 28 ++++++++----------- .../src/actions/registerIdentity.js | 11 +++----- packages/data-contract/src/utils.js | 10 +------ 4 files changed, 25 insertions(+), 44 deletions(-) diff --git a/packages/data-contract/src/actions/deployContract.js b/packages/data-contract/src/actions/deployContract.js index 13e7ed356..add240cd8 100644 --- a/packages/data-contract/src/actions/deployContract.js +++ b/packages/data-contract/src/actions/deployContract.js @@ -1,29 +1,27 @@ require('dotenv').config() const schema = require('../../schema.json') -const { initClient, logInfo } = require('../utils') +const { initClient } = require('../utils') async function deployContract () { - logInfo('Client Initialization') + console.log('Deploying Contract') + const client = initClient() - logInfo('Getting Identity') if (!process.env.OWNER_IDENTIFIER) { - logInfo('No identity in env :(') - process.exit() + throw new Error('No identity in env :(') } const identity = await client.platform.identities.get(process.env.OWNER_IDENTIFIER) - logInfo(`Using: ${identity.toJSON().id}`) - logInfo('Contract Deployment') + console.log(`Using: ${identity.toJSON().id}`) + const contract = await client.platform.contracts.create(schema, identity) const deployedContract = await client.platform.contracts.publish(contract, identity) - console.log() - logInfo('All Done!') - logInfo(`Contract deployed at: ${deployedContract.getDataContract().getId()}`) - logInfo(`Used id: ${identity.toJSON().id}`) + console.log('All Done!') + console.log(`Contract deployed at: ${deployedContract.getDataContract().getId()}`) + console.log(`Used id: ${identity.toJSON().id}`) } deployContract().catch(console.error) diff --git a/packages/data-contract/src/actions/pushDocument.js b/packages/data-contract/src/actions/pushDocument.js index 3af697b45..0076f7257 100644 --- a/packages/data-contract/src/actions/pushDocument.js +++ b/packages/data-contract/src/actions/pushDocument.js @@ -1,33 +1,29 @@ require('dotenv').config() -const { initClient, logInfo } = require('../utils') +const { initClient } = require('../utils') const doc = require('../../document.json') async function pushDocument () { - logInfo('Client initialization') + console.log('Client initialization') + const { platform } = initClient() - logInfo('Getting identity') if (!process.env.OWNER_IDENTIFIER) { - logInfo('No identity in env :(') - process.exit() + throw new Error('No identity in env :(') } const identity = await platform.identities.get(process.env.OWNER_IDENTIFIER) if (!process.env.CONTRACT_ID) { - logInfo('No contract ID in env') - process.exit() + throw new Error('No contract ID in env') } if (!process.env.DOCUMENT_NAME) { - logInfo('No document name in env') - process.exit() + throw new Error('No document name in env') } - logInfo('Creating Document') const document = await platform.documents.create( - `contract.${process.env.DOCUMENT_NAME}`, - identity, - doc + `contract.${process.env.DOCUMENT_NAME}`, + identity, + doc ) const documentBatch = { create: [document], @@ -35,12 +31,10 @@ async function pushDocument () { delete: [] } - logInfo('Broadcasting Document') + console.log('Broadcasting Document') await platform.documents.broadcast(documentBatch, identity) - console.log() - logInfo('Done') - logInfo(`Document at: ${document.getId()}`) + console.log('Done', '\n', `Document at: ${document.getId()}`) } pushDocument().catch(console.error) diff --git a/packages/data-contract/src/actions/registerIdentity.js b/packages/data-contract/src/actions/registerIdentity.js index e38609a2a..bda16e3b5 100644 --- a/packages/data-contract/src/actions/registerIdentity.js +++ b/packages/data-contract/src/actions/registerIdentity.js @@ -1,16 +1,13 @@ require('dotenv').config() -const { initClient, logInfo, registerIdentity } = require('../utils') +const { initClient } = require('../utils') async function createIdentity () { - logInfo('Client initialization') + console.log('Creating Identity') const client = initClient() - logInfo('Registering new identity') - const identity = await registerIdentity(client) + const identity = await client.platform.identities.register() - console.log() - logInfo('Done') - logInfo(`Identity: ${identity.toJSON().id}`) + console.log('Done', '\n', `Identity: ${identity.toJSON().id}`) return identity } diff --git a/packages/data-contract/src/utils.js b/packages/data-contract/src/utils.js index 41d9b6f4e..306e08a4e 100644 --- a/packages/data-contract/src/utils.js +++ b/packages/data-contract/src/utils.js @@ -1,9 +1,5 @@ const Dash = require('dash') -function logInfo (...messages) { - console.log('\x1b[32m [INFO]', ...messages, '\x1b[0m ') -} - function initClient () { const options = { network: 'testnet', @@ -29,8 +25,4 @@ function initClient () { return client } -async function registerIdentity (client) { - return await client.platform.identities.register() -} - -module.exports = { initClient, logInfo, registerIdentity } +module.exports = { initClient } From fb1b5674c9d9dc313655be78e257fdc2f2a83f8f Mon Sep 17 00:00:00 2001 From: owl352 Date: Tue, 13 Aug 2024 15:14:31 +0500 Subject: [PATCH 4/8] fixes --- packages/data-contract/src/actions/pushDocument.js | 4 ++-- packages/data-contract/src/utils.js | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/data-contract/src/actions/pushDocument.js b/packages/data-contract/src/actions/pushDocument.js index 0076f7257..81afa662c 100644 --- a/packages/data-contract/src/actions/pushDocument.js +++ b/packages/data-contract/src/actions/pushDocument.js @@ -5,8 +5,6 @@ const doc = require('../../document.json') async function pushDocument () { console.log('Client initialization') - const { platform } = initClient() - if (!process.env.OWNER_IDENTIFIER) { throw new Error('No identity in env :(') } @@ -20,6 +18,8 @@ async function pushDocument () { throw new Error('No document name in env') } + const { platform } = initClient() + const document = await platform.documents.create( `contract.${process.env.DOCUMENT_NAME}`, identity, diff --git a/packages/data-contract/src/utils.js b/packages/data-contract/src/utils.js index 306e08a4e..9b9eba637 100644 --- a/packages/data-contract/src/utils.js +++ b/packages/data-contract/src/utils.js @@ -1,6 +1,11 @@ const Dash = require('dash') function initClient () { + + if(!process.env.MNEMONIC){ + throw new Error('Mnemonic not setted') + } + const options = { network: 'testnet', wallet: { @@ -21,8 +26,7 @@ function initClient () { } } - const client = new Dash.Client(options) - return client + return new Dash.Client(options) } module.exports = { initClient } From 5e4c3f38f31e916b8766553ca00c2307a428f452 Mon Sep 17 00:00:00 2001 From: owl352 Date: Tue, 13 Aug 2024 16:57:48 +0500 Subject: [PATCH 5/8] fix --- packages/data-contract/src/actions/pushDocument.js | 5 +++-- packages/data-contract/src/utils.js | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/data-contract/src/actions/pushDocument.js b/packages/data-contract/src/actions/pushDocument.js index 81afa662c..8d87a778d 100644 --- a/packages/data-contract/src/actions/pushDocument.js +++ b/packages/data-contract/src/actions/pushDocument.js @@ -8,8 +8,7 @@ async function pushDocument () { if (!process.env.OWNER_IDENTIFIER) { throw new Error('No identity in env :(') } - const identity = await platform.identities.get(process.env.OWNER_IDENTIFIER) - + if (!process.env.CONTRACT_ID) { throw new Error('No contract ID in env') } @@ -20,6 +19,8 @@ async function pushDocument () { const { platform } = initClient() + const identity = await platform.identities.get(process.env.OWNER_IDENTIFIER) + const document = await platform.documents.create( `contract.${process.env.DOCUMENT_NAME}`, identity, diff --git a/packages/data-contract/src/utils.js b/packages/data-contract/src/utils.js index 9b9eba637..c106c17ae 100644 --- a/packages/data-contract/src/utils.js +++ b/packages/data-contract/src/utils.js @@ -1,8 +1,7 @@ const Dash = require('dash') function initClient () { - - if(!process.env.MNEMONIC){ + if (!process.env.MNEMONIC) { throw new Error('Mnemonic not setted') } From d89c95edcfd877b5e0b2dad31c0f8b77918f5751 Mon Sep 17 00:00:00 2001 From: owl352 Date: Tue, 13 Aug 2024 16:57:55 +0500 Subject: [PATCH 6/8] lint --- packages/data-contract/src/actions/pushDocument.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/data-contract/src/actions/pushDocument.js b/packages/data-contract/src/actions/pushDocument.js index 8d87a778d..9bc12657b 100644 --- a/packages/data-contract/src/actions/pushDocument.js +++ b/packages/data-contract/src/actions/pushDocument.js @@ -8,7 +8,7 @@ async function pushDocument () { if (!process.env.OWNER_IDENTIFIER) { throw new Error('No identity in env :(') } - + if (!process.env.CONTRACT_ID) { throw new Error('No contract ID in env') } From 8e900fd80905611f38eeb294374471ef559612b7 Mon Sep 17 00:00:00 2001 From: owl352 Date: Wed, 14 Aug 2024 17:12:54 +0500 Subject: [PATCH 7/8] mnemonic validation moved to scripts. --- packages/data-contract/src/actions/deployContract.js | 6 +++++- packages/data-contract/src/actions/pushDocument.js | 4 ++++ packages/data-contract/src/actions/registerIdentity.js | 5 +++++ packages/data-contract/src/utils.js | 3 --- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/data-contract/src/actions/deployContract.js b/packages/data-contract/src/actions/deployContract.js index add240cd8..f43f30b31 100644 --- a/packages/data-contract/src/actions/deployContract.js +++ b/packages/data-contract/src/actions/deployContract.js @@ -6,12 +6,16 @@ const { initClient } = require('../utils') async function deployContract () { console.log('Deploying Contract') - const client = initClient() + if (!process.env.MNEMONIC) { + throw new Error('Mnemonic not setted') + } if (!process.env.OWNER_IDENTIFIER) { throw new Error('No identity in env :(') } + const client = initClient() + const identity = await client.platform.identities.get(process.env.OWNER_IDENTIFIER) console.log(`Using: ${identity.toJSON().id}`) diff --git a/packages/data-contract/src/actions/pushDocument.js b/packages/data-contract/src/actions/pushDocument.js index 9bc12657b..4269cd188 100644 --- a/packages/data-contract/src/actions/pushDocument.js +++ b/packages/data-contract/src/actions/pushDocument.js @@ -5,6 +5,10 @@ const doc = require('../../document.json') async function pushDocument () { console.log('Client initialization') + if (!process.env.MNEMONIC) { + throw new Error('Mnemonic not setted') + } + if (!process.env.OWNER_IDENTIFIER) { throw new Error('No identity in env :(') } diff --git a/packages/data-contract/src/actions/registerIdentity.js b/packages/data-contract/src/actions/registerIdentity.js index bda16e3b5..c76e0e97b 100644 --- a/packages/data-contract/src/actions/registerIdentity.js +++ b/packages/data-contract/src/actions/registerIdentity.js @@ -3,6 +3,11 @@ const { initClient } = require('../utils') async function createIdentity () { console.log('Creating Identity') + + if (!process.env.MNEMONIC) { + throw new Error('Mnemonic not setted') + } + const client = initClient() const identity = await client.platform.identities.register() diff --git a/packages/data-contract/src/utils.js b/packages/data-contract/src/utils.js index c106c17ae..201857150 100644 --- a/packages/data-contract/src/utils.js +++ b/packages/data-contract/src/utils.js @@ -1,9 +1,6 @@ const Dash = require('dash') function initClient () { - if (!process.env.MNEMONIC) { - throw new Error('Mnemonic not setted') - } const options = { network: 'testnet', From 7b4f49df6fd603c93e8745bd800f04e513503212 Mon Sep 17 00:00:00 2001 From: owl352 Date: Wed, 14 Aug 2024 17:14:17 +0500 Subject: [PATCH 8/8] lint --- packages/data-contract/src/utils.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/data-contract/src/utils.js b/packages/data-contract/src/utils.js index 201857150..1271053bf 100644 --- a/packages/data-contract/src/utils.js +++ b/packages/data-contract/src/utils.js @@ -1,7 +1,6 @@ const Dash = require('dash') function initClient () { - const options = { network: 'testnet', wallet: {