Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update flip to split out parameter pragma from nested structure #236

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions application/20230406-interaction-template-cadence-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ Interaction Template Cadence Doc supports the following format:

- `language` declares the default BCP-47 language tag for all messages in the Interaction Template Cadence Doc (defaults to 'en-US').

- `parameters` declares information about a transaction/script parameters
- `Parameter name` the name of the field that cooresponds to the name of the parameter in the transaction or script.
- `Parameter title` the title of the field a human readable short message to associate with the parameter
- `Pparameter description` optional description of the field a human readable message to associate with the parameter
`#interaction-param-<name>` pragma includes information about a transaction/script parameters, contains same as interaction metadata for the interaction.
- `title` the title of the field a human readable short message to associate with the parameter
- `description` optional description of the field a human readable message to associate with the parameter
- `language` declares the default BCP-47 language tag for all messages in the Interaction Template Cadence Doc (defaults to 'en-US').

This is an example of Interaction Template Cadence Doc for a transaction:

Expand All @@ -56,19 +56,20 @@ import "FlowToken"
title: "Transfer Tokens",
description: "Transfer tokens from one account to another",
language: "en-US",
parameters: [
Parameter(
name: "amount",
title: "Amount",
description: "The amount of FLOW tokens to send"
),
Parameter(
name: "to",
title: "To",
description: "The Flow account the tokens will go to"
)
],
)

#interaction-param-amount(
title: "Amount",
description: "Amount of Flow to transfer"
language: "en-US",
)

#interaciton-param-to(
title: "Reciever",
description: "Destination address to receive Flow Tokens"
language: "en-US",
)

transaction(amount: UFix64, to: Address) {

let vault: @FungibleToken.Vault
Expand Down Expand Up @@ -98,13 +99,12 @@ import "FlowToken"
title: "Flow Token Balance",
description: "Get account Flow Token balance",
language: "en-US",
parameters: [
Parameter(
name: "address",
title: "Address",
description: "Get Flow token balance of Flow account"
)
],
)

#interaction-param-address(
title: "Address",
description: "Get Flow token balance of Flow account",
language: "en-US",
)

pub fun main(address: Address): UFix64 {
Expand Down