Questions tagged [onflow-cadence]

Cadence is a smart contract language primarily for the Flow blockchain. Use this tag for questions about programming smart contracts using the Cadence language.

Cadence is a resource-oriented programming language that introduces new features to smart contract programming that help developers ensure that their code is safe, secure, clear, and approachable.

57 questions
0
votes
1 answer

Get all NFTs of an Account on Flow Blockchain

Can I get a list of all NFTs to an account on the Flow Blockchain? There is account storage and the documentation says ...Cadence represents each NFT as a resource object that users store in their accounts... Or does the respective user has to…
0
votes
1 answer

invalid proposal key when updating contract

I want to update my contract on testnet using the flow CLI command. But instead of seeing a success, I get the following error: > flow accounts update-contract Xxxxx ./Xxxxx.cdc --signer admin-account -n testnet Transaction ID:…
louis_guitton
  • 5,105
  • 1
  • 31
  • 33
0
votes
1 answer

error: restricted type does not conform to restricting type

My goal is to deploy a custom smart contract that imports core contracts (e.g. FungibleToken) to the Flow emulator. In the flow playground, it works with no errors so the expected result in the emulator is no error. The actual result however is an…
louis_guitton
  • 5,105
  • 1
  • 31
  • 33
0
votes
1 answer

(Cadence) getting "deployment contains nonexisting contract" error when trying to deploy to Flow testnet

i'm trying to deploy a hello world smart contract to testnet. This is the contract I'm trying to deploy: ./contracts/NonFungibleToken.cdc pub contract NonFungibleToken { // Declare a stored state field in HelloWorld // pub let greeting:…
Albert Hu
  • 42
  • 7
0
votes
1 answer

Incorrect transaction charges on flow blockchain testnet

While making transactions using gosdk through cadence code I am getting transaction charges as 0.00010000 while in their documentation it is mentioned Transaction Fee: 0.000001 FLOW https://docs.onflow.org/flow-token/concepts/ Can somebody please…
0
votes
3 answers

Cannot send transactions to Flow emulator

I am trying to get the test code of the pinata-party working (https://medium.com/pinata/how-to-create-nfts-like-nba-top-shot-with-flow-and-ipfs-701296944bf). It works fine to the point that I try and send a transaction: flow transactions send --code…
Philip Rutovitz
  • 327
  • 5
  • 13
0
votes
1 answer

SAD PANDA: TypeError: failed to fetch

​ === SAD PANDA === TypeError: Failed to fetch === SAD PANDA === While executing a flow cadence transaction in react.js, I got the above error. My intention is when I click the minttoken button, this transaction has to execute so as to mint the…
-1
votes
0 answers

Transfer NFT from Ethereum to Flow

I'm going to build a bridge smart contract to transfer NFT from Ethereum to Flow. Is it possible and how can do it? Someone said that if there is any bridge by that contract on Flow and Eth, than Ican transfer from 1 chain to other. How can I…
Olive 105
  • 1
  • 1
-1
votes
1 answer

Flow account creation throws excepcion "duplicated signature for key"

I'm trying to get into FLOW and I just need to create an account and deploy a contract for creating a new token. So, first I'm trying to create an account with this contract: transaction(publicKey: String) { prepare(signer: AuthAccount) { …
damian
  • 104
  • 6
-1
votes
1 answer

Cadence error: unexpectedly found nil while forcing an Optional value

I'm running into a Cadence error on the Flow blockchain. I'm getting the error: unexpectedly found nil while forcing an Optional value when trying to save a resource to a dynamic storage path. I'm using the emulator and flow cli v.0.33.1. Here's the…
codhur_jones
  • 153
  • 9
-2
votes
1 answer

Gas Estimation on Flow chain

I am using Flow Javascript Library to send Crypto Currency from One Wallet Address to another. How do I calculate Gas Estimation?
-2
votes
1 answer

how can I keep track of the owner of each nft in my contract in Cadence?

Someone suggested I should aggregate events in an external db but I'm trying to avoid that and keep all the info in the contract. Any ideas? -spacepluk
1 2 3
4