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 to Cadence 1.0 #27

Merged
merged 55 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
6361072
update to Cadence 1.0 RC1
turbolent Dec 19, 2023
06f824c
update core contract templates
turbolent Dec 19, 2023
d566cfd
Merge branch 'main' into bastian/update-stable-cadence
turbolent Jan 31, 2024
e9b8ac3
update to Cadence v1.0.0-M4
turbolent Jan 31, 2024
d6a3015
Merge pull request #35 from onflow/bastian/update-stable-cadence
turbolent Jan 31, 2024
cd4c454
Merge pull request #36 from onflow/bastian/update-cadence
turbolent Jan 31, 2024
35e5891
Update to Cadence v1.0.0-M7
turbolent Feb 14, 2024
1292ec5
Merge pull request #40 from onflow/auto-update-onflow-cadence-v1.0.0-M7
turbolent Feb 14, 2024
d6af9d1
switch to onflow/flowkit/v2
turbolent Feb 14, 2024
03b90f7
Merge pull request #42 from onflow/bastian/stable-cadence-flowkit-v2
turbolent Feb 14, 2024
46e8981
fix merge conflict, convert test cadence to v1.0, fix tests
bthaile Feb 15, 2024
7fcde4d
Update to Cadence v1.0.0-M7
turbolent Feb 20, 2024
eaab0d6
Merge pull request #43 from onflow/auto-update-onflow-cadence-v1.0.0-M7
turbolent Feb 20, 2024
7d4fc6a
fix issue where cadence 1.0 networks are mixed with old cadence netwo…
bthaile Feb 21, 2024
b66221b
upgrade flowkit v2
bthaile Feb 21, 2024
6e18a9e
Update to Cadence v1.0.0-M8
turbolent Feb 22, 2024
1dc086f
Merge pull request #46 from onflow/auto-update-onflow-cadence-v1.0.0-M8
turbolent Feb 22, 2024
e4906eb
Update to Cadence v1.0.0-preview.12
turbolent Mar 12, 2024
4755ffe
Merge pull request #48 from onflow/auto-update-onflow-cadence-v1.0.0-…
turbolent Mar 12, 2024
5028f05
Update to Cadence v1.0.0-preview.13
turbolent Mar 13, 2024
abaeff6
Merge pull request #49 from onflow/auto-update-onflow-cadence-v1.0.0-…
turbolent Mar 13, 2024
0dc328e
Update to Cadence v1.0.0-preview.15
SupunS Mar 18, 2024
94edf83
Merge pull request #51 from onflow/auto-update-onflow-cadence-v1.0.0-…
SupunS Mar 18, 2024
c0113f4
Update to Cadence v1.0.0-preview.16
SupunS Mar 21, 2024
3046a7e
Merge pull request #52 from onflow/auto-update-onflow-cadence-v1.0.0-…
SupunS Mar 21, 2024
4e22a1e
Update to Cadence v1.0.0-preview.18
SupunS Mar 28, 2024
44cc332
Merge pull request #53 from onflow/auto-update-onflow-cadence-v1.0.0-…
SupunS Mar 28, 2024
7b8bbe0
Update to Cadence v1.0.0-preview.19
turbolent Apr 3, 2024
af95dd1
Merge branch 'main' into bastian/sync
turbolent Apr 3, 2024
5564f7a
Merge pull request #56 from onflow/bastian/sync
turbolent Apr 3, 2024
7abb791
Merge branch 'feature/stable-cadence' into auto-update-onflow-cadence…
turbolent Apr 3, 2024
2160428
Merge pull request #54 from onflow/auto-update-onflow-cadence-v1.0.0-…
turbolent Apr 3, 2024
ea811d2
add view resolver contract
bthaile Apr 18, 2024
d579487
update to filter networks when generating flix, update tests
bthaile Apr 18, 2024
e6a42b0
Update to Cadence v1.0.0-preview.22
turbolent Apr 26, 2024
1271c8b
Merge pull request #59 from onflow/auto-update-onflow-cadence-v1.0.0-…
turbolent Apr 26, 2024
7687902
Update to Cadence v1.0.0-preview.25
turbolent May 2, 2024
9428f4d
Merge pull request #61 from onflow/auto-update-onflow-cadence-v1.0.0-…
turbolent May 2, 2024
17354b7
Update to alpha 19
chasefleming May 14, 2024
56b5088
Update
chasefleming May 14, 2024
9226b0f
Remove
chasefleming May 14, 2024
fcc4dc5
Merge pull request #64 from onflow/cf/update-flowkit-alpha-19
chasefleming May 14, 2024
6c9ee94
Update to Cadence v1.0.0-preview.29
SupunS May 17, 2024
4906b4f
Merge pull request #66 from onflow/auto-update-onflow-cadence-v1.0.0-…
SupunS May 17, 2024
62ab08b
Update to Cadence v1.0.0-preview.30
turbolent May 30, 2024
47df5ff
Merge pull request #67 from onflow/auto-update-onflow-cadence-v1.0.0-…
turbolent May 30, 2024
976f72c
update flowkit to 22
ianthpun May 31, 2024
b3c641d
Merge pull request #68 from onflow/ianthpun/update-flow-emu
ianthpun May 31, 2024
e3edd35
Update to Cadence v1.0.0-preview.32
turbolent Jun 4, 2024
c87ebef
Merge pull request #69 from onflow/auto-update-onflow-cadence-v1.0.0-…
turbolent Jun 4, 2024
136fcb2
Update to Cadence v1.0.0-preview.34
turbolent Jun 12, 2024
fe5e163
update to Go 1.22
turbolent Jun 12, 2024
ed82bfb
update golangci-lint
turbolent Jun 12, 2024
c149565
Merge pull request #70 from onflow/auto-update-onflow-cadence-v1.0.0-…
turbolent Jun 12, 2024
7b6837a
Merge branch 'main' into feature/stable-cadence
turbolent Jun 17, 2024
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ tidy:

