Hello,
I am using some parts of flow-py-sdk and flow CLI emulator on local.
Here is example: https://docs.onflow.org/cadence/tutorial/04-non-fungible-tokens/
Contract:
pub contract ExampleNFT { pub resource NFT { pub let id: UInt64 pub var metadata: {String: String} init(initID: UInt64) { self.id = initID self.metadata = {} } } init() { self.account.save<@NFT>(<-create NFT(initID: 1), to: /storage/NFT1) } }
Transaction:
import ExampleNFT from (address from created contract) transaction { prepare(acct: AuthAccount) { if acct.borrow<&ExampleNFT.NFT>(from: /storage/NFT1) != nil { log("The token exists!") } else { log("No token found!") } } }
In online emulator (https://play.onflow.org/) itโs ok:
12:54:58 Deployment Deployed Contract To: 0x01
12:55:17 Transaction โThe token exists!โ
Flow CLI emulator, contract:
INFO[1930] Transaction executed txID=39a430185d9dbd2d02ad32d9e81cfce19434324a7deb72c35d2e84c7eb605418
But for transaction I will get this error:
Exception: execution error code 1101: [Error Code: 1101] cadence runtime error Execution failed:
error: authorizer count mismatch for transaction: expected 1, got 0
โ a9c3f152122c7e9a3e34e7001a25d2f0ee5e3661dd009a78a6dc99dd6715363b
Thank you for your help.