From 7febc8c1b1ff675d1f67fce20122bd8098d092f9 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 27 Dec 2024 02:23:30 -0500 Subject: [PATCH] whoops, forgot to commit meta files --- Cargo.lock | 12 +++++++ icepick.toml | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 99 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 007b2dc..56f538d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1557,6 +1557,7 @@ dependencies = [ "serde", "serde_json", "solana-rpc-client", + "solana-rpc-client-nonce-utils", "solana-sdk", "solana-transaction-status", "solana-transaction-status-client-types", @@ -3470,6 +3471,17 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "solana-rpc-client-nonce-utils" +version = "2.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7350a74a70e53a2c63813354770b890c364508fbff786a4c9530cdbfc83978c4" +dependencies = [ + "solana-rpc-client", + "solana-sdk", + "thiserror 1.0.69", +] + [[package]] name = "solana-sanitize" version = "2.1.7" diff --git a/icepick.toml b/icepick.toml index a4e7b04..b3d8ecf 100644 --- a/icepick.toml +++ b/icepick.toml @@ -58,6 +58,18 @@ decimals = "token_decimals" to_address = "to_address" from_address = "from_address" +[module.workflow.step.outputs] +instructions = "instructions" +derivation_accounts = "derivation_accounts" + +[[module.workflow.step]] +type = "sol-compile" + +[module.workflow.step.inputs] +instructions = "instructions" +derivation_accounts = "derivation_accounts" +blockhash = "blockhash" + [module.workflow.step.outputs] transaction = "unsigned_transaction" @@ -106,7 +118,7 @@ outputs = { transaction = "transaction" } [[module.workflow.step]] type = "sol-broadcast" inputs = { cluster = "cluster", transaction = "transaction" } -outputs = { status = "status", url = "url" } +outputs = { status = "status", url = "url", error = "error" } [[module.workflow]] name = "generate-nonce-account" @@ -162,3 +174,77 @@ outputs = { status = "status", url = "url" } type = "internal-cat" inputs = { status = "status", url = "url", nonce_account = "nonce_pubkey" } outputs = { status = "status", url = "url", nonce_account = "nonce_account" } + +[[module.workflow]] +name = "transfer-online-nonced" +inputs = ["nonce_address", "to_address", "from_address", "amount", "cluster"] + +[[module.workflow.step]] +type = "sol-get-nonce-account-data" +inputs = { nonce_address = "nonce_address", cluster = "cluster" } +outputs = { authority = "nonce_authority", durable_nonce = "nonce" } + +[[module.workflow.step]] +type = "sol-transfer" +inputs = { from_address = "from_address", to_address = "to_address", amount = "amount" } +outputs = { instructions = "instructions", derivation_accounts = "derivation_accounts" } + +[[module.workflow.step]] +type = "sol-compile" + +[module.workflow.step.inputs] +instructions = "instructions" +derivation_accounts = "derivation_accounts" +nonce_data = "nonce" +nonce_address = "nonce_address" +nonce_authority = "from_address" + +[module.workflow.step.outputs] +transaction = "unsigned_transaction" + +[[module.workflow.step]] +type = "sol-sign" + +inputs = { blockhash = "nonce", transaction = "unsigned_transaction" } +outputs = { transaction = "signed_transaction" } + +[[module.workflow.step]] +type = "sol-broadcast" +inputs = { cluster = "cluster", transaction = "signed_transaction" } +outputs = { status = "status", url = "url" } + +[[module.workflow]] +name = "transfer-online" +inputs = ["to_address", "from_address", "amount", "cluster"] + +[[module.workflow.step]] +type = "sol-get-blockhash" +inputs = { cluster = "cluster" } +outputs = { blockhash = "blockhash" } + +[[module.workflow.step]] +type = "sol-transfer" +inputs = { from_address = "from_address", to_address = "to_address", amount = "amount" } +outputs = { instructions = "instructions", derivation_accounts = "derivation_accounts" } + +[[module.workflow.step]] +type = "sol-compile" + +[module.workflow.step.inputs] +instructions = "instructions" +derivation_accounts = "derivation_accounts" +blockhash = "blockhash" + +[module.workflow.step.outputs] +transaction = "unsigned_transaction" + +[[module.workflow.step]] +type = "sol-sign" + +inputs = { blockhash = "blockhash", transaction = "unsigned_transaction" } +outputs = { transaction = "signed_transaction" } + +[[module.workflow.step]] +type = "sol-broadcast" +inputs = { cluster = "cluster", transaction = "signed_transaction" } +outputs = { status = "status", url = "url" }