Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
--workspace sdk/definitions \
--workspace evm/ts \
--workspace solana \
--workspace stacks \
--workspace sui \
--workspace sdk/route
# OIDC authentication is used automatically by npm CLI 11.5.1+
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.cli
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ COPY solana/package.json solana/package.json
COPY solana/ts solana/ts
COPY evm/ts evm/ts
COPY solana/tsconfig.*.json solana/
COPY stacks/ts stacks/ts
COPY sui/ts sui/ts
COPY cli/package.json cli/package.json
COPY cli/package-lock.json cli/package-lock.json
Expand Down
12 changes: 8 additions & 4 deletions cli/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,14 @@ function install_cli {

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
# Build in dependency order:
# 1. definitions has no internal deps
# 2. platform-specific packages depend on definitions
# 3. route depends on platform-specific packages
# 4. cli depends on route
bun --bun run --filter '@wormhole-foundation/sdk-definitions-ntt' build
bun --bun run --filter '@wormhole-foundation/sdk-evm-ntt' --filter '@wormhole-foundation/sdk-solana-ntt' --filter '@wormhole-foundation/sdk-stacks-ntt' --filter '@wormhole-foundation/sdk-sui-ntt' build
bun --bun run --filter '@wormhole-foundation/sdk-route-ntt' build

# remove the temporary directory

Expand Down
6 changes: 6 additions & 0 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
"@wormhole-foundation/sdk-solana": "^4.7.0",
"@wormhole-foundation/sdk-solana-core": "^4.7.0"
},
"@wormhole-foundation/sdk-stacks-ntt": {
"@wormhole-foundation/sdk-base": "^4.7.0",
"@wormhole-foundation/sdk-definitions": "^4.7.0",
"@wormhole-foundation/sdk-stacks": "^4.7.0",
"@wormhole-foundation/sdk-stacks-core": "^4.7.0"
},
"@wormhole-foundation/sdk-sui-ntt": {
"@wormhole-foundation/sdk-base": "^4.7.0",
"@wormhole-foundation/sdk-definitions": "^4.7.0",
Expand Down
2 changes: 2 additions & 0 deletions evm/ts/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Evm Ntt Implementation

> **Note:** These are low-level protocol classes. If you are trying to perform a transfer, use the higher-level Route abstractions such as [`NttExecutorRoute`](../../sdk/route/src/executor/executor.ts) instead.

# Building

Make sure the Evm contracts are build with `npm run build:deps` and the bindings are generated with `npm run generate`
8 changes: 6 additions & 2 deletions evm/ts/src/ntt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,11 @@ export class EvmNtt<N extends Network, C extends EvmChains>
}

// TODO: should this be some map of idx to transceiver?
async *redeem(attestations: Ntt.Attestation[]) {
async *redeem(
attestations: Ntt.Attestation[],
payer: AccountAddress<C>,
recipient?: AccountAddress<C>
) {
if (attestations.length !== this.xcvrs.length)
throw new Error(
"Not enough attestations for the registered Transceivers"
Expand Down Expand Up @@ -648,7 +652,7 @@ export class EvmNtt<N extends Network, C extends EvmChains>
async *completeInboundQueuedTransfer(
fromChain: Chain,
transceiverMessage: Ntt.Message,
payer?: AccountAddress<C>
payer: AccountAddress<C>
) {
const tx =
await this.manager.completeInboundQueuedTransfer.populateTransaction(
Expand Down
Loading
Loading