icepick workflow sol transfer-token: broadcast transaction, use cluster from inputs

This commit is contained in:
Ryan Heywood 2024-12-20 20:36:15 -05:00
parent 6a3ab8a64b
commit a2fc02f65a
Signed by: ryan
GPG Key ID: 8E401478A3FBEF72
1 changed files with 10 additions and 1 deletions

View File

@ -13,7 +13,7 @@ name = "transfer-token"
# be serialized by serde_json::Value.
# These values can also be loaded using "internal-load-file", using some form
# of later-defined signature validation.
inputs = ["from_address", "to_address", "token_name", "token_amount"]
inputs = ["from_address", "to_address", "token_name", "token_amount", "cluster"]
## Load the Blockhash from the SD card
#[[module.workflow.step]]
@ -44,6 +44,8 @@ outputs = { token_address = "token_address", token_decimals = "token_decimals" }
[[module.workflow.step]]
type = "sol-get-blockhash"
inputs = { cluster = "cluster" }
outputs = { blockhash = "blockhash" }
[[module.workflow.step]]
@ -78,6 +80,13 @@ blockhash = "blockhash"
[module.workflow.step.outputs]
transaction = "signed_transaction"
# Broadcast the transaction
[[module.workflow.step]]
type = "sol-broadcast"
inputs = { cluster = "cluster", transaction = "signed_transaction" }
outputs = { status = "status", url = "url" }
## Write the signed transaction to a file
#[[module.workflow.step]]
#type = "internal-save-file"