Blockchain Interactions
Query and mutate Flow blockchain
Query
import FCL_SDK
let script = """
import ValueDapp from \(valueDappContract)
pub fun main(): UFix64 {
return ValueDapp.value
}
"""
Task {
let argument = try await fcl.query(script: script)
label.text = argument.value.description
// decode as Swift `Decodable` type or primitive type
let value: String = argument.value.toSwiftValue()
}Mutate
Transaction status
Last updated
Was this helpful?