test:
@echo "Running tests..."
go test ./...
go test -v ./...
51 changes: 26 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,33 +110,34 @@ fmt.Println(prettyJSON)

```go
#interaction(
version: "1.1.0",
title: "Transfer Flow",
description: "Transfer Flow to account",
language: "en-US",
parameters: [
Parameter(
name: "amount",
title: "Amount",
description: "Amount of Flow to transfer"
),
Parameter(
name: "to",
title: "Reciever",
description: "Destination address to receive Flow Tokens"
)
],
)
version: "1.1.0",
title: "Transfer Flow",
description: "Transfer Flow to account",
language: "en-US",
parameters: [
Parameter(
name: "amount",
title: "Amount",
description: "Amount of Flow to transfer"
),
Parameter(
name: "to",
title: "Receiver",
description: "Destination address to receive Flow Tokens"
)
],
)

import "FlowToken"

transaction(amount: UFix64, to: Address) {

let vault: @FlowToken.Vault

import "FlowToken"
transaction(amount: UFix64, to: Address) {
let vault: @FlowToken.Vault
prepare(signer: AuthAccount) {
...
}
prepare(signer: &Account) {
// ...
}
`

}
```

The pragma describes the transaction parameters and reason for the transaction.
21 changes: 11 additions & 10 deletions flixkit/fcl_bindings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"testing"

"github.com/hexops/autogold/v2"
"github.com/stretchr/testify/assert"

v1 "github.com/onflow/flixkit-go/flixkit/v1"
v1_1 "github.com/onflow/flixkit-go/flixkit/v1_1"
"github.com/onflow/flixkit-go/internal/templates"
"github.com/stretchr/testify/assert"
)

var parsedTemplateTX = &v1.FlowInteractionTemplate{
Expand All @@ -30,7 +31,7 @@ var parsedTemplateTX = &v1.FlowInteractionTemplate{
},
},
},
Cadence: "import FungibleToken from 0xFUNGIBLETOKENADDRESS\ntransaction(amount: UFix64, to: Address) {\nlet vault: @FungibleToken.Vault\nprepare(signer: AuthAccount) {\nself.vault <- signer\n.borrow<&{FungibleToken.Provider}>(from: /storage/flowTokenVault)!\n.withdraw(amount: amount)\n}\nexecute {\ngetAccount(to)\n.getCapability(/public/flowTokenReceiver)!\n.borrow<&{FungibleToken.Receiver}>()!\n.deposit(from: <-self.vault)\n}\n}",
Cadence: "import FungibleToken from 0xFUNGIBLETOKENADDRESS\ntransaction(amount: UFix64, to: Address) {\nlet vault: @FungibleToken.Vault\nprepare(signer: auth(Storage) &Account) {\nself.vault <- signer.storage\n.borrow<&{FungibleToken.Provider}>(from: /storage/flowTokenVault)!\n.withdraw(amount: amount)\n}\nexecute {\ngetAccount(to).capabilities\n.borrow<&{FungibleToken.Receiver}>(/public/flowTokenReceiver)!\n.deposit(from: <-self.vault)\n}\n}",
bjartek marked this conversation as resolved.
Show resolved Hide resolved
Dependencies: v1.Dependencies{
"0xFUNGIBLETOKENADDRESS": v1.Contracts{
"FungibleToken": v1.Networks{
Expand Down Expand Up @@ -99,7 +100,7 @@ var parsedTemplateScript = &v1.FlowInteractionTemplate{
},
},
},
Cadence: "pub fun main(x: Int, y: Int): Int { return x * y }",
Cadence: "access(all) fun main(x: Int, y: Int): Int { return x * y }",
Arguments: v1.Arguments{
"x": v1.Argument{
Index: 0,
Expand Down Expand Up @@ -148,7 +149,7 @@ var ArrayTypeScript = &v1.FlowInteractionTemplate{
},
},
},
Cadence: "pub fun main(numbers: [Int]): Int { var total = 1; for x in numbers { total = total * x }; return total }",
Cadence: "access(all) fun main(numbers: [Int]): Int { var total = 1; for x in numbers { total = total * x }; return total }",
Arguments: v1.Arguments{
"numbers": v1.Argument{
Index: 0,
Expand All @@ -173,7 +174,7 @@ var minimumTemplate = &v1.FlowInteractionTemplate{
Data: v1.Data{
Type: "script",
Interface: "",
Cadence: "pub fun main(numbers: [Int]): Int { var total = 1; for x in numbers { total = total * x }; return total }",
Cadence: "access(all) fun main(numbers: [Int]): Int { var total = 1; for x in numbers { total = total * x }; return total }",
Arguments: v1.Arguments{
"numbers": v1.Argument{
Index: 0,
Expand All @@ -190,7 +191,7 @@ var minimumNoParamTemplate = &v1.FlowInteractionTemplate{
Data: v1.Data{
Type: "script",
Interface: "",
Cadence: "pub fun main(): Int { return 1 }",
Cadence: "access(all) fun main(): Int { return 1 }",
},
}

Expand Down Expand Up @@ -277,7 +278,7 @@ var minimumNoParamTemplateTS_SCRIPT = &v1_1.InteractionTemplate{
Type: "script",
Interface: "",
Cadence: v1_1.Cadence{
Body: "pub fun main(): Int { return 1 }",
Body: "access(all) fun main(): Int { return 1 }",
NetworkPins: []v1_1.NetworkPin{},
},
Output: &v1_1.Parameter{
Expand Down Expand Up @@ -306,7 +307,7 @@ var minimumNoParamTemplateTS_TX = &v1_1.InteractionTemplate{
Type: "transaction",
Interface: "",
Cadence: v1_1.Cadence{
Body: "import \"HelloWorld\"\n\n#interaction (\n version: \"1.1.0\",\n\ttitle: \"Update Greeting\",\n\tdescription: \"Update the greeting on the HelloWorld contract\",\n\tlanguage: \"en-US\",\n)\ntransaction() {\n\n prepare(acct: AuthAccount) {\n }\n\n execute {\n \n }\n}\n",
Body: "import \"HelloWorld\"\n\n#interaction (\n version: \"1.1.0\",\n\ttitle: \"Update Greeting\",\n\tdescription: \"Update the greeting on the HelloWorld contract\",\n\tlanguage: \"en-US\",\n)\ntransaction() {\n\n prepare(acct: &Account) {\n }\n\n execute {\n \n }\n}\n",
NetworkPins: []v1_1.NetworkPin{},
},
},
Expand All @@ -320,7 +321,7 @@ var minimumParamTemplateTS_SCRIPT = &v1_1.InteractionTemplate{
Type: "script",
Interface: "",
Cadence: v1_1.Cadence{
Body: "pub fun main(someNumber Int): Int { return 1 + someNumber }",
Body: "access(all) fun main(someNumber Int): Int { return 1 + someNumber }",
NetworkPins: []v1_1.NetworkPin{},
},
Parameters: []v1_1.Parameter{
Expand Down Expand Up @@ -367,7 +368,7 @@ var minimumParamTemplateTS_TX = &v1_1.InteractionTemplate{
Type: "transaction",
Interface: "",
Cadence: v1_1.Cadence{
Body: "import \"HelloWorld\"\n\n#interaction (\n version: \"1.1.0\",\n\ttitle: \"Update Greeting\",\n\tdescription: \"Update the greeting on the HelloWorld contract\",\n\tlanguage: \"en-US\",\n\tparameters: [\n\t\tParameter(\n\t\t\tname: \"greeting\", \n\t\t\ttitle: \"Greeting\", \n\t\t\tdescription: \"The greeting to set on the HelloWorld contract\"\n\t\t)\n\t],\n)\ntransaction(greeting: String) {\n\n prepare(acct: AuthAccount) {\n log(acct.address)\n }\n\n execute {\n HelloWorld.updateGreeting(newGreeting: greeting)\n }\n}\n",
Body: "import \"HelloWorld\"\n\n#interaction (\n version: \"1.1.0\",\n\ttitle: \"Update Greeting\",\n\tdescription: \"Update the greeting on the HelloWorld contract\",\n\tlanguage: \"en-US\",\n\tparameters: [\n\t\tParameter(\n\t\t\tname: \"greeting\", \n\t\t\ttitle: \"Greeting\", \n\t\t\tdescription: \"The greeting to set on the HelloWorld contract\"\n\t\t)\n\t],\n)\ntransaction(greeting: String) {\n\n prepare(acct: &Account) {\n log(acct.address)\n }\n\n execute {\n HelloWorld.updateGreeting(newGreeting: greeting)\n }\n}\n",
NetworkPins: []v1_1.NetworkPin{},
},
Messages: []v1_1.Message{
Expand Down
7 changes: 4 additions & 3 deletions flixkit/flixkit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ import (
"net/http/httptest"
"testing"

v1 "github.com/onflow/flixkit-go/flixkit/v1"
"github.com/stretchr/testify/assert"

v1 "github.com/onflow/flixkit-go/flixkit/v1"
)

var flix_template = `{
Expand All @@ -29,7 +30,7 @@ var flix_template = `{
}
}
},
"cadence": "import FungibleToken from 0xFUNGIBLETOKENADDRESS\ntransaction(amount: UFix64, to: Address) {\nlet vault: @FungibleToken.Vault\nprepare(signer: AuthAccount) {\nself.vault <- signer\n.borrow<&{FungibleToken.Provider}>(from: /storage/flowTokenVault)!\n.withdraw(amount: amount)\n}\nexecute {\ngetAccount(to)\n.getCapability(/public/flowTokenReceiver)!\n.borrow<&{FungibleToken.Receiver}>()!\n.deposit(from: <-self.vault)\n}\n}",
"cadence": "import FungibleToken from 0xFUNGIBLETOKENADDRESS\ntransaction(amount: UFix64, to: Address) {\nlet vault: @FungibleToken.Vault\nprepare(signer: auth(Storage) &Account) {\nself.vault <- signer.storage\n.borrow<&{FungibleToken.Provider}>(from: /storage/flowTokenVault)!\n.withdraw(amount: amount)\n}\nexecute {\ngetAccount(to).capabilities\n.borrow<&{FungibleToken.Receiver}>(/public/flowTokenReceiver)!\n.deposit(from: <-self.vault)\n}\n}",
bjartek marked this conversation as resolved.
Show resolved Hide resolved
"dependencies": {
"0xFUNGIBLETOKENADDRESS": {
"FungibleToken": {
Expand Down Expand Up @@ -98,7 +99,7 @@ var parsedTemplate = &v1.FlowInteractionTemplate{
},
},
},
Cadence: "import FungibleToken from 0xFUNGIBLETOKENADDRESS\ntransaction(amount: UFix64, to: Address) {\nlet vault: @FungibleToken.Vault\nprepare(signer: AuthAccount) {\nself.vault <- signer\n.borrow<&{FungibleToken.Provider}>(from: /storage/flowTokenVault)!\n.withdraw(amount: amount)\n}\nexecute {\ngetAccount(to)\n.getCapability(/public/flowTokenReceiver)!\n.borrow<&{FungibleToken.Receiver}>()!\n.deposit(from: <-self.vault)\n}\n}",
Cadence: "import FungibleToken from 0xFUNGIBLETOKENADDRESS\ntransaction(amount: UFix64, to: Address) {\nlet vault: @FungibleToken.Vault\nprepare(signer: auth(Storage) &Account) {\nself.vault <- signer.storage\n.borrow<&{FungibleToken.Provider}>(from: /storage/flowTokenVault)!\n.withdraw(amount: amount)\n}\nexecute {\ngetAccount(to)\n.borrow<&{FungibleToken.Receiver}>(/public/flowTokenReceiver)!\n.deposit(from: <-self.vault)\n}\n}",
Dependencies: v1.Dependencies{
"0xFUNGIBLETOKENADDRESS": v1.Contracts{
"FungibleToken": v1.Networks{
Expand Down
41 changes: 22 additions & 19 deletions flixkit/generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"testing"

"github.com/hexops/autogold/v2"
v1_1 "github.com/onflow/flixkit-go/flixkit/v1_1"
"github.com/onflow/flixkit-go/internal/contracts"
"github.com/onflow/flow-cli/flowkit/config"
"github.com/stretchr/testify/assert"

v1_1 "github.com/onflow/flixkit-go/flixkit/v1_1"
"github.com/onflow/flixkit-go/internal/contracts"
)

func TestHelloScript(t *testing.T) {
Expand Down Expand Up @@ -46,11 +47,12 @@ func TestHelloScript(t *testing.T) {
language: "en-US",
parameters: [],
)

import "HelloWorld"

pub fun main(): String {
return HelloWorld.greeting
access(all)
fun main(): String {
return HelloWorld.greeting
}
`
ctx := context.Background()
Expand Down Expand Up @@ -95,20 +97,21 @@ func TestTransactionValue(t *testing.T) {
language: "en-US",
parameters: [
Parameter(
name: "greeting",
title: "Greeting",
name: "greeting",
title: "Greeting",
description: "The greeting to set on the HelloWorld contract"
)
],
)

import "HelloWorld"

transaction(greeting: String) {
prepare(acct: AuthAccount) {

prepare(acct: &Account) {
log(acct.address)
}

execute {
HelloWorld.updateGreeting(newGreeting: greeting)
}
Expand Down Expand Up @@ -150,24 +153,24 @@ func TestTransferFlowTransaction(t *testing.T) {
language: "en-US",
parameters: [
Parameter(
name: "amount",
title: "Amount",
name: "amount",
title: "Amount",
description: "Amount of Flow to transfer"
),
Parameter(
name: "to",
title: "Reciever",
name: "to",
title: "Receiver",
description: "Destination address to receive Flow Tokens"
)
],
)

import "FlowToken"

transaction(amount: UFix64, to: Address) {
let vault: @FlowToken.Vault
prepare(signer: AuthAccount) {

}

prepare(signer: &Account) {}
}
`
ctx := context.Background()
Expand Down
6 changes: 3 additions & 3 deletions flixkit/testdata/TestHelloScript.golden
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
}
],
"cadence": {
"body": "\n\t#interaction(\n\t\tversion: \"1.1.0\",\n\t\ttitle: \"Say Hello\",\n\t\tdescription: \"Read the greeting from the HelloWorld contract\",\n\t\tlanguage: \"en-US\",\n\t\tparameters: [],\n\t)\n\t\n\timport \"HelloWorld\"\n\n\tpub fun main(): String {\n\treturn HelloWorld.greeting\n\t}\n",
"body": "\n\t#interaction(\n\t\tversion: \"1.1.0\",\n\t\ttitle: \"Say Hello\",\n\t\tdescription: \"Read the greeting from the HelloWorld contract\",\n\t\tlanguage: \"en-US\",\n\t\tparameters: [],\n\t)\n\n\timport \"HelloWorld\"\n\n\taccess(all)\n\tfun main(): String {\n\t\treturn HelloWorld.greeting\n\t}\n",
"network_pins": [
{
"network": "mainnet",
"pin_self": "57d66cd2e8370ef74feec033e768dc460514091fc82ba1b4c42697b600288048"
"pin_self": "ab7702bc218a403fde58f290a89105f5c16d1462e1aedf19a73e2eb6d924245c"
},
{
"network": "testnet",
"pin_self": "57d66cd2e8370ef74feec033e768dc460514091fc82ba1b4c42697b600288048"
"pin_self": "ab7702bc218a403fde58f290a89105f5c16d1462e1aedf19a73e2eb6d924245c"
}
]
},
Expand Down
6 changes: 3 additions & 3 deletions flixkit/testdata/TestTransactionValue.golden
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
}
],
"cadence": {
"body": "\n\t#interaction(\n\t\tversion: \"1.1.0\",\n\t\ttitle: \"Update Greeting\",\n\t\tdescription: \"Update the greeting on the HelloWorld contract\",\n\t\tlanguage: \"en-US\",\n\t\tparameters: [\n\t\t\tParameter(\n\t\t\t\tname: \"greeting\", \n\t\t\t\ttitle: \"Greeting\", \n\t\t\t\tdescription: \"The greeting to set on the HelloWorld contract\"\n\t\t\t)\n\t\t],\n\t)\n\t\n\timport \"HelloWorld\"\n\ttransaction(greeting: String) {\n\t\n\t\tprepare(acct: AuthAccount) {\n\t\t\tlog(acct.address)\n\t\t}\n\t\t\n\t\texecute {\n\t\t\tHelloWorld.updateGreeting(newGreeting: greeting)\n\t\t}\n\t}\n",
"body": "\n\t#interaction(\n\t\tversion: \"1.1.0\",\n\t\ttitle: \"Update Greeting\",\n\t\tdescription: \"Update the greeting on the HelloWorld contract\",\n\t\tlanguage: \"en-US\",\n\t\tparameters: [\n\t\t\tParameter(\n\t\t\t\tname: \"greeting\",\n\t\t\t\ttitle: \"Greeting\",\n\t\t\t\tdescription: \"The greeting to set on the HelloWorld contract\"\n\t\t\t)\n\t\t],\n\t)\n\n\timport \"HelloWorld\"\n\n\ttransaction(greeting: String) {\n\n\t\tprepare(acct: \u0026Account) {\n\t\t\tlog(acct.address)\n\t\t}\n\n\t\texecute {\n\t\t\tHelloWorld.updateGreeting(newGreeting: greeting)\n\t\t}\n\t}\n",
"network_pins": [
{
"network": "mainnet",
"pin_self": "0ad0659f79f7b8336a588e24326c26cf6cf7f74af81c0c8a35ee58e190988af2"
"pin_self": "7a7b3ffbc205913afdd4d48e60a96ad1e5ecd2f2d29c4a1331a72182f63c90ff"
},
{
"network": "testnet",
"pin_self": "0ad0659f79f7b8336a588e24326c26cf6cf7f74af81c0c8a35ee58e190988af2"
"pin_self": "7a7b3ffbc205913afdd4d48e60a96ad1e5ecd2f2d29c4a1331a72182f63c90ff"
}
]
},
Expand Down
10 changes: 5 additions & 5 deletions flixkit/testdata/TestTransferFlowTransaction.golden
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
`{
"f_type": "InteractionTemplate",
"f_version": "1.1.0",
"id": "2233dc61f9e187efe089977e503a68024a6fd1d35e0971d8f36b1016ba032974",
"id": "3279de3e3dbd8ceeddb04b1489debcf03729f07fe5c67ef6dc68f2f6d46310ad",
"data": {
"type": "transaction",
"interface": "",
Expand All @@ -26,15 +26,15 @@
}
],
"cadence": {
"body": "\n\t#interaction(\n\t\tversion: \"1.1.0\",\n\t\ttitle: \"Transfer Flow\",\n\t\tdescription: \"Transfer Flow to account\",\n\t\tlanguage: \"en-US\",\n\t\tparameters: [\n\t\t\tParameter(\n\t\t\t\tname: \"amount\", \n\t\t\t\ttitle: \"Amount\", \n\t\t\t\tdescription: \"Amount of Flow to transfer\"\n\t\t\t),\n\t\t\tParameter(\n\t\t\t\tname: \"to\", \n\t\t\t\ttitle: \"Reciever\", \n\t\t\t\tdescription: \"Destination address to receive Flow Tokens\"\n\t\t\t)\n\t\t],\n\t)\n\t\n\timport \"FlowToken\"\n\ttransaction(amount: UFix64, to: Address) {\n\t\tlet vault: @FlowToken.Vault\n\t\tprepare(signer: AuthAccount) {\n\t\t\n\t\t}\n\t}\n",
"body": "\n\t#interaction(\n\t\tversion: \"1.1.0\",\n\t\ttitle: \"Transfer Flow\",\n\t\tdescription: \"Transfer Flow to account\",\n\t\tlanguage: \"en-US\",\n\t\tparameters: [\n\t\t\tParameter(\n\t\t\t\tname: \"amount\",\n\t\t\t\ttitle: \"Amount\",\n\t\t\t\tdescription: \"Amount of Flow to transfer\"\n\t\t\t),\n\t\t\tParameter(\n\t\t\t\tname: \"to\",\n\t\t\t\ttitle: \"Receiver\",\n\t\t\t\tdescription: \"Destination address to receive Flow Tokens\"\n\t\t\t)\n\t\t],\n\t)\n\n\timport \"FlowToken\"\n\n\ttransaction(amount: UFix64, to: Address) {\n\t\tlet vault: @FlowToken.Vault\n\n\t\tprepare(signer: \u0026Account) {}\n\t}\n",
"network_pins": [
{
"network": "mainnet",
"pin_self": "b11213cf3480f71989f7518791b976cfd80d43c7474495a6d5669b17b77e9346"
"pin_self": "8f51a4190c0b607f96eb65cc88e9335079aa659c4af7c858ef2de0a2171f7c4b"
},
{
"network": "testnet",
"pin_self": "d7c8bddb94f640478b573871dfc2c4e9d090c706ab2a7b8c3e8223e5f7f737be"
"pin_self": "76920dd3758b4ee3ee8a8929d05f3e4067f66a30b272f518a14bba504fefd4b1"
}
]
},
Expand Down Expand Up @@ -100,7 +100,7 @@
"i18n": [
{
"tag": "en-US",
"translation": "Reciever"
"translation": "Receiver"
}
]
},
Expand Down
Loading