Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to put NFT on sale #24

Open
crypto-pepe-dev opened this issue May 16, 2023 · 0 comments
Open

How to put NFT on sale #24

crypto-pepe-dev opened this issue May 16, 2023 · 0 comments

Comments

@crypto-pepe-dev
Copy link

crypto-pepe-dev commented May 16, 2023

I'm trying to adapt a sale from an auction.

My app crashed on await nftFixedPriceV3.getSaleData() with Error: Exit code: -256

What is my mistake?

export enum ENDPOINT {
    MAINNET = 'https://mainnet-v4.tonhubapi.com',
    TESTNET = 'https://sandbox-v4.tonhubapi.com',
}
   let keypair = await mnemonicToPrivateKey(seed.split(" "));

    let client = new TonClient4({endpoint: ENDPOINT.TESTNET})

    let wallet = await createSender(keypair, client)

    let defaultConfig: NftFixPriceSaleV3Data = {
        isComplete: false,
        fullPrice: toNano(price),
        nftAddress: Address.parse(nftAddress),
        nftOwnerAddress: Address.parse(ownerAddress),
        royaltyAddress: Address.parse(ownerAddress),
        royaltyAmount: toNano(price),
        marketplaceAddress: Address.parse(marketAddress),
        marketplaceFeeAddress: Address.parse(marketFeeAddress),
        marketplaceFee: toNano('0.05'),
        createdAt: moment().unix(),
        canDeployByExternal: true,
    }

    const nftFixedPriceV3 = client.open(
        await NftFixedPriceV3.createFromConfig(defaultConfig)
    )

    await nftFixedPriceV3.sendDeploy(wallet, toNano('0.05'))

    const data = await nftFixedPriceV3.getSaleData()

    console.log(data);

Also about marketFeeAddress and marketFeeAddress. Where can I get them?

@crypto-pepe-dev crypto-pepe-dev changed the title How to put NFT on sell How to put NFT on sale May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant