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

feat(tokenMintTransaction): Implement TokenMintTransaction E2E tests: TCK #310

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions .eslintrc.cjs

This file was deleted.

1 change: 0 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
"arrowParens": "always",
"endOfLine": "lf"
}

Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ The tests contained in this specification will assume that a valid fungible toke
| 7 | Mints an amount of 18,446,744,073,709,551,614 (uint64 max - 1) fungible tokens | tokenId=<CREATED_FUNGIBLE_TOKEN_ID>, amount="18446744073709551614", commonTransactionParams.signers=[<CREATED_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint fails with an INVALID_TOKEN_MINT_AMOUNT response code from the network. | N |
| 8 | Mints an amount of 18,446,744,073,709,551,615 (uint64 max) fungible tokens | tokenId=<CREATED_FUNGIBLE_TOKEN_ID>, amount="18446744073709551615", commonTransactionParams.signers=[<CREATED_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint fails with an INVALID_TOKEN_MINT_AMOUNT response code from the network. | N |
| 9 | Mints an amount of 10,000 fungible tokens with 2 decimals | tokenId=<CREATED_FUNGIBLE_TOKEN_ID>, amount="10000", commonTransactionParams.signers=[<CREATED_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint succeeds and the token's treasury account contains 100 more minted tokens. | N |
| 10 | Mints an amount of 10,000 fungible tokens with 1,000 max supply | tokenId=<CREATED_FUNGIBLE_TOKEN_ID>, amount="10000", commonTransactionParams.signers=[<CREATED_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint fails with an INVALID_TOKEN_MINT_AMOUNT response code from the network. | N |
| 10 | Mints an amount of 10,000 fungible tokens with 1,000 max supply | tokenId=<CREATED_FUNGIBLE_TOKEN_ID>, amount="10000", commonTransactionParams.signers=[<CREATED_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint fails with an TOKEN_MAX_SUPPLY_REACHED response code from the network. | N |
| 11 | Mints fungible tokens with the treasury account frozen | tokenId=<CREATED_FUNGIBLE_TOKEN_ID>, amount="1000000", commonTransactionParams.signers=[<CREATED_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint fails with an ACCOUNT_FROZEN_FOR_TOKEN response code from the network. | N |
| 12 | Mints paused fungible tokens | tokenId=<PAUSED_FUNGIBLE_TOKEN_ID>, amount="1000000", commonTransactionParams.signers=[<PAUSED_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint fails with an TOKEN_IS_PAUSED response code from the network. | N |
| 13 | Mints an amount of 1,000,000 NFTs | tokenId=<CREATED_NON_FUNGIBLE_TOKEN_ID>, amount="1000000", commonTransactionParams.signers=[<CREATED_NON_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint fails with an INVALID_TOKEN_MINT_METADATA response code from the network. | N |
Expand Down Expand Up @@ -158,10 +158,10 @@ The tests contained in this specification will assume that a valid fungible toke
| 2 | Mints an NFT with empty metadata | tokenId=<CREATED_NON_FUNGIBLE_TOKEN_ID>, metadata=[""], commonTransactionParams.signers=[<CREATED_NON_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint succeeds and the token's treasury account contains an NFT with no metadata. | N |
| 3 | Mints an NFT with non-ASCII metadata | tokenId=<CREATED_NON_FUNGIBLE_TOKEN_ID>, metadata=["𝐭𝐞𝐬𝐭𝐝𝐚𝐭𝐚"], commonTransactionParams.signers=[<CREATED_NON_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint succeeds and the token's treasury account contains an NFT with metadata "𝐭𝐞𝐬𝐭𝐝𝐚𝐭𝐚". | N |
| 4 | Mints 3 NFTs | tokenId=<CREATED_NON_FUNGIBLE_TOKEN_ID>, metadata=["1234", "5678", "90ab"], commonTransactionParams.signers=[<CREATED_NON_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint succeeds and the token's treasury account contains 3 NFTs with the input metadata. | N |
| 5 | Mints no NFTs | tokenId=<CREATED_NON_FUNGIBLE_TOKEN_ID>, commonTransactionParams.signers=[<CREATED_NON_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint succeeds and the token's treasury account contains 0 more NFTs. | N |
| 5 | Mints no NFTs | tokenId=<CREATED_NON_FUNGIBLE_TOKEN_ID>, commonTransactionParams.signers=[<CREATED_NON_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint fails with an INVALID_TOKEN_MINT_METADATA response code from the network. | N |
| 6 | Mints an amount of 3 NFTs with 1 max supply | tokenId=<CREATED_NON_FUNGIBLE_TOKEN_ID>, metadata=["1234", "5678", "90ab"], commonTransactionParams.signers=[<CREATED_NON_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint fails with an TOKEN_MAX_SUPPLY_REACHED response code from the network. | N |
| 7 | Mints NFTs with the treasury account frozen | tokenId=<CREATED_NON_FUNGIBLE_TOKEN_ID>, amount="1000000", commonTransactionParams.signers=[<CREATED_NON_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint fails with an ACCOUNT_FROZEN_FOR_TOKEN response code from the network. | N |
| 8 | Mints paused NFTs | tokenId=<PAUSED_FUNGIBLE_TOKEN_ID>, metadata=["1234"], commonTransactionParams.signers=[<PAUSED_NON_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint fails with an TOKEN_IS_PAUSED response code from the network. | N |
| 7 | Mints NFTs with the treasury account frozen | tokenId=<CREATED_NON_FUNGIBLE_TOKEN_ID>, metadata=["1234", "5678", "90ab"], commonTransactionParams.signers=[<CREATED_NON_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint fails with an ACCOUNT_FROZEN_FOR_TOKEN response code from the network. | N |
| 8 | Mints paused NFT | tokenId=<PAUSED_FUNGIBLE_TOKEN_ID>, metadata=["1234"], commonTransactionParams.signers=[<PAUSED_NON_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint fails with an TOKEN_IS_PAUSED response code from the network. | N |
| 9 | Mints fungible tokens with metadata | tokenId=<CREATED_FUNGIBLE_TOKEN_ID>, metadata=["1234"], commonTransactionParams.signers=[<CREATED_FUNGIBLE_TOKEN_SUPPLY_KEY>] | The token mint succeeds and the token's treasury account contains 0 more minted tokens. | N |

#### JSON Request Example
Expand Down
33 changes: 33 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { defineConfig } from "eslint-define-config";
import typescriptEslintPlugin from "@typescript-eslint/eslint-plugin";
import typescriptEslintParser from "@typescript-eslint/parser";
import prettierPlugin from "eslint-plugin-prettier";

export default defineConfig([
{
files: ["**/*.js", "**/*.ts", "**/*.tsx"],
languageOptions: {
parser: typescriptEslintParser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
},
plugins: {
"@typescript-eslint": typescriptEslintPlugin,
prettier: prettierPlugin,
},
ignores: ["mochawesome-report/assets/app.js"],
rules: {
"no-console": ["warn", { allow: ["warn"] }],
"prefer-const": "error",
semi: ["error", "always"],
curly: ["error", "all"],
eqeqeq: ["error", "always"],
"no-multi-spaces": ["error"],
"no-duplicate-imports": ["error"],
"prettier/prettier": "error",
"@typescript-eslint/no-unused-vars": ["warn"],
},
},
]);
Loading