@harmoniclabs/pebble-cli 0.1.0 → 0.1.1-dev0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#!/
|
|
1
|
+
#!/bin/sh
|
|
2
2
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
#!/
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
':'; //# ; command -v bun >/dev/null 2>&1 && exec bun "$0" "$@" || exec node "$0" "$@"
|
|
2
3
|
import { Command } from "commander";
|
|
3
4
|
import { PEBBLE_VERSION, PEBBLE_LIB_VERSION, PEBBLE_COMMIT_HASH } from "./version.generated.js";
|
|
4
5
|
import { initPebbleProject } from "./init/initPebbleProject.js";
|
|
@@ -162,9 +162,8 @@ ${includeOffchain ? "- `offchain/`: optional offchain scaffolding\n" : ""}
|
|
|
162
162
|
await writeFile(pkgPath, JSON.stringify(pkgJson, null, 2) + "\n");
|
|
163
163
|
// src/index.pebble template
|
|
164
164
|
const indexPebblePath = path.join(srcDir, "index.pebble");
|
|
165
|
-
const indexPebble = (
|
|
166
|
-
//
|
|
167
|
-
// a simple always failing contract is generated
|
|
165
|
+
const indexPebble = (`// if no methods are defined
|
|
166
|
+
// the contract is interpreted as always failing
|
|
168
167
|
contract MyContract {
|
|
169
168
|
|
|
170
169
|
param owner: PubKeyHash;
|
|
@@ -172,7 +171,7 @@ contract MyContract {
|
|
|
172
171
|
spend ownerAllowsIt() {
|
|
173
172
|
const { tx } = context;
|
|
174
173
|
|
|
175
|
-
assert tx.
|
|
174
|
+
assert tx.requiredSigners.includes( this.owner );
|
|
176
175
|
}
|
|
177
176
|
|
|
178
177
|
spend sendToOwner( amount: int ) {
|
|
@@ -182,7 +181,7 @@ contract MyContract {
|
|
|
182
181
|
|
|
183
182
|
const output = tx.outputs[0];
|
|
184
183
|
|
|
185
|
-
assert output.address.
|
|
184
|
+
assert output.address.payment.hash() == this.owner;
|
|
186
185
|
assert output.value.lovelaces() >= amount;
|
|
187
186
|
}
|
|
188
187
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const PEBBLE_VERSION = "0.1.
|
|
2
|
-
export declare const PEBBLE_LIB_VERSION = "0.1.
|
|
3
|
-
export declare const PEBBLE_COMMIT_HASH = "
|
|
1
|
+
export declare const PEBBLE_VERSION = "0.1.1-dev0";
|
|
2
|
+
export declare const PEBBLE_LIB_VERSION = "0.1.1";
|
|
3
|
+
export declare const PEBBLE_COMMIT_HASH = "61b900fbd67de7283a60e45c9a98516fa4660d53";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// This file is auto-generated by scripts/genVersions.js. Do not edit.
|
|
2
|
-
export const PEBBLE_VERSION = "0.1.
|
|
3
|
-
export const PEBBLE_LIB_VERSION = "0.1.
|
|
4
|
-
export const PEBBLE_COMMIT_HASH = "
|
|
2
|
+
export const PEBBLE_VERSION = "0.1.1-dev0";
|
|
3
|
+
export const PEBBLE_LIB_VERSION = "0.1.1";
|
|
4
|
+
export const PEBBLE_COMMIT_HASH = "61b900fbd67de7283a60e45c9a98516fa4660d53";
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@harmoniclabs/pebble-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1-dev0",
|
|
4
4
|
"description": "A simple, yet rock solid, functional language with an imperative bias, targeting UPLC",
|
|
5
|
-
"bin":
|
|
5
|
+
"bin": {
|
|
6
|
+
"pebble": "./dist/index.js",
|
|
7
|
+
"pebble-cli": "./dist/index.js"
|
|
8
|
+
},
|
|
6
9
|
"types": "./dist/index.d.ts",
|
|
7
10
|
"engines": {
|
|
8
11
|
"node": ">=22",
|
|
@@ -47,7 +50,7 @@
|
|
|
47
50
|
"dependencies": {
|
|
48
51
|
"@harmoniclabs/crypto": "^0.3.0",
|
|
49
52
|
"@harmoniclabs/obj-utils": "^1.0.0",
|
|
50
|
-
"@harmoniclabs/pebble": "^0.1.
|
|
53
|
+
"@harmoniclabs/pebble": "^0.1.1",
|
|
51
54
|
"@harmoniclabs/plutus-machine": "^2.1.1",
|
|
52
55
|
"@harmoniclabs/uint8array-utils": "^1.0.4",
|
|
53
56
|
"@harmoniclabs/uplc": "^1.4.0",
|