@boostxyz/cli 1.1.0-alpha.34
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/LICENSE +674 -0
- package/README.md +162 -0
- package/dist/cli.cjs +27 -0
- package/dist/cli.js +99 -0
- package/dist/commands/deploy.cjs +1 -0
- package/dist/commands/deploy.js +10141 -0
- package/dist/commands/seed.cjs +2 -0
- package/dist/commands/seed.js +947 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +9 -0
- package/dist/utils-D0bdHF2y.js +64 -0
- package/dist/utils-DX4pZJ98.cjs +3 -0
- package/package.json +56 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./commands/deploy.cjs"),o=require("./commands/seed.cjs"),d={deploy:e.deploy,seed:o.seed};exports.commands=d;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { createConfig as l } from "/home/runner/work/boost-protocol/boost-protocol/node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__rf4knvbttxkigkqzlfrm4rcvsi/node_modules/@wagmi/core/dist/esm/exports/index.js";
|
|
2
|
+
import { createTestClient as h, http as s, publicActions as u, walletActions as f, createWalletClient as d } from "/home/runner/work/boost-protocol/boost-protocol/node_modules/.pnpm/viem@2.21.16_bufferutil@4.0.8_typescript@5.6.2_utf-8-validate@6.0.4_zod@3.23.8/node_modules/viem/_esm/index.js";
|
|
3
|
+
import { privateKeyToAccount as p, mnemonicToAccount as m } from "/home/runner/work/boost-protocol/boost-protocol/node_modules/.pnpm/viem@2.21.16_bufferutil@4.0.8_typescript@5.6.2_utf-8-validate@6.0.4_zod@3.23.8/node_modules/viem/_esm/accounts/index.js";
|
|
4
|
+
import * as g from "/home/runner/work/boost-protocol/boost-protocol/node_modules/.pnpm/viem@2.21.16_bufferutil@4.0.8_typescript@5.6.2_utf-8-validate@6.0.4_zod@3.23.8/node_modules/viem/_esm/chains/index.js";
|
|
5
|
+
const i = g;
|
|
6
|
+
function b(r) {
|
|
7
|
+
return Object.entries(r).reduce((e, [o, n]) => `${e}${o}=${JSON.stringify(n)}
|
|
8
|
+
`, "");
|
|
9
|
+
}
|
|
10
|
+
function x(r) {
|
|
11
|
+
return r.split(`
|
|
12
|
+
`).reduce(
|
|
13
|
+
(e, o) => {
|
|
14
|
+
let [n, t] = o.split("=");
|
|
15
|
+
if (!n || !t) return e;
|
|
16
|
+
try {
|
|
17
|
+
t = JSON.parse(t);
|
|
18
|
+
} catch {
|
|
19
|
+
}
|
|
20
|
+
return e[n] = t, e;
|
|
21
|
+
},
|
|
22
|
+
{}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
function T(r) {
|
|
26
|
+
try {
|
|
27
|
+
return JSON.parse(r);
|
|
28
|
+
} catch {
|
|
29
|
+
return !1;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function A({
|
|
33
|
+
chain: r,
|
|
34
|
+
privateKey: e,
|
|
35
|
+
mnemonic: o,
|
|
36
|
+
rpcUrl: n
|
|
37
|
+
}) {
|
|
38
|
+
const t = i[r];
|
|
39
|
+
if (!t) throw new Error(`No matching chain for ${t}`);
|
|
40
|
+
const a = e ? p(e) : m(o, { addressIndex: 0 });
|
|
41
|
+
let c;
|
|
42
|
+
return t === i.hardhat || t === i.anvil ? c = h({
|
|
43
|
+
transport: s(n ?? "http://127.0.0.1:8545", { retryCount: 0 }),
|
|
44
|
+
chain: t,
|
|
45
|
+
mode: t === i.hardhat ? "hardhat" : "anvil",
|
|
46
|
+
account: a,
|
|
47
|
+
key: e
|
|
48
|
+
}).extend(u).extend(f) : c = d({
|
|
49
|
+
account: a,
|
|
50
|
+
chain: t,
|
|
51
|
+
transport: n ? s(n, { retryCount: 0 }) : s()
|
|
52
|
+
}).extend(u), [{ config: l({
|
|
53
|
+
chains: [t],
|
|
54
|
+
// biome-ignore lint/suspicious/noExplicitAny: Client will not be undefined
|
|
55
|
+
client: () => c
|
|
56
|
+
}), account: a }, t];
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
i as C,
|
|
60
|
+
x as e,
|
|
61
|
+
A as g,
|
|
62
|
+
b as o,
|
|
63
|
+
T as v
|
|
64
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";const l=require("/home/runner/work/boost-protocol/boost-protocol/node_modules/.pnpm/@wagmi+core@2.13.8_@tanstack+query-core@5.32.0_@types+react@18.3.0_immer@10.0.2_react@18.3.0__rf4knvbttxkigkqzlfrm4rcvsi/node_modules/@wagmi/core/dist/esm/exports/index.js"),c=require("/home/runner/work/boost-protocol/boost-protocol/node_modules/.pnpm/viem@2.21.16_bufferutil@4.0.8_typescript@5.6.2_utf-8-validate@6.0.4_zod@3.23.8/node_modules/viem/_esm/index.js"),u=require("/home/runner/work/boost-protocol/boost-protocol/node_modules/.pnpm/viem@2.21.16_bufferutil@4.0.8_typescript@5.6.2_utf-8-validate@6.0.4_zod@3.23.8/node_modules/viem/_esm/accounts/index.js"),d=require("/home/runner/work/boost-protocol/boost-protocol/node_modules/.pnpm/viem@2.21.16_bufferutil@4.0.8_typescript@5.6.2_utf-8-validate@6.0.4_zod@3.23.8/node_modules/viem/_esm/chains/index.js");function f(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>n[o]})}}return t.default=n,Object.freeze(t)}const h=f(d),i=h;function p(n){return Object.entries(n).reduce((t,[o,r])=>`${t}${o}=${JSON.stringify(r)}
|
|
2
|
+
`,"")}function b(n){return n.split(`
|
|
3
|
+
`).reduce((t,o)=>{let[r,e]=o.split("=");if(!r||!e)return t;try{e=JSON.parse(e)}catch{}return t[r]=e,t},{})}function O(n){try{return JSON.parse(n)}catch{return!1}}function g({chain:n,privateKey:t,mnemonic:o,rpcUrl:r}){const e=i[n];if(!e)throw new Error(`No matching chain for ${e}`);const a=t?u.privateKeyToAccount(t):u.mnemonicToAccount(o,{addressIndex:0});let s;return e===i.hardhat||e===i.anvil?s=c.createTestClient({transport:c.http(r??"http://127.0.0.1:8545",{retryCount:0}),chain:e,mode:e===i.hardhat?"hardhat":"anvil",account:a,key:t}).extend(c.publicActions).extend(c.walletActions):s=c.createWalletClient({account:a,chain:e,transport:r?c.http(r,{retryCount:0}):c.http()}).extend(c.publicActions),[{config:l.createConfig({chains:[e],client:()=>s}),account:a},e]}exports.Chains=i;exports.envToObject=b;exports.getDeployableOptions=g;exports.objectToEnv=p;exports.validateJson=O;
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@boostxyz/cli",
|
|
3
|
+
"version": "1.1.0-alpha.34",
|
|
4
|
+
"description": "A repository of useful scripts to interact with the protocol",
|
|
5
|
+
"repository": "https://github.com/boostxyz/boost-protocol",
|
|
6
|
+
"author": "Boost Team<boost-team@boost.xyz>",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"main": "dist/index.cjs",
|
|
12
|
+
"module": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"typings": "./dist/index.d.ts",
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"bin": {
|
|
17
|
+
"boost": "dist/cli.js"
|
|
18
|
+
},
|
|
19
|
+
"access": "public",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"require": "./dist/index.cjs",
|
|
23
|
+
"import": "./dist/index.js",
|
|
24
|
+
"node": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts"
|
|
26
|
+
},
|
|
27
|
+
"./cli": {
|
|
28
|
+
"require": "./dist/cli.cjs",
|
|
29
|
+
"import": "./dist/cli.js",
|
|
30
|
+
"node": "./dist/cli.js",
|
|
31
|
+
"types": "./dist/cli.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./commands/deploy": {
|
|
34
|
+
"require": "./dist/commands/deploy.cjs",
|
|
35
|
+
"import": "./dist/commands/deploy.js",
|
|
36
|
+
"node": "./dist/commands/deploy.js",
|
|
37
|
+
"types": "./dist/commands/deploy.d.ts"
|
|
38
|
+
},
|
|
39
|
+
"./commands/seed": {
|
|
40
|
+
"require": "./dist/commands/seed.cjs",
|
|
41
|
+
"import": "./dist/commands/seed.js",
|
|
42
|
+
"node": "./dist/commands/seed.js",
|
|
43
|
+
"types": "./dist/commands/seed.d.ts"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"license": "GPL-3.0-or-later",
|
|
47
|
+
"optionalDependencies": {
|
|
48
|
+
"@boostxyz/sdk": "2.0.0-alpha.33"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "vite build",
|
|
52
|
+
"check:ts": "tsc --build --emitDeclarationOnly --declaration --declarationMap --force",
|
|
53
|
+
"dev": "vite build --watch",
|
|
54
|
+
"clean": "rm -rf dist"
|
|
55
|
+
}
|
|
56
|
+
}
|