diff --git a/Cargo.lock b/Cargo.lock index 4b8c897130d45b..c1f97b2b6fae4e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7659,6 +7659,23 @@ dependencies = [ "prost-types", ] +[[package]] +name = "solana-svm-example-paytube" +version = "2.1.0" +dependencies = [ + "solana-bpf-loader-program", + "solana-client", + "solana-compute-budget", + "solana-logger", + "solana-program-runtime", + "solana-sdk", + "solana-svm", + "solana-system-program", + "solana-test-validator", + "spl-associated-token-account", + "spl-token", +] + [[package]] name = "solana-svm-transaction" version = "2.1.0" diff --git a/Cargo.toml b/Cargo.toml index 45f6625f01ec6d..d87789abc3b334 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -120,6 +120,7 @@ members = [ "svm", "svm-conformance", "svm-transaction", + "svm/examples/paytube", "test-validator", "thin-client", "timings", @@ -422,6 +423,7 @@ solana-storage-proto = { path = "storage-proto", version = "=2.1.0" } solana-streamer = { path = "streamer", version = "=2.1.0" } solana-svm = { path = "svm", version = "=2.1.0" } solana-svm-conformance = { path = "svm-conformance", version = "=2.1.0" } +solana-svm-example-paytube = { path = "svm/examples/paytube", version = "=2.1.0" } solana-svm-transaction = { path = "svm-transaction", version = "=2.1.0" } solana-system-program = { path = "programs/system", version = "=2.1.0" } solana-test-validator = { path = "test-validator", version = "=2.1.0" } diff --git a/svm/examples/paytube/Cargo.toml b/svm/examples/paytube/Cargo.toml new file mode 100644 index 00000000000000..953166c66beef2 --- /dev/null +++ b/svm/examples/paytube/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "solana-svm-example-paytube" +description = "Reference example using Solana SVM API" +version = { workspace = true } +edition = { workspace = true } +publish = false + +[dependencies] +solana-bpf-loader-program = { workspace = true } +solana-client = { workspace = true } +solana-compute-budget = { workspace = true } +solana-program-runtime = { workspace = true } +solana-sdk = { workspace = true } +solana-svm = { workspace = true } +solana-system-program = { workspace = true } +spl-associated-token-account = { workspace = true } +spl-token = { workspace = true } + +[dev-dependencies] +solana-logger = { workspace = true } +solana-test-validator = { workspace = true } diff --git a/svm/examples/paytube/src/lib.rs b/svm/examples/paytube/src/lib.rs new file mode 100644 index 00000000000000..8b137891791fe9 --- /dev/null +++ b/svm/examples/paytube/src/lib.rs @@ -0,0 +1 @@ +