Skip to content
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
30 changes: 29 additions & 1 deletion runtime/ft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@
}
`

const realFlowTokenTransferTransaction = `

Check failure on line 542 in runtime/ft_test.go

View workflow job for this annotation

GitHub Actions / Lint

const realFlowTokenTransferTransaction is unused (unused)
import FungibleToken from 0x1
import FlowToken from 0x1

Expand Down Expand Up @@ -570,6 +570,34 @@
}
}
`
const jansRealFlowTokenTransferTransaction = `
import FungibleToken from 0x1
import FlowToken from 0x1

transaction(amount: UFix64, to: Address){

prepare(signer: auth(Storage, Contracts, Keys, Inbox, Capabilities) &Account) {
var f: fun(): Void = fun(){}
f = fun() {
var i = 0
while i < 26 {
i = i + 1

let vaultRef = signer.storage.borrow<auth(FungibleToken.Withdraw) &FlowToken.Vault>(from: /storage/flowTokenVault)!
let receiverRef = getAccount(to)
.capabilities.borrow<&{FungibleToken.Receiver}>(/public/flowTokenReceiver)!
receiverRef.deposit(from: <-vaultRef.withdraw(amount: 0.00001))

}
}
f()
}

execute {
var f: fun(): Void = fun(){}
}
}
`

const realFlowTokenBalanceScript = `
import FungibleToken from 0x1
Expand Down Expand Up @@ -755,7 +783,7 @@

err = runtime.ExecuteTransaction(
Script{
Source: []byte(realFlowTokenTransferTransaction),
Source: []byte(jansRealFlowTokenTransferTransaction),
Arguments: encodeArgs([]cadence.Value{
sendAmount,
cadence.Address(receiverAddress),
Expand Down
Loading