From ead7e2bf7da437a053226f65b7aa314bdd12c059 Mon Sep 17 00:00:00 2001 From: Julian Gruber Date: Wed, 20 Nov 2024 10:35:34 +0100 Subject: [PATCH] add cli --- README.md | 9 +++++++++ bin/spark-impact-evaluator.js | 5 +++++ package.json | 3 +++ 3 files changed, 17 insertions(+) create mode 100755 bin/spark-impact-evaluator.js diff --git a/README.md b/README.md index b0ef9eb..7428bfb 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,15 @@ console.log({ }) ``` +## Node.js CLI + +The CLI prints the current contract address. + +```console +$ spark-impact-evaluator +0x8460766edc62b525fc1fa4d628fc79229dc73031 +``` + ## Deployment Contracts can be deployed using the `forge cli` or using a rust deployment diff --git a/bin/spark-impact-evaluator.js b/bin/spark-impact-evaluator.js new file mode 100755 index 0000000..c147439 --- /dev/null +++ b/bin/spark-impact-evaluator.js @@ -0,0 +1,5 @@ +#!/usr/bin/env node + +import { ADDRESS } from '../index.js' + +process.stdout.end(ADDRESS) diff --git a/package.json b/package.json index 395408b..43c8bcb 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,9 @@ "scripts": { "test": "echo No tests" }, + "bin": { + "spark-impact-evaluator": "./bin/spark-impact-evaluator.js" + }, "publishConfig": { "access": "public" },