Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
33580b9
initial
elee1766 Apr 30, 2025
f187e20
correct interface check
elee1766 May 1, 2025
bb66299
noot
elee1766 May 5, 2025
6cd1643
noot
elee1766 May 5, 2025
78a4768
noot
elee1766 May 5, 2025
6daf8df
noot
elee1766 May 5, 2025
69a203c
noot
elee1766 May 5, 2025
b8f97a4
remove debug lines
elee1766 May 5, 2025
17f6300
noot
elee1766 May 6, 2025
01761ae
noot
elee1766 May 6, 2025
a8247ba
Update package.json
elee1766 May 6, 2025
610790e
Merge branch 'main' into feature/ntt-owner-support
elee1766 May 23, 2025
b4d0b92
this might work
elee1766 May 23, 2025
66f7ff2
prepublish
elee1766 May 23, 2025
fda513c
add ethers
elee1766 May 23, 2025
25accb9
noot
elee1766 May 28, 2025
502993b
Merge branch 'main' into feature/node-compatible-cli
elee1766 May 28, 2025
f2d44b7
ok
elee1766 Jun 4, 2025
6f2938b
noot
elee1766 Jun 4, 2025
03d7bab
noot
elee1766 Jun 4, 2025
93813bb
noot
elee1766 Jun 4, 2025
cec323f
more changes
elee1766 Jun 4, 2025
8c49bf4
noot
elee1766 Jun 4, 2025
46d9031
ci fix maybe
elee1766 Jun 6, 2025
82a305e
maybe fix ci
elee1766 Jun 6, 2025
8d60ab0
oops
elee1766 Jun 6, 2025
ee0c767
dont import pkg
elee1766 Jun 6, 2025
03a4879
forgot to change one
elee1766 Jun 6, 2025
f438259
noot
elee1766 Jun 6, 2025
c1cc1f2
noot
elee1766 Jun 6, 2025
6739823
noot
elee1766 Jun 7, 2025
c376c7c
merge
elee1766 Jun 7, 2025
2a13a01
merge main
elee1766 Jun 7, 2025
59a16b6
noot
elee1766 Jun 7, 2025
48c9ab0
noot
elee1766 Jun 7, 2025
bdca3bc
noot
elee1766 Jun 7, 2025
991602a
noot
elee1766 Jun 7, 2025
0d287b1
noot
elee1766 Jun 7, 2025
44f6d02
this passes im praying
elee1766 Jun 12, 2025
172d30b
noot
elee1766 Jun 12, 2025
79dbefd
merge
elee1766 Jun 12, 2025
4bd8629
noot
elee1766 Jun 12, 2025
1184136
show compilation progress
elee1766 Jun 12, 2025
78d259d
show compilation progress
elee1766 Jun 12, 2025
f4a81ba
show compilation progress
elee1766 Jun 12, 2025
d68b7c3
noot
elee1766 Jun 12, 2025
2b07ede
noot
elee1766 Jun 12, 2025
5c7b033
cjs/esm compatibility
elee1766 Jun 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Dockerfile.cli
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ RUN apt install -y git
RUN apt install -y curl
RUN apt install -y unzip

RUN curl -fsSL https://bun.sh/install | bash

RUN curl -L https://foundry.paradigm.xyz | bash
RUN bash -ci "foundryup"

Expand All @@ -31,7 +29,7 @@ FROM base as cli-remote
# This build stage tests that path.
COPY cli/install.sh cli/install.sh
RUN bash -ci "./cli/install.sh"
RUN bash -ci "which ntt"
RUN bash -ci "which ntt-cli"

FROM base-solana as cli-local
# NOTE: when invoking the installer inside of the source tree, it installs from
Expand All @@ -47,13 +45,16 @@ COPY sdk sdk
COPY solana/package.json solana/package.json
COPY solana/ts solana/ts
COPY evm/ts evm/ts
COPY evm/script evm/script
COPY solana/tsconfig.*.json solana/
COPY cli/package.json cli/package.json
COPY cli/package-lock.json cli/package-lock.json
COPY cli/src cli/src
COPY cli/rollup.config.js cli/rollup.config.js
COPY cli/tsconfig.json cli/tsconfig.json
COPY cli/bin.cjs cli/bin.cjs
COPY cli/install.sh cli/install.sh
RUN bash -ci "./cli/install.sh"
RUN bash -ci "which ntt"
RUN bash -ci "which ntt-cli"

FROM cli-local as cli-local-test
COPY cli/test cli/test
Expand All @@ -63,6 +64,6 @@ RUN bash -ci "./cli/test/sepolia-bsc.sh"
FROM cli-local as cli-local-test-solana
COPY cli/test cli/test
# evm/script needed for the cli, at least for now
COPY evm/script evm/script
COPY solana solana
COPY evm/script evm/script
RUN bash -ci "./cli/test/solana.sh --use-tmp-dir"
3,276 changes: 0 additions & 3,276 deletions bun.lock

This file was deleted.

6 changes: 6 additions & 0 deletions cli/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
script
buffer.json
.deployment
.deployments
overrides.json
keys

deployment.json
*deployment.json
Expand Down
4 changes: 4 additions & 0 deletions cli/bin.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env node

const {YargsCommand} = require('@wormhole-foundation/ntt-cli');
YargsCommand.parse()
3 changes: 3 additions & 0 deletions cli/bin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env tsx
import {YargsCommand} from "./src"
YargsCommand.parse()
Binary file removed cli/bun.lockb
Binary file not shown.
47 changes: 11 additions & 36 deletions cli/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

set -euo pipefail

# check that 'bun' is installed
# check that 'npm' is installed

if ! command -v bun > /dev/null; then
echo "bun is not installed. Follow the instructions at https://bun.sh/docs/installation"
if ! command -v npm > /dev/null; then
echo "npm is not installed."
exit 1
fi

Expand Down Expand Up @@ -121,44 +121,19 @@ function install_cli {

# if 'ntt' is already installed, uninstall it
# just check with 'which'
if which ntt > /dev/null; then
if which ntt-cli > /dev/null; then
echo "Removing existing ntt CLI"
rm $(which ntt)
rm $(which ntt-cli)
fi

# swallow the output of the first install
# TODO: figure out why it fails the first time.
bun install > /dev/null 2>&1 || true
bun install

# make a temporary directory

tmpdir="$(mktemp -d)"

# create a temporary symlink 'npm' to 'bun'

ln -s "$(command -v bun)" "$tmpdir/npm"

# add the temporary directory to the PATH

export PATH="$tmpdir:$PATH"

# swallow the output of the first build
# TODO: figure out why it fails the first time.
bun --bun run --filter '*' build > /dev/null 2>&1 || true
bun --bun run --filter '*' build

# remove the temporary directory

rm -r "$tmpdir"

# now link the CLI

npm install
npm link
npm run build
# pack the cli
cd cli

bun link

bun link @wormhole-foundation/ntt-cli
mv $(npm pack) out.tgz
npm i -g out.tgz
}

main "$@"
250 changes: 0 additions & 250 deletions cli/package-lock.json

This file was deleted.

Loading
Loading