diff --git a/smart-contracts/assembly/contracts/NFT/NFT-example.ts b/smart-contracts/assembly/contracts/NFT/NFT-example.ts index d4ea73a..c44d5cf 100644 --- a/smart-contracts/assembly/contracts/NFT/NFT-example.ts +++ b/smart-contracts/assembly/contracts/NFT/NFT-example.ts @@ -55,12 +55,12 @@ export function constructor(binaryArgs: StaticArray): void { setOwner(new Args().add(Context.caller().toString()).serialize()); } -export function name(): string { - return _name(); +export function name(): StaticArray { + return stringToBytes(_name()); } -export function symbol(): string { - return _symbol(); +export function symbol(): StaticArray { + return stringToBytes(_symbol()); } /** diff --git a/smart-contracts/assembly/contracts/NFT/__tests__/NFT-example.spec.ts b/smart-contracts/assembly/contracts/NFT/__tests__/NFT-example.spec.ts index b1ed479..c2e20b3 100644 --- a/smart-contracts/assembly/contracts/NFT/__tests__/NFT-example.spec.ts +++ b/smart-contracts/assembly/contracts/NFT/__tests__/NFT-example.spec.ts @@ -50,10 +50,10 @@ beforeEach(() => { describe('Initialization', () => { test('get name', () => { - expect(name()).toBe(NFTName); + expect(bytesToString(name())).toStrictEqual(NFTName); }); test('get symbol', () => { - expect(symbol()).toBe(NFTSymbol); + expect(bytesToString(symbol())).toStrictEqual(NFTSymbol); }); test('get owner', () => { expect(bytesToString(ownerAddress([]))).toBe(contractOwner);