diff --git a/cli/README.md b/cli/README.md index 6fa454d9e..f8cbc5f50 100644 --- a/cli/README.md +++ b/cli/README.md @@ -13,7 +13,7 @@ Depending on the platforms you will deploy on: Run ``` bash -curl -fsSL https://raw.githubusercontent.com/wormhole-foundation/example-native-token-transfers/main/cli/install.sh | bash +curl -fsSL https://raw.githubusercontent.com/wormhole-foundation/native-token-transfers/main/cli/install.sh | bash ``` The installer will put the `ntt` binary in `$HOME/.bun/bin`, so make sure that directory is included in your `$PATH`. Once `ntt` is installed, it can be updated to the latest release any time by running diff --git a/cli/install.sh b/cli/install.sh index f545df203..1d4b88e1e 100755 --- a/cli/install.sh +++ b/cli/install.sh @@ -9,7 +9,7 @@ if ! command -v bun > /dev/null; then exit 1 fi -REPO="https://github.com/wormhole-foundation/example-native-token-transfers.git" +REPO="https://github.com/wormhole-foundation/native-token-transfers.git" function main { branch="" diff --git a/cli/src/index.ts b/cli/src/index.ts index fe17844a7..ff9db5c39 100755 --- a/cli/src/index.ts +++ b/cli/src/index.ts @@ -257,7 +257,7 @@ yargs(hideBin(process.argv)) if (argv["repo"]) { repoArg = `--repo ${argv["repo"]}`; } - const installScript = "https://raw.githubusercontent.com/wormhole-foundation/example-native-token-transfers/main/cli/install.sh"; + const installScript = "https://raw.githubusercontent.com/wormhole-foundation/native-token-transfers/main/cli/install.sh"; // save it to "$HOME/.ntt-cli/install.sh" const nttDir = `${process.env.HOME}/.ntt-cli`; const installer = `${nttDir}/install.sh`; @@ -285,7 +285,7 @@ yargs(hideBin(process.argv)) process.exit(1); } const path = argv["path"]; - await $`git clone -b main https://github.com/wormhole-foundation/example-native-token-transfers.git ${path}`; + await $`git clone -b main https://github.com/wormhole-foundation/native-token-transfers.git ${path}`; }) .command("add-chain ", "add a chain to the deployment file", @@ -1267,7 +1267,7 @@ async function deploySolana( } const anchorTomlPath = `${pwd}/solana/Anchor.toml`; - const libRsPath = `${pwd}/solana/programs/example-native-token-transfers/src/lib.rs`; + const libRsPath = `${pwd}/solana/programs/native-token-transfers/src/lib.rs`; const anchorToml = fs.readFileSync(anchorTomlPath).toString(); const newAnchorToml = anchorToml.replace(existingProgramId, providedProgramId); diff --git a/docs/Transceiver.md b/docs/Transceiver.md index 0ce9ebeef..04c23bcc0 100644 --- a/docs/Transceiver.md +++ b/docs/Transceiver.md @@ -4,7 +4,7 @@ The Transceiver is intended to offer a protocol-agnostic interface for sending and receiving cross-chain messages. For Native Token Transfers, this entails initiating attestation generation on the source chain, verifying the resulting attestation on the destination chain, and delivering the message to the associated `NttManager`. -In the provided implementations ([EVM](/evm/src/Transceiver/Transceiver.sol)/[SVM](/solana/programs/example-native-token-transfers/src/transceivers/wormhole/)), Transceiver are intended to have a many-to-one or one-to-one relationship with Managers. +In the provided implementations ([EVM](/evm/src/Transceiver/Transceiver.sol)/[SVM](/solana/programs/native-token-transfers/src/transceivers/wormhole/)), Transceiver are intended to have a many-to-one or one-to-one relationship with Managers. ## Message Specification diff --git a/evm/ts/package.json b/evm/ts/package.json index 07a0e6a1f..2dfcf9301 100644 --- a/evm/ts/package.json +++ b/evm/ts/package.json @@ -3,10 +3,10 @@ "version": "0.5.0", "repository": { "type": "git", - "url": "git+https://github.com/wormhole-foundation/example-native-token-transfers.git" + "url": "git+https://github.com/wormhole-foundation/native-token-transfers.git" }, "bugs": { - "url": "https://github.com/wormhole-foundation/example-native-token-transfers" + "url": "https://github.com/wormhole-foundation/native-token-transfers" }, "directories": { "test": "__tests__" diff --git a/sdk/definitions/package.json b/sdk/definitions/package.json index b14b50064..96a40211d 100644 --- a/sdk/definitions/package.json +++ b/sdk/definitions/package.json @@ -3,12 +3,12 @@ "version": "0.5.0", "repository": { "type": "git", - "url": "git+https://github.com/wormhole-foundation/example-native-token-transfers.git" + "url": "git+https://github.com/wormhole-foundation/native-token-transfers.git" }, "bugs": { - "url": "https://github.com/wormhole-foundation/example-native-token-transfers" + "url": "https://github.com/wormhole-foundation/native-token-transfers" }, - "homepage": "https://github.com/wormhole-foundation/example-native-token-transfers#readme", + "homepage": "https://github.com/wormhole-foundation/native-token-transfers#readme", "directories": { "test": "__tests__" }, diff --git a/sdk/route/package.json b/sdk/route/package.json index 3b8b8c6aa..a4db8ac16 100644 --- a/sdk/route/package.json +++ b/sdk/route/package.json @@ -3,12 +3,12 @@ "version": "0.5.0", "repository": { "type": "git", - "url": "git+https://github.com/wormhole-foundation/example-native-token-transfers.git" + "url": "git+https://github.com/wormhole-foundation/native-token-transfers.git" }, "bugs": { - "url": "https://github.com/wormhole-foundation/example-native-token-transfers" + "url": "https://github.com/wormhole-foundation/native-token-transfers" }, - "homepage": "https://github.com/wormhole-foundation/example-native-token-transfers#readme", + "homepage": "https://github.com/wormhole-foundation/native-token-transfers#readme", "directories": { "test": "__tests__" }, diff --git a/solana/Anchor.toml b/solana/Anchor.toml index 7554a6de7..a28115a3e 100644 --- a/solana/Anchor.toml +++ b/solana/Anchor.toml @@ -29,7 +29,7 @@ upgradeable = true [[test.genesis]] address = "worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth" -program = "programs/example-native-token-transfers/tests/fixtures/mainnet_core_bridge.so" +program = "programs/native-token-transfers/tests/fixtures/mainnet_core_bridge.so" [test.validator] bind_address = "0.0.0.0" diff --git a/solana/Cargo.lock b/solana/Cargo.lock index 4424e6667..cc1588fbc 100644 --- a/solana/Cargo.lock +++ b/solana/Cargo.lock @@ -1551,39 +1551,6 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" -[[package]] -name = "example-native-token-transfers" -version = "2.0.0" -dependencies = [ - "anchor-lang", - "anchor-spl", - "base64 0.21.7", - "bincode", - "bitmaps 3.2.1", - "cfg-if", - "hex", - "libsecp256k1", - "ntt-messages", - "serde", - "serde_json", - "serde_wormhole", - "sha3 0.10.8", - "solana-address-lookup-table-program", - "solana-program", - "solana-program-runtime", - "solana-program-test", - "solana-sdk", - "spl-associated-token-account 3.0.2", - "spl-token", - "spl-token-2022 3.0.2", - "wormhole-anchor-sdk", - "wormhole-governance", - "wormhole-io", - "wormhole-raw-vaas", - "wormhole-sdk", - "wormhole-solana-utils", -] - [[package]] name = "fastrand" version = "2.0.1" @@ -2445,6 +2412,39 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "native-token-transfers" +version = "2.0.0" +dependencies = [ + "anchor-lang", + "anchor-spl", + "base64 0.21.7", + "bincode", + "bitmaps 3.2.1", + "cfg-if", + "hex", + "libsecp256k1", + "ntt-messages", + "serde", + "serde_json", + "serde_wormhole", + "sha3 0.10.8", + "solana-address-lookup-table-program", + "solana-program", + "solana-program-runtime", + "solana-program-test", + "solana-sdk", + "spl-associated-token-account 3.0.2", + "spl-token", + "spl-token-2022 3.0.2", + "wormhole-anchor-sdk", + "wormhole-governance", + "wormhole-io", + "wormhole-raw-vaas", + "wormhole-sdk", + "wormhole-solana-utils", +] + [[package]] name = "nix" version = "0.26.4" @@ -2490,7 +2490,7 @@ version = "2.0.0" dependencies = [ "anchor-lang", "cfg-if", - "example-native-token-transfers", + "native-token-transfers", "solana-program", "wormhole-io", "wormhole-solana-utils", diff --git a/solana/Makefile b/solana/Makefile index af6ae7154..5e83a43e3 100644 --- a/solana/Makefile +++ b/solana/Makefile @@ -5,7 +5,7 @@ # turn `const VERSION: &str = "major.minor.patch";` into `major_minor_patch` #use make functions to minimize dependence on shell VERSION = $(subst .,_,$(subst ;,,$(subst ",,$(lastword \ - $(shell grep "const VERSION" programs/example-native-token-transfers/src/lib.rs) \ + $(shell grep "const VERSION" programs/native-token-transfers/src/lib.rs) \ )))) diff --git a/solana/README.md b/solana/README.md index 236051d3c..06c33021c 100644 --- a/solana/README.md +++ b/solana/README.md @@ -103,11 +103,11 @@ See the [NttManager](../docs/NttManager.md) doc for wire format details. ### NativeTokenTransfer Additional Payload -Modify [transfer.rs](./programs/example-native-token-transfers/src/transfer.rs) and replace the `EmptyPayload` with your own custom struct. See [ntt.rs](./modules/ntt-messages/src/ntt.rs) for an example. It is highly encouraged to use a 4-byte prefix for your payload. +Modify [transfer.rs](./programs/native-token-transfers/src/transfer.rs) and replace the `EmptyPayload` with your own custom struct. See [ntt.rs](./modules/ntt-messages/src/ntt.rs) for an example. It is highly encouraged to use a 4-byte prefix for your payload. The additional payload field should then have your custom struct available everywhere `NativeTokenTransfer` is used. Due to typing, parsing, and account allocation restrictions, this implementation expects that _all_ `NativeTokenTransfer` payloads for your contract adhere to your custom struct definition. -You can then modify [release_outbound](./programs/example-native-token-transfers/src/transceivers/wormhole/instructions/release_outbound.rs) and [redeem](./programs/example-native-token-transfers/src/instructions/redeem.rs) to generate and process the additional payload. +You can then modify [release_outbound](./programs/native-token-transfers/src/transceivers/wormhole/instructions/release_outbound.rs) and [redeem](./programs/native-token-transfers/src/instructions/redeem.rs) to generate and process the additional payload. ## Testing @@ -134,7 +134,7 @@ make test - Screenshot: tsx command not found screenshot -- Update `Makefile` ([line #29](https://github.com/wormhole-foundation/example-native-token-transfers/blob/main/solana/Makefile#L29)) from: +- Update `Makefile` ([line #29](https://github.com/wormhole-foundation/native-token-transfers/blob/main/solana/Makefile#L29)) from: ```sh tsx scripts/regenerateIdl.ts $$jsonfile > $$tsfile; \ @@ -154,6 +154,6 @@ make test - Screenshot: lifecycle script screenshot - This occurs due to Typescript files failing compilation. - - [`patch-idl` script](https://github.com/wormhole-foundation/example-native-token-transfers/blob/main/solana/scripts/patch-idl) requires [`jq`](https://jqlang.github.io/jq/) to be installed. Install `jq` and retry. + - [`patch-idl` script](https://github.com/wormhole-foundation/native-token-transfers/blob/main/solana/scripts/patch-idl) requires [`jq`](https://jqlang.github.io/jq/) to be installed. Install `jq` and retry. diff --git a/solana/package.json b/solana/package.json index bd13ab9c3..1961ac55b 100644 --- a/solana/package.json +++ b/solana/package.json @@ -3,12 +3,12 @@ "version": "0.5.0", "repository": { "type": "git", - "url": "git+https://github.com/wormhole-foundation/example-native-token-transfers.git" + "url": "git+https://github.com/wormhole-foundation/native-token-transfers.git" }, "bugs": { - "url": "https://github.com/wormhole-foundation/example-native-token-transfers" + "url": "https://github.com/wormhole-foundation/native-token-transfers" }, - "homepage": "https://github.com/wormhole-foundation/example-native-token-transfers#readme", + "homepage": "https://github.com/wormhole-foundation/native-token-transfers#readme", "directories": { "test": "tests" }, diff --git a/solana/programs/example-native-token-transfers/Cargo.toml b/solana/programs/native-token-transfers/Cargo.toml similarity index 97% rename from solana/programs/example-native-token-transfers/Cargo.toml rename to solana/programs/native-token-transfers/Cargo.toml index c248cb6c0..05bdd4bcb 100644 --- a/solana/programs/example-native-token-transfers/Cargo.toml +++ b/solana/programs/native-token-transfers/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "example-native-token-transfers" +name = "native-token-transfers" version = "2.0.0" description = "Example implementation of native token transfer standard" edition = "2021" diff --git a/solana/programs/example-native-token-transfers/Xargo.toml b/solana/programs/native-token-transfers/Xargo.toml similarity index 100% rename from solana/programs/example-native-token-transfers/Xargo.toml rename to solana/programs/native-token-transfers/Xargo.toml diff --git a/solana/programs/example-native-token-transfers/src/bitmap.rs b/solana/programs/native-token-transfers/src/bitmap.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/bitmap.rs rename to solana/programs/native-token-transfers/src/bitmap.rs diff --git a/solana/programs/example-native-token-transfers/src/clock.rs b/solana/programs/native-token-transfers/src/clock.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/clock.rs rename to solana/programs/native-token-transfers/src/clock.rs diff --git a/solana/programs/example-native-token-transfers/src/config.rs b/solana/programs/native-token-transfers/src/config.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/config.rs rename to solana/programs/native-token-transfers/src/config.rs diff --git a/solana/programs/example-native-token-transfers/src/error.rs b/solana/programs/native-token-transfers/src/error.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/error.rs rename to solana/programs/native-token-transfers/src/error.rs diff --git a/solana/programs/example-native-token-transfers/src/instructions/admin.rs b/solana/programs/native-token-transfers/src/instructions/admin.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/instructions/admin.rs rename to solana/programs/native-token-transfers/src/instructions/admin.rs diff --git a/solana/programs/example-native-token-transfers/src/instructions/initialize.rs b/solana/programs/native-token-transfers/src/instructions/initialize.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/instructions/initialize.rs rename to solana/programs/native-token-transfers/src/instructions/initialize.rs diff --git a/solana/programs/example-native-token-transfers/src/instructions/luts.rs b/solana/programs/native-token-transfers/src/instructions/luts.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/instructions/luts.rs rename to solana/programs/native-token-transfers/src/instructions/luts.rs diff --git a/solana/programs/example-native-token-transfers/src/instructions/mod.rs b/solana/programs/native-token-transfers/src/instructions/mod.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/instructions/mod.rs rename to solana/programs/native-token-transfers/src/instructions/mod.rs diff --git a/solana/programs/example-native-token-transfers/src/instructions/redeem.rs b/solana/programs/native-token-transfers/src/instructions/redeem.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/instructions/redeem.rs rename to solana/programs/native-token-transfers/src/instructions/redeem.rs diff --git a/solana/programs/example-native-token-transfers/src/instructions/release_inbound.rs b/solana/programs/native-token-transfers/src/instructions/release_inbound.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/instructions/release_inbound.rs rename to solana/programs/native-token-transfers/src/instructions/release_inbound.rs diff --git a/solana/programs/example-native-token-transfers/src/instructions/transfer.rs b/solana/programs/native-token-transfers/src/instructions/transfer.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/instructions/transfer.rs rename to solana/programs/native-token-transfers/src/instructions/transfer.rs diff --git a/solana/programs/example-native-token-transfers/src/lib.rs b/solana/programs/native-token-transfers/src/lib.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/lib.rs rename to solana/programs/native-token-transfers/src/lib.rs diff --git a/solana/programs/example-native-token-transfers/src/messages.rs b/solana/programs/native-token-transfers/src/messages.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/messages.rs rename to solana/programs/native-token-transfers/src/messages.rs diff --git a/solana/programs/example-native-token-transfers/src/peer.rs b/solana/programs/native-token-transfers/src/peer.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/peer.rs rename to solana/programs/native-token-transfers/src/peer.rs diff --git a/solana/programs/example-native-token-transfers/src/queue/inbox.rs b/solana/programs/native-token-transfers/src/queue/inbox.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/queue/inbox.rs rename to solana/programs/native-token-transfers/src/queue/inbox.rs diff --git a/solana/programs/example-native-token-transfers/src/queue/mod.rs b/solana/programs/native-token-transfers/src/queue/mod.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/queue/mod.rs rename to solana/programs/native-token-transfers/src/queue/mod.rs diff --git a/solana/programs/example-native-token-transfers/src/queue/outbox.rs b/solana/programs/native-token-transfers/src/queue/outbox.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/queue/outbox.rs rename to solana/programs/native-token-transfers/src/queue/outbox.rs diff --git a/solana/programs/example-native-token-transfers/src/queue/rate_limit.rs b/solana/programs/native-token-transfers/src/queue/rate_limit.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/queue/rate_limit.rs rename to solana/programs/native-token-transfers/src/queue/rate_limit.rs diff --git a/solana/programs/example-native-token-transfers/src/registered_transceiver.rs b/solana/programs/native-token-transfers/src/registered_transceiver.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/registered_transceiver.rs rename to solana/programs/native-token-transfers/src/registered_transceiver.rs diff --git a/solana/programs/example-native-token-transfers/src/transceivers/accounts/mod.rs b/solana/programs/native-token-transfers/src/transceivers/accounts/mod.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/transceivers/accounts/mod.rs rename to solana/programs/native-token-transfers/src/transceivers/accounts/mod.rs diff --git a/solana/programs/example-native-token-transfers/src/transceivers/accounts/peer.rs b/solana/programs/native-token-transfers/src/transceivers/accounts/peer.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/transceivers/accounts/peer.rs rename to solana/programs/native-token-transfers/src/transceivers/accounts/peer.rs diff --git a/solana/programs/example-native-token-transfers/src/transceivers/mod.rs b/solana/programs/native-token-transfers/src/transceivers/mod.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/transceivers/mod.rs rename to solana/programs/native-token-transfers/src/transceivers/mod.rs diff --git a/solana/programs/example-native-token-transfers/src/transceivers/wormhole/accounts.rs b/solana/programs/native-token-transfers/src/transceivers/wormhole/accounts.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/transceivers/wormhole/accounts.rs rename to solana/programs/native-token-transfers/src/transceivers/wormhole/accounts.rs diff --git a/solana/programs/example-native-token-transfers/src/transceivers/wormhole/instructions/admin.rs b/solana/programs/native-token-transfers/src/transceivers/wormhole/instructions/admin.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/transceivers/wormhole/instructions/admin.rs rename to solana/programs/native-token-transfers/src/transceivers/wormhole/instructions/admin.rs diff --git a/solana/programs/example-native-token-transfers/src/transceivers/wormhole/instructions/broadcast_id.rs b/solana/programs/native-token-transfers/src/transceivers/wormhole/instructions/broadcast_id.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/transceivers/wormhole/instructions/broadcast_id.rs rename to solana/programs/native-token-transfers/src/transceivers/wormhole/instructions/broadcast_id.rs diff --git a/solana/programs/example-native-token-transfers/src/transceivers/wormhole/instructions/broadcast_peer.rs b/solana/programs/native-token-transfers/src/transceivers/wormhole/instructions/broadcast_peer.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/transceivers/wormhole/instructions/broadcast_peer.rs rename to solana/programs/native-token-transfers/src/transceivers/wormhole/instructions/broadcast_peer.rs diff --git a/solana/programs/example-native-token-transfers/src/transceivers/wormhole/instructions/mod.rs b/solana/programs/native-token-transfers/src/transceivers/wormhole/instructions/mod.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/transceivers/wormhole/instructions/mod.rs rename to solana/programs/native-token-transfers/src/transceivers/wormhole/instructions/mod.rs diff --git a/solana/programs/example-native-token-transfers/src/transceivers/wormhole/instructions/receive_message.rs b/solana/programs/native-token-transfers/src/transceivers/wormhole/instructions/receive_message.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/transceivers/wormhole/instructions/receive_message.rs rename to solana/programs/native-token-transfers/src/transceivers/wormhole/instructions/receive_message.rs diff --git a/solana/programs/example-native-token-transfers/src/transceivers/wormhole/instructions/release_outbound.rs b/solana/programs/native-token-transfers/src/transceivers/wormhole/instructions/release_outbound.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/transceivers/wormhole/instructions/release_outbound.rs rename to solana/programs/native-token-transfers/src/transceivers/wormhole/instructions/release_outbound.rs diff --git a/solana/programs/example-native-token-transfers/src/transceivers/wormhole/mod.rs b/solana/programs/native-token-transfers/src/transceivers/wormhole/mod.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/transceivers/wormhole/mod.rs rename to solana/programs/native-token-transfers/src/transceivers/wormhole/mod.rs diff --git a/solana/programs/example-native-token-transfers/src/transfer.rs b/solana/programs/native-token-transfers/src/transfer.rs similarity index 100% rename from solana/programs/example-native-token-transfers/src/transfer.rs rename to solana/programs/native-token-transfers/src/transfer.rs diff --git a/solana/programs/example-native-token-transfers/tests/broadcast.rs b/solana/programs/native-token-transfers/tests/broadcast.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/broadcast.rs rename to solana/programs/native-token-transfers/tests/broadcast.rs diff --git a/solana/programs/example-native-token-transfers/tests/cancel_flow.rs b/solana/programs/native-token-transfers/tests/cancel_flow.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/cancel_flow.rs rename to solana/programs/native-token-transfers/tests/cancel_flow.rs diff --git a/solana/programs/example-native-token-transfers/tests/common/account_json_utils.rs b/solana/programs/native-token-transfers/tests/common/account_json_utils.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/common/account_json_utils.rs rename to solana/programs/native-token-transfers/tests/common/account_json_utils.rs diff --git a/solana/programs/example-native-token-transfers/tests/common/mod.rs b/solana/programs/native-token-transfers/tests/common/mod.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/common/mod.rs rename to solana/programs/native-token-transfers/tests/common/mod.rs diff --git a/solana/programs/example-native-token-transfers/tests/common/query.rs b/solana/programs/native-token-transfers/tests/common/query.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/common/query.rs rename to solana/programs/native-token-transfers/tests/common/query.rs diff --git a/solana/programs/example-native-token-transfers/tests/common/setup.rs b/solana/programs/native-token-transfers/tests/common/setup.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/common/setup.rs rename to solana/programs/native-token-transfers/tests/common/setup.rs diff --git a/solana/programs/example-native-token-transfers/tests/common/submit.rs b/solana/programs/native-token-transfers/tests/common/submit.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/common/submit.rs rename to solana/programs/native-token-transfers/tests/common/submit.rs diff --git a/solana/programs/native-token-transfers/tests/fixtures/gov.so b/solana/programs/native-token-transfers/tests/fixtures/gov.so new file mode 100644 index 000000000..2a0a1c82f Binary files /dev/null and b/solana/programs/native-token-transfers/tests/fixtures/gov.so differ diff --git a/solana/programs/example-native-token-transfers/tests/fixtures/mainnet_core_bridge.so b/solana/programs/native-token-transfers/tests/fixtures/mainnet_core_bridge.so similarity index 100% rename from solana/programs/example-native-token-transfers/tests/fixtures/mainnet_core_bridge.so rename to solana/programs/native-token-transfers/tests/fixtures/mainnet_core_bridge.so diff --git a/solana/programs/native-token-transfers/tests/fixtures/ntt.so b/solana/programs/native-token-transfers/tests/fixtures/ntt.so new file mode 100644 index 000000000..d4c614540 Binary files /dev/null and b/solana/programs/native-token-transfers/tests/fixtures/ntt.so differ diff --git a/solana/programs/example-native-token-transfers/tests/governance.rs b/solana/programs/native-token-transfers/tests/governance.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/governance.rs rename to solana/programs/native-token-transfers/tests/governance.rs diff --git a/solana/programs/example-native-token-transfers/tests/sdk/accounts.rs b/solana/programs/native-token-transfers/tests/sdk/accounts.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/sdk/accounts.rs rename to solana/programs/native-token-transfers/tests/sdk/accounts.rs diff --git a/solana/programs/example-native-token-transfers/tests/sdk/instructions/admin.rs b/solana/programs/native-token-transfers/tests/sdk/instructions/admin.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/sdk/instructions/admin.rs rename to solana/programs/native-token-transfers/tests/sdk/instructions/admin.rs diff --git a/solana/programs/example-native-token-transfers/tests/sdk/instructions/initialize.rs b/solana/programs/native-token-transfers/tests/sdk/instructions/initialize.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/sdk/instructions/initialize.rs rename to solana/programs/native-token-transfers/tests/sdk/instructions/initialize.rs diff --git a/solana/programs/example-native-token-transfers/tests/sdk/instructions/mod.rs b/solana/programs/native-token-transfers/tests/sdk/instructions/mod.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/sdk/instructions/mod.rs rename to solana/programs/native-token-transfers/tests/sdk/instructions/mod.rs diff --git a/solana/programs/example-native-token-transfers/tests/sdk/instructions/post_vaa.rs b/solana/programs/native-token-transfers/tests/sdk/instructions/post_vaa.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/sdk/instructions/post_vaa.rs rename to solana/programs/native-token-transfers/tests/sdk/instructions/post_vaa.rs diff --git a/solana/programs/example-native-token-transfers/tests/sdk/instructions/redeem.rs b/solana/programs/native-token-transfers/tests/sdk/instructions/redeem.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/sdk/instructions/redeem.rs rename to solana/programs/native-token-transfers/tests/sdk/instructions/redeem.rs diff --git a/solana/programs/example-native-token-transfers/tests/sdk/instructions/transfer.rs b/solana/programs/native-token-transfers/tests/sdk/instructions/transfer.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/sdk/instructions/transfer.rs rename to solana/programs/native-token-transfers/tests/sdk/instructions/transfer.rs diff --git a/solana/programs/example-native-token-transfers/tests/sdk/mod.rs b/solana/programs/native-token-transfers/tests/sdk/mod.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/sdk/mod.rs rename to solana/programs/native-token-transfers/tests/sdk/mod.rs diff --git a/solana/programs/example-native-token-transfers/tests/sdk/transceivers/mod.rs b/solana/programs/native-token-transfers/tests/sdk/transceivers/mod.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/sdk/transceivers/mod.rs rename to solana/programs/native-token-transfers/tests/sdk/transceivers/mod.rs diff --git a/solana/programs/example-native-token-transfers/tests/sdk/transceivers/wormhole/accounts/mod.rs b/solana/programs/native-token-transfers/tests/sdk/transceivers/wormhole/accounts/mod.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/sdk/transceivers/wormhole/accounts/mod.rs rename to solana/programs/native-token-transfers/tests/sdk/transceivers/wormhole/accounts/mod.rs diff --git a/solana/programs/example-native-token-transfers/tests/sdk/transceivers/wormhole/accounts/wormhole.rs b/solana/programs/native-token-transfers/tests/sdk/transceivers/wormhole/accounts/wormhole.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/sdk/transceivers/wormhole/accounts/wormhole.rs rename to solana/programs/native-token-transfers/tests/sdk/transceivers/wormhole/accounts/wormhole.rs diff --git a/solana/programs/example-native-token-transfers/tests/sdk/transceivers/wormhole/instructions/admin.rs b/solana/programs/native-token-transfers/tests/sdk/transceivers/wormhole/instructions/admin.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/sdk/transceivers/wormhole/instructions/admin.rs rename to solana/programs/native-token-transfers/tests/sdk/transceivers/wormhole/instructions/admin.rs diff --git a/solana/programs/example-native-token-transfers/tests/sdk/transceivers/wormhole/instructions/broadcast_id.rs b/solana/programs/native-token-transfers/tests/sdk/transceivers/wormhole/instructions/broadcast_id.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/sdk/transceivers/wormhole/instructions/broadcast_id.rs rename to solana/programs/native-token-transfers/tests/sdk/transceivers/wormhole/instructions/broadcast_id.rs diff --git a/solana/programs/example-native-token-transfers/tests/sdk/transceivers/wormhole/instructions/broadcast_peer.rs b/solana/programs/native-token-transfers/tests/sdk/transceivers/wormhole/instructions/broadcast_peer.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/sdk/transceivers/wormhole/instructions/broadcast_peer.rs rename to solana/programs/native-token-transfers/tests/sdk/transceivers/wormhole/instructions/broadcast_peer.rs diff --git a/solana/programs/example-native-token-transfers/tests/sdk/transceivers/wormhole/instructions/mod.rs b/solana/programs/native-token-transfers/tests/sdk/transceivers/wormhole/instructions/mod.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/sdk/transceivers/wormhole/instructions/mod.rs rename to solana/programs/native-token-transfers/tests/sdk/transceivers/wormhole/instructions/mod.rs diff --git a/solana/programs/example-native-token-transfers/tests/sdk/transceivers/wormhole/instructions/receive_message.rs b/solana/programs/native-token-transfers/tests/sdk/transceivers/wormhole/instructions/receive_message.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/sdk/transceivers/wormhole/instructions/receive_message.rs rename to solana/programs/native-token-transfers/tests/sdk/transceivers/wormhole/instructions/receive_message.rs diff --git a/solana/programs/example-native-token-transfers/tests/sdk/transceivers/wormhole/instructions/release_outbound.rs b/solana/programs/native-token-transfers/tests/sdk/transceivers/wormhole/instructions/release_outbound.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/sdk/transceivers/wormhole/instructions/release_outbound.rs rename to solana/programs/native-token-transfers/tests/sdk/transceivers/wormhole/instructions/release_outbound.rs diff --git a/solana/programs/example-native-token-transfers/tests/sdk/transceivers/wormhole/mod.rs b/solana/programs/native-token-transfers/tests/sdk/transceivers/wormhole/mod.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/sdk/transceivers/wormhole/mod.rs rename to solana/programs/native-token-transfers/tests/sdk/transceivers/wormhole/mod.rs diff --git a/solana/programs/example-native-token-transfers/tests/transfer.rs b/solana/programs/native-token-transfers/tests/transfer.rs similarity index 100% rename from solana/programs/example-native-token-transfers/tests/transfer.rs rename to solana/programs/native-token-transfers/tests/transfer.rs diff --git a/solana/programs/ntt-quoter/Cargo.toml b/solana/programs/ntt-quoter/Cargo.toml index ee06ec7ae..0442f82d9 100644 --- a/solana/programs/ntt-quoter/Cargo.toml +++ b/solana/programs/ntt-quoter/Cargo.toml @@ -29,4 +29,4 @@ cfg-if.workspace = true wormhole-io.workspace = true wormhole-solana-utils.workspace = true -example-native-token-transfers = { path = "../example-native-token-transfers", features = ["no-entrypoint"] } +native-token-transfers = { path = "../native-token-transfers", features = ["no-entrypoint"] } diff --git a/solana/tests/anchor.test.ts b/solana/tests/anchor.test.ts index 7b162182b..6124a3c24 100644 --- a/solana/tests/anchor.test.ts +++ b/solana/tests/anchor.test.ts @@ -117,7 +117,7 @@ const coreBridge = new SolanaWormholeCore("Devnet", "Solana", connection, { const TOKEN_PROGRAM = spl.TOKEN_2022_PROGRAM_ID; -describe("example-native-token-transfers", () => { +describe("native-token-transfers", () => { let ntt: SolanaNtt<"Devnet", "Solana">; let signer: Signer; let sender: AccountAddress<"Solana">;