[SOLVED] NFT 1155 created and lost

Hi, first sorry for my bad english. Im french.

I have created an Erc 1155, set up my moralis class and cloud function.

I have write my smart contract all is good. I deploy it its ok

I Can see my 100nft in remix with balanceof fonction.

But nothink in my adress in bsc testnet, and nothink in cryptotoolkit.uk in nft section.

I miss somethink but i dont know what.

Where i Can found my nft ?

Thanks :pray:

Bonjour :slight_smile:

Do you have deployed it to the bsc testnet or on local evm?

Bsc testnet with injected web3

can you post an address to see what you have there?

Can you send me the contract address of your deployed smart contract please?

1 Like

My bsc adress :
0x794ED60A2e46565b5e4762ed524ad87A4d9e21E7

Contract adress
0xffd7beb5eaf1ecbe72dcb70d6dab93105e561249

That smart contract does return 100 tokens with id 0 for balanceOf on bsc testnet, but I don’t see any event specific to a mint in the only transaction specific to that contract, how did you mint those 100 tokens?

1 Like

ho ok i think the constructor mint nft when i deploy the smart contract ?

    constructor() ERC1155("https://iXXXXXXX1jo.usemoralis.com:0000/server/functions/getNFT?_Application=XXXXXXXXXXXXXXXXXX&id={id}") {
    _mint(msg.sender, DROP, 100, "");
}

This not mint the nft when i deploy ?

i was thinking this constructor mint and send 100 token in injected web3 adress who deploy the smart contract.

1 Like

It looks like your token was minted:

x = await Moralis.Web3API.token.getTokenIdOwners({ address: "0xffd7beb5eaf1ecbe72dcb70d6dab93105e561249", token_id: "0", chain: "bsc testnet" })

returns:

0:
amount: "100"
block_number: "13587617"
block_number_minted: "13587617"
contract_type: "ERC1155"
metadata: "{\"result\":{\"Face\":{\"__type\":\"File\",\"name\":\"a45aa2a15a3e4709e05d165c9e037326_FiraBall.png\",\"url\":\"https://[redacted]:2053/server/files/gShwiEeXzSPX9en3Y89BDhyAwSKWNFIItypBAE44/a45aa2a15a3e4709e05d165c9e037326_FiraBall.png\"},\"Power\":\"1\",\"createdAt\":\"2021-10-27T09:39:43.270Z\",\"updatedAt\":\"2021-10-27T09:40:12.601Z\",\"Name\":\"FireBall\",\"nft_id\":0,\"objectId\":\"4xWsAeux1biB2LCwtENyp9zy\",\"__type\":\"Object\",\"className\":\"NFT\"}}"
name: ""
owner_of: "0x794ed60a2e46565b5e4762ed524ad87a4d9e21e7"
symbol: ""
synced_at: "2021-10-27T09:48:26.231Z"
token_address: "0xffd7beb5eaf1ecbe72dcb70d6dab93105e561249"
token_id: "0"
token_uri: ".....

The metadata that you have there with that result at the beginning may not be what you wanted. You can not remove that result field that it is returned by a cloud function.

If i understand my nft are in the contract ?
im just the owner of the contract.

i need to write a transfer function contract => adress ?

you are already the owner of that NFT, you can transfer it directly from your address (0x794ed60a2e46565b5e4762ed524ad87a4d9e21e7) to a new address if you want

1 Like

ok thanks for your time :grinning:

i will try to understand harder.

1 Like