Skip to content

Commit f6a2ba6

Browse files
committed
upload: packages to NPM
1 parent 39b97ea commit f6a2ba6

File tree

28 files changed

+178
-183
lines changed

28 files changed

+178
-183
lines changed

bridge-contract/package-lock.json

+21-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bridge-contract/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nacho-bridge-contract",
3-
"version": "0.1.4",
3+
"version": "0.1.10",
44
"type": "module",
55
"main": "build/src/index.js",
66
"types": "build/src/index.d.ts",
@@ -12,10 +12,10 @@
1212
"build": "rm -rf build/ && tsc"
1313
},
1414
"dependencies": {
15-
"nacho-common-o1js": "^0.1.8",
16-
"nacho-proof-generator": "^0.1.7",
17-
"nacho-rollup-contract": "^0.1.5",
18-
"nacho-token-contract": "^0.1.1",
15+
"nacho-common-o1js": "^0.1.10",
16+
"nacho-proof-generator": "^0.1.10",
17+
"nacho-rollup-contract": "^0.1.10",
18+
"nacho-token-contract": "^0.2.0",
1919
"o1js": "^0.17.0"
2020
},
2121
"devDependencies": {

common-o1js/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common-o1js/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nacho-common-o1js",
3-
"version": "0.1.8",
3+
"version": "0.1.10",
44
"type": "module",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",

event-fetcher-process/package-lock.json

+26-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

event-fetcher-process/package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "nacho-event-fetcher-process",
33
"version": "0.1.0",
4-
"private": true,
54
"type": "module",
65
"files": [
76
"build"
@@ -10,8 +9,8 @@
109
"build": "rimraf build/ && tsc && rollup --config"
1110
},
1211
"dependencies": {
13-
"nacho-common-o1js": "^0.1.8",
14-
"nacho-bridge-contract": "^0.1.2",
12+
"nacho-common-o1js": "^0.1.10",
13+
"nacho-bridge-contract": "^0.1.10",
1514
"o1js": "^0.17.0"
1615
},
1716
"devDependencies": {

event-fetcher-process/src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { BridgeContract } from "nacho-bridge-contract"
55
import { Mina, PublicKey } from "o1js"
66
import { unparseError, unparseOutput } from "./output"
77

8-
const minaNodeUrl = process.argv.at(2)
9-
const bridgeContractAddress = process.argv.at(3)
8+
const minaNodeUrl = process.env.NACHO_MINA_NODE_URL
9+
const bridgeContractAddress = process.env.NACHO_BRIDGE_CONTRACT_ADDRESS
1010

1111
if (minaNodeUrl === undefined || bridgeContractAddress === undefined) {
1212
process.exit(1)

proof-generator-process/package-lock.json

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proof-generator-process/package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "nacho-proof-generator-process",
33
"version": "0.1.0",
4-
"private": true,
54
"type": "module",
65
"files": [
76
"build"
@@ -10,8 +9,8 @@
109
"build": "rimraf build/ && tsc && rollup --config"
1110
},
1211
"dependencies": {
13-
"nacho-common-o1js": "^0.1.8",
14-
"nacho-proof-generator": "^0.1.7",
12+
"nacho-common-o1js": "^0.1.10",
13+
"nacho-proof-generator": "^0.1.10",
1514
"o1js": "^0.17.0"
1615
},
1716
"devDependencies": {

proof-generator-process/src/index.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import {
1313
import { saveProofToDisk } from "./utils"
1414
import { proofGenerator } from "nacho-proof-generator"
1515

16-
const proofDbPath = process.argv.at(2)
16+
const proofsPath = process.env.NACHO_PROOFS_PATH
1717

18-
if (proofDbPath === undefined) {
18+
if (proofsPath === undefined) {
1919
process.exit(1)
2020
}
2121

@@ -30,23 +30,23 @@ stdin.on("data", async (chunk) => {
3030
input.kind === "CreateGenesis"
3131
? await createGenesis(input)
3232
: input.kind === "DepositTokens"
33-
? await depositTokens(input, proofDbPath)
33+
? await depositTokens(input, proofsPath)
3434
: input.kind === "BurnTokens"
35-
? await makeBurnTokens(input, proofDbPath)
35+
? await makeBurnTokens(input, proofsPath)
3636
: input.kind === "CreatePool"
37-
? await makeCreatePool(input, proofDbPath)
37+
? await makeCreatePool(input, proofsPath)
3838
: input.kind === "ProvideLiquidity"
39-
? await makeProvideLiquidity(input, proofDbPath)
39+
? await makeProvideLiquidity(input, proofsPath)
4040
: input.kind === "RemoveLiquidity"
41-
? await makeRemoveLiquidity(input, proofDbPath)
41+
? await makeRemoveLiquidity(input, proofsPath)
4242
: input.kind === "BuyTokens"
43-
? await makeBuyTokens(input, proofDbPath)
43+
? await makeBuyTokens(input, proofsPath)
4444
: input.kind === "SellTokens"
45-
? await makeSellTokens(input, proofDbPath)
45+
? await makeSellTokens(input, proofsPath)
4646
: null
4747

4848
if (input.kind === "CreateGenesis") {
49-
await saveProofToDisk(proofDbPath, 0n, proof!)
49+
await saveProofToDisk(proofsPath, 0n, proof!)
5050
} else if (
5151
input.kind === "DepositTokens" ||
5252
input.kind === "BurnTokens" ||
@@ -56,7 +56,7 @@ stdin.on("data", async (chunk) => {
5656
input.kind === "BuyTokens" ||
5757
input.kind === "SellTokens"
5858
) {
59-
await saveProofToDisk(proofDbPath, input.earlier_proof_index + 1n, proof!)
59+
await saveProofToDisk(proofsPath, input.earlier_proof_index + 1n, proof!)
6060
}
6161

6262
const buffer = new ArrayBuffer(1)

0 commit comments

Comments
 (0)