icepick.toml: move to nonced workflows only for Solana
This commit is contained in:
parent
c6736ba678
commit
da5126b664
88
icepick.toml
88
icepick.toml
|
@ -29,16 +29,17 @@ inputs = { token = "token_name" }
|
||||||
# we want to store, and the value is the name to be assigned in storage.
|
# we want to store, and the value is the name to be assigned in storage.
|
||||||
outputs = { token_address = "token_address", token_decimals = "token_decimals" }
|
outputs = { token_address = "token_address", token_decimals = "token_decimals" }
|
||||||
|
|
||||||
# Load the Blockhash from the SD card
|
# Load the transaction nonce from the SD card
|
||||||
[[module.workflow.step]]
|
[[module.workflow.step]]
|
||||||
type = "internal-load-file"
|
type = "internal-load-file"
|
||||||
|
|
||||||
# Pre-defined values to be passed to the module
|
# Pre-defined values to be passed to the module.
|
||||||
values = { filename = "blockhash.json" }
|
# In this case, the `filename` field is reserved for marking which file to load.
|
||||||
|
values = { filename = "nonce.json" }
|
||||||
|
|
||||||
# This value is marked to be saved in-memory, and can be used as an input for
|
# This value is marked to be saved in-memory, and can be used as an input for
|
||||||
# later steps.
|
# later steps.
|
||||||
outputs = { blockhash = "blockhash" }
|
outputs = { nonce_authority = "nonce_authority", nonce_data = "nonce_data", nonce_address = "nonce_address" }
|
||||||
|
|
||||||
[[module.workflow.step]]
|
[[module.workflow.step]]
|
||||||
# Generate an unsigned Transaction
|
# Generate an unsigned Transaction
|
||||||
|
@ -68,7 +69,9 @@ type = "sol-compile"
|
||||||
[module.workflow.step.inputs]
|
[module.workflow.step.inputs]
|
||||||
instructions = "instructions"
|
instructions = "instructions"
|
||||||
derivation_accounts = "derivation_accounts"
|
derivation_accounts = "derivation_accounts"
|
||||||
blockhash = "blockhash"
|
nonce_address = "nonce_address"
|
||||||
|
nonce_authority = "nonce_authority"
|
||||||
|
nonce_data = "nonce_data"
|
||||||
|
|
||||||
[module.workflow.step.outputs]
|
[module.workflow.step.outputs]
|
||||||
transaction = "unsigned_transaction"
|
transaction = "unsigned_transaction"
|
||||||
|
@ -79,7 +82,7 @@ type = "sol-sign"
|
||||||
|
|
||||||
[module.workflow.step.inputs]
|
[module.workflow.step.inputs]
|
||||||
transaction = "unsigned_transaction"
|
transaction = "unsigned_transaction"
|
||||||
blockhash = "blockhash"
|
blockhash = "nonce_data"
|
||||||
|
|
||||||
[module.workflow.step.outputs]
|
[module.workflow.step.outputs]
|
||||||
transaction = "signed_transaction"
|
transaction = "signed_transaction"
|
||||||
|
@ -96,19 +99,22 @@ values = { filename = "transaction.json" }
|
||||||
# contain the signed transaction.
|
# contain the signed transaction.
|
||||||
inputs = { transaction = "signed_transaction" }
|
inputs = { transaction = "signed_transaction" }
|
||||||
|
|
||||||
|
# NOTE: To get a nonce address, the `generate-nonce-account` workflow should be
|
||||||
|
# run. It is the only workflow that uses a blockhash, which is why a
|
||||||
|
# `broadcast-with-blockhash` or similar is not, and should not be, implemented.
|
||||||
[[module.workflow]]
|
[[module.workflow]]
|
||||||
name = "broadcast"
|
name = "broadcast"
|
||||||
inputs = ["cluster"]
|
inputs = ["nonce_address", "cluster"]
|
||||||
|
|
||||||
[[module.workflow.step]]
|
[[module.workflow.step]]
|
||||||
type = "sol-get-blockhash"
|
type = "sol-get-nonce-account-data"
|
||||||
inputs = { cluster = "cluster" }
|
inputs = { nonce_address = "nonce_address", cluster = "cluster" }
|
||||||
outputs = { blockhash = "blockhash" }
|
outputs = { authority = "nonce_authority", durable_nonce = "nonce" }
|
||||||
|
|
||||||
[[module.workflow.step]]
|
[[module.workflow.step]]
|
||||||
type = "internal-save-file"
|
type = "internal-save-file"
|
||||||
values = { filename = "blockhash.json" }
|
values = { filename = "nonce.json" }
|
||||||
inputs = { blockhash = "blockhash" }
|
inputs = { nonce_authority = "nonce_authority", nonce_data = "nonce", nonce_address = "nonce_address" }
|
||||||
|
|
||||||
[[module.workflow.step]]
|
[[module.workflow.step]]
|
||||||
type = "internal-load-file"
|
type = "internal-load-file"
|
||||||
|
@ -176,13 +182,14 @@ inputs = { status = "status", url = "url", nonce_account = "nonce_pubkey" }
|
||||||
outputs = { status = "status", url = "url", nonce_account = "nonce_account" }
|
outputs = { status = "status", url = "url", nonce_account = "nonce_account" }
|
||||||
|
|
||||||
[[module.workflow]]
|
[[module.workflow]]
|
||||||
name = "transfer-online-nonced"
|
# Transfer SOL from one address to another.
|
||||||
inputs = ["nonce_address", "to_address", "from_address", "amount", "cluster"]
|
name = "transfer"
|
||||||
|
inputs = ["to_address", "from_address", "amount"]
|
||||||
|
|
||||||
[[module.workflow.step]]
|
[[module.workflow.step]]
|
||||||
type = "sol-get-nonce-account-data"
|
type = "internal-load-file"
|
||||||
inputs = { nonce_address = "nonce_address", cluster = "cluster" }
|
values = { filename = "nonce.json" }
|
||||||
outputs = { authority = "nonce_authority", durable_nonce = "nonce" }
|
outputs = { nonce_authority = "nonce_authority", nonce_data = "nonce_data", nonce_address = "nonce_address" }
|
||||||
|
|
||||||
[[module.workflow.step]]
|
[[module.workflow.step]]
|
||||||
type = "sol-transfer"
|
type = "sol-transfer"
|
||||||
|
@ -195,9 +202,9 @@ type = "sol-compile"
|
||||||
[module.workflow.step.inputs]
|
[module.workflow.step.inputs]
|
||||||
instructions = "instructions"
|
instructions = "instructions"
|
||||||
derivation_accounts = "derivation_accounts"
|
derivation_accounts = "derivation_accounts"
|
||||||
nonce_data = "nonce"
|
|
||||||
nonce_address = "nonce_address"
|
nonce_address = "nonce_address"
|
||||||
nonce_authority = "from_address"
|
nonce_authority = "nonce_authority"
|
||||||
|
nonce_data = "nonce_data"
|
||||||
|
|
||||||
[module.workflow.step.outputs]
|
[module.workflow.step.outputs]
|
||||||
transaction = "unsigned_transaction"
|
transaction = "unsigned_transaction"
|
||||||
|
@ -205,46 +212,11 @@ transaction = "unsigned_transaction"
|
||||||
[[module.workflow.step]]
|
[[module.workflow.step]]
|
||||||
type = "sol-sign"
|
type = "sol-sign"
|
||||||
|
|
||||||
inputs = { blockhash = "nonce", transaction = "unsigned_transaction" }
|
inputs = { blockhash = "nonce_data", transaction = "unsigned_transaction" }
|
||||||
outputs = { transaction = "signed_transaction" }
|
outputs = { transaction = "signed_transaction" }
|
||||||
|
|
||||||
[[module.workflow.step]]
|
[[module.workflow.step]]
|
||||||
type = "sol-broadcast"
|
type = "internal-save-file"
|
||||||
inputs = { cluster = "cluster", transaction = "signed_transaction" }
|
|
||||||
outputs = { status = "status", url = "url" }
|
|
||||||
|
|
||||||
[[module.workflow]]
|
values = { filename = "transaction.json" }
|
||||||
name = "transfer-online"
|
inputs = { transaction = "signed_transaction" }
|
||||||
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" }
|
|
||||||
|
|
Loading…
Reference in New Issue