1

I want to transfer one collectible from one wallet to another using Taquito (I know how to do the operation manually using a wallet, but not in code).

The documentation shows how to transfer an amount of tez, but not a NFT: https://tezostaquito.io/docs/making_transfers.

1 Answer 1

2

For FA2 transfers you can have a look at: https://tezostaquito.io/docs/fa2_parameters

Example: (For NFT's, amount is 1)

import { TezosToolkit } from "@taquito/taquito";

const Tezos = await new TezosTooolkit(RPC_URL);
const contract = await Tezos.wallet.at(FA2_CONTRACT_ADDRESS);

const transfer_params = [
    {
        from_: "tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb",
        txs: [
                {
                    to_: "tz1aSkwEot3L2kmUvcoxzjMomb9mvBNuzFK6",
                    token_id: 0,
                    amount: 11111
                },
                {
                    to_: "tz1aSkwEot3L2kmUvcoxzjMomb9mvBNuzFK6",
                    token_id: 1,
                    amount: 22222
                },
                {
                    to_: "tz1Me1MGhK7taay748h4gPnX2cXvbgL6xsYL",
                    token_id: 0,
                    amount: 333333
                }
        ]
    }
]

const op = await contract.methods.transfer(transfer_params).send();
await op.confirmation();

For FA1.2: https://assets.tqtezos.com/docs/token-contracts/fa12/2-fa12-ligo

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.