Transaction arguments are invalid

Hi.
I am developing an nft mint.
I deployed my contracts to testnet.
I created my NFT on Playground. But i tried with react / onflow that error occured:

invalid argument at index 6: decodeing argument failed: [Error Code: 1052] transaction arguments are invalid: (argument is not json decodable: failed to decode value: invalid JSON Cadence structure) → 32230fc7706a432e9cf5f0c03b1a91508fff5aa27e3e7248c5b70388d9732ce5

Flow Playground:

My react codes:

const added = await client.add(files);
const recipient = user.addr;
const ipfsHash = added.path;
const name = ‘LCubeNFT’;
const description = ‘An LCube NFT Description’;
const thumbnail = ‘nft-sm.png’;
const contentType = ‘.png’;
const power = 1.0;
const rarity = 1.0;

        const transactionId = await fcl.send([
            fcl.transaction(mintNFT),
            fcl.args([
                fcl.arg(recipient, t.Address),
                fcl.arg(ipfsHash, t.String),
                fcl.arg(name, t.String),
                fcl.arg(description, t.String),
                fcl.arg(thumbnail, t.String),
                fcl.arg(contentType, t.String),
                fcl.arg(power, t.UFix64),
                fcl.arg(rarity, t.UFix64)
            ]),
            fcl.payer(fcl.authz),
            fcl.proposer(fcl.authz),
            fcl.authorizations([fcl.authz]),
            fcl.limit(9999)
        ]).then(fcl.decode);

        console.log(transactionId);
1 Like

you need to send those as string. ( as they are UFIx64 )

like below:

const power = '1.0';
const rarity = '1.0';
1 Like

Thank you. I solved with your helps. :slight_smile: