-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(tokenMintTransaction): Implement TokenMintTransaction
E2E tests: TCK
#310
base: main
Are you sure you want to change the base?
feat(tokenMintTransaction): Implement TokenMintTransaction
E2E tests: TCK
#310
Conversation
Signed-off-by: Rob Walworth <robert.walworth@swirldslabs.com>
Signed-off-by: Rob Walworth <robert.walworth@swirldslabs.com>
Signed-off-by: Rob Walworth <robert.walworth@swirldslabs.com>
Signed-off-by: Rob Walworth <robert.walworth@swirldslabs.com>
Signed-off-by: Rob Walworth <robert.walworth@swirldslabs.com>
…for TS Signed-off-by: ivaylogarnev-limechain <ivaylo.garnev@limechain.tech>
…action Signed-off-by: ivaylogarnev-limechain <ivaylo.garnev@limechain.tech>
expect( | ||
( | ||
await JSONRPCRequest(this, "mintToken", { | ||
tokenId, | ||
amount, | ||
commonTransactionParams: { | ||
signers: [supplyKey], | ||
}, | ||
}) | ||
).newTotalSupply, | ||
).to.equal(amount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test fails in JS.
Could "expect" have been mistakenly used here? The response only returns the transaction status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec says that newTotalSupply
should be returned as well, along with serialNumbers
if NFTs were minted
const response = await JSONRPCRequest(this, "mintToken", { | ||
tokenId, | ||
metadata: [metadata], | ||
commonTransactionParams: { | ||
signers: [supplyKey], | ||
}, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test fails in JS.
The response only returns the transaction status. Did you mean to query the token instead to retrieve the information?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Response should include newTotalSupply
and optionally serialNumbers
assert.fail("Should throw an error"); | ||
}); | ||
|
||
it("(#10) Mints a paused token", async function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test fails with TOKEN_HAS_NO_SUPPLY_KEY
instead of TOKEN_IS_PAUSED
.
Shouldn't the tokenId
be set in the mintToken transaction body rather than creating a new token that isn’t paused? When I do this, it succeeds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep this is a typo, fixed.
expect( | ||
( | ||
await JSONRPCRequest(this, "mintToken", { | ||
tokenId, | ||
amount, | ||
commonTransactionParams: { | ||
signers: [supplyKey], | ||
}, | ||
}) | ||
).newTotalSupply, | ||
).to.equal(amount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test fails in JS.
Could "expect" have been mistakenly used here? The response only returns the transaction status
This is also valid for tests #2/#3/#4/#5/#9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Response should include newTotalSupply
and optionally serialNumbers
}); | ||
|
||
describe("Metadata", function () { | ||
it("(#1) Mints an NFT", async function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test fails in JS.
The response only returns the transaction status
This is also valid for tests #1/#2/#4/#9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Response should include newTotalSupply
and optionally serialNumbers
assert.fail("Should throw an error"); | ||
}); | ||
|
||
it("(#6) Mints an amount of 3 NFTs with 1 max supply", async function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test fails in JS, it does not throw an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm it's passing for C++, are you creating the token with all the correct fields?
Description:
This PR implements the
TokenMintTransaction
tests documented indocs/test-specifications/token-service/tokenMintTransaction.md
.Related issue(s):
#304
Checklist