Skip to content

Commit

Permalink
Merge pull request #160 from UniqueNetwork/tests/e2e
Browse files Browse the repository at this point in the history
Tests/e2e
  • Loading branch information
abdulgalimov committed Apr 9, 2024
2 parents b4a232c + be0f44d commit 2b1b0c3
Show file tree
Hide file tree
Showing 15 changed files with 1,543 additions and 4 deletions.
23 changes: 23 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "ts-node",
"type": "node",
"request": "launch",
"args": ["${relativeFile}"],
"runtimeArgs": ["-r", "ts-node/register"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "Hardhat individual test",
"type": "node",
"request": "launch",
"console": "integratedTerminal",
"runtimeExecutable": "yarn",
"runtimeArgs": ["testhh", "${file}"]
}
]
}
7 changes: 6 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { HardhatUserConfig, task } from 'hardhat/config';
import '@nomicfoundation/hardhat-toolbox';
import { HardhatUserConfig, task } from 'hardhat/config';
import { loadConfig } from './packages/contracts/scripts';
import { buildVersion } from './packages/contracts/tasks';
import testConfig from './packages/contracts/test/utils/testConfig';

const appConfig = loadConfig();

Expand All @@ -24,6 +25,10 @@ const config: HardhatUserConfig = {
url: appConfig.opal.rpcUrl,
accounts: appConfig.accounts,
},
test: {
url: testConfig.ethRpcUrl,
accounts: testConfig.ethPrivateKeys,
}
},
mocha: {
timeout: 100000000,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "unique-marketplace-backend",
"version": "3.0.238",
"version": "3.0.242",
"description": "Backend project for unique marketplace",
"author": "Unique Network",
"private": true,
Expand All @@ -17,6 +17,7 @@
"test": "nx run-many --target=test --all --parallel=1",
"test:market": "nx test market",
"test:escrow": "nx test escrow",
"testhh": "yarn hardhat test --no-compile --network test",
"lint": "nx run-many --target=lint --all",
"lint:fix": "nx run-many --target=lint --all --fix --skip-nx-cache",
"start": "node -r source-map-support/register ./dist/packages/market/main.js",
Expand Down
155 changes: 155 additions & 0 deletions packages/contracts/test/abi/CollectionHelpers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "collectionId",
"type": "address"
}
],
"name": "CollectionChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "collectionId",
"type": "address"
}
],
"name": "CollectionCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "collectionId",
"type": "address"
}
],
"name": "CollectionDestroyed",
"type": "event"
},
{
"inputs": [
{ "internalType": "uint32", "name": "collectionId", "type": "uint32" }
],
"name": "collectionAddress",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "collectionCreationFee",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "collectionAddress",
"type": "address"
}
],
"name": "collectionId",
"outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "string", "name": "name", "type": "string" },
{ "internalType": "uint8", "name": "decimals", "type": "uint8" },
{ "internalType": "string", "name": "description", "type": "string" },
{ "internalType": "string", "name": "tokenPrefix", "type": "string" }
],
"name": "createFTCollection",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{ "internalType": "string", "name": "name", "type": "string" },
{ "internalType": "string", "name": "description", "type": "string" },
{ "internalType": "string", "name": "tokenPrefix", "type": "string" }
],
"name": "createNFTCollection",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{ "internalType": "string", "name": "name", "type": "string" },
{ "internalType": "string", "name": "description", "type": "string" },
{ "internalType": "string", "name": "tokenPrefix", "type": "string" }
],
"name": "createRFTCollection",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "collectionAddress",
"type": "address"
}
],
"name": "destroyCollection",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "collectionAddress",
"type": "address"
}
],
"name": "isCollectionExist",
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "collection", "type": "address" },
{ "internalType": "string", "name": "baseUri", "type": "string" }
],
"name": "makeCollectionERC721MetadataCompatible",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{ "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }
],
"name": "supportsInterface",
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
"stateMutability": "view",
"type": "function"
}
]
Loading

0 comments on commit 2b1b0c3

Please sign in to comment.