Skip to content

Commit

Permalink
upload: packages to NPM
Browse files Browse the repository at this point in the history
  • Loading branch information
berzanorg committed Apr 30, 2024
1 parent 39b97ea commit f6a2ba6
Show file tree
Hide file tree
Showing 28 changed files with 178 additions and 183 deletions.
42 changes: 21 additions & 21 deletions bridge-contract/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions bridge-contract/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nacho-bridge-contract",
"version": "0.1.4",
"version": "0.1.10",
"type": "module",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand All @@ -12,10 +12,10 @@
"build": "rm -rf build/ && tsc"
},
"dependencies": {
"nacho-common-o1js": "^0.1.8",
"nacho-proof-generator": "^0.1.7",
"nacho-rollup-contract": "^0.1.5",
"nacho-token-contract": "^0.1.1",
"nacho-common-o1js": "^0.1.10",
"nacho-proof-generator": "^0.1.10",
"nacho-rollup-contract": "^0.1.10",
"nacho-token-contract": "^0.2.0",
"o1js": "^0.17.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions common-o1js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common-o1js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nacho-common-o1js",
"version": "0.1.8",
"version": "0.1.10",
"type": "module",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
52 changes: 26 additions & 26 deletions event-fetcher-process/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions event-fetcher-process/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "nacho-event-fetcher-process",
"version": "0.1.0",
"private": true,
"type": "module",
"files": [
"build"
Expand All @@ -10,8 +9,8 @@
"build": "rimraf build/ && tsc && rollup --config"
},
"dependencies": {
"nacho-common-o1js": "^0.1.8",
"nacho-bridge-contract": "^0.1.2",
"nacho-common-o1js": "^0.1.10",
"nacho-bridge-contract": "^0.1.10",
"o1js": "^0.17.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions event-fetcher-process/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { BridgeContract } from "nacho-bridge-contract"
import { Mina, PublicKey } from "o1js"
import { unparseError, unparseOutput } from "./output"

const minaNodeUrl = process.argv.at(2)
const bridgeContractAddress = process.argv.at(3)
const minaNodeUrl = process.env.NACHO_MINA_NODE_URL
const bridgeContractAddress = process.env.NACHO_BRIDGE_CONTRACT_ADDRESS

if (minaNodeUrl === undefined || bridgeContractAddress === undefined) {
process.exit(1)
Expand Down
18 changes: 9 additions & 9 deletions proof-generator-process/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions proof-generator-process/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "nacho-proof-generator-process",
"version": "0.1.0",
"private": true,
"type": "module",
"files": [
"build"
Expand All @@ -10,8 +9,8 @@
"build": "rimraf build/ && tsc && rollup --config"
},
"dependencies": {
"nacho-common-o1js": "^0.1.8",
"nacho-proof-generator": "^0.1.7",
"nacho-common-o1js": "^0.1.10",
"nacho-proof-generator": "^0.1.10",
"o1js": "^0.17.0"
},
"devDependencies": {
Expand Down
22 changes: 11 additions & 11 deletions proof-generator-process/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import {
import { saveProofToDisk } from "./utils"
import { proofGenerator } from "nacho-proof-generator"

const proofDbPath = process.argv.at(2)
const proofsPath = process.env.NACHO_PROOFS_PATH

if (proofDbPath === undefined) {
if (proofsPath === undefined) {
process.exit(1)
}

Expand All @@ -30,23 +30,23 @@ stdin.on("data", async (chunk) => {
input.kind === "CreateGenesis"
? await createGenesis(input)
: input.kind === "DepositTokens"
? await depositTokens(input, proofDbPath)
? await depositTokens(input, proofsPath)
: input.kind === "BurnTokens"
? await makeBurnTokens(input, proofDbPath)
? await makeBurnTokens(input, proofsPath)
: input.kind === "CreatePool"
? await makeCreatePool(input, proofDbPath)
? await makeCreatePool(input, proofsPath)
: input.kind === "ProvideLiquidity"
? await makeProvideLiquidity(input, proofDbPath)
? await makeProvideLiquidity(input, proofsPath)
: input.kind === "RemoveLiquidity"
? await makeRemoveLiquidity(input, proofDbPath)
? await makeRemoveLiquidity(input, proofsPath)
: input.kind === "BuyTokens"
? await makeBuyTokens(input, proofDbPath)
? await makeBuyTokens(input, proofsPath)
: input.kind === "SellTokens"
? await makeSellTokens(input, proofDbPath)
? await makeSellTokens(input, proofsPath)
: null

if (input.kind === "CreateGenesis") {
await saveProofToDisk(proofDbPath, 0n, proof!)
await saveProofToDisk(proofsPath, 0n, proof!)
} else if (
input.kind === "DepositTokens" ||
input.kind === "BurnTokens" ||
Expand All @@ -56,7 +56,7 @@ stdin.on("data", async (chunk) => {
input.kind === "BuyTokens" ||
input.kind === "SellTokens"
) {
await saveProofToDisk(proofDbPath, input.earlier_proof_index + 1n, proof!)
await saveProofToDisk(proofsPath, input.earlier_proof_index + 1n, proof!)
}

const buffer = new ArrayBuffer(1)
Expand Down
Loading

0 comments on commit f6a2ba6

Please sign in to comment.