Skip to content

Swanky node returning invalid data from storage #75

@tad3j

Description

@tad3j

Description

After deploying a psp34 contract and minting an NFT with metadata URI the swanky node seems to be returning an ending character \x00 instead of the URI that was set via mint call. If I perform the same test on testnet I get the correct URI returned.

Steps to Reproduce

Failing test: https://github.com/tad3j/apillon-gratitude-nft/blob/master/tests/apillon-gratitude-nft.spec.ts#L67

const TOKEN_BASE_URI = 'ipfs://base-uri/'
const TOKEN_URI = `${TOKEN_BASE_URI}/1.json`

it("owner can mint NFT", async () => {
        expect((await psp.withSigner(deployer).tx.mint(customer.address, [TOKEN_URI])).result).to.be.ok;
        expect(
            (await psp.query.totalSupply()).value.unwrap().toNumber()
        ).to.equal(1);
        expect((await psp.query.tokenUri(1)).value.unwrap().ok).to.equal(TOKEN_URI)
    });

Expected vs. Actual Behavior

tokenUri should return value ipfs://base-uri/1.json but it actually returns \x00 locally when using swanky node.

Environment

  • Operating system: Linux Mint 21 (Kernel: Linux 5.15.0-87-generic)
  • Rust version: rustc 1.73.0 (cc66ad468 2023-10-03)
  • Swanky node version: version 1.6.0-e5e6b8f914b

Logs, Errors or Screenshots
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions