diff --git a/chaincode/.env.example b/miniwallet/.env.example similarity index 100% rename from chaincode/.env.example rename to miniwallet/.env.example diff --git a/chaincode/.eslintignore b/miniwallet/.eslintignore similarity index 100% rename from chaincode/.eslintignore rename to miniwallet/.eslintignore diff --git a/chaincode/.eslintrc.js b/miniwallet/.eslintrc.js similarity index 100% rename from chaincode/.eslintrc.js rename to miniwallet/.eslintrc.js diff --git a/chaincode/.gitignore b/miniwallet/.gitignore similarity index 100% rename from chaincode/.gitignore rename to miniwallet/.gitignore diff --git a/chaincode/.npmignore b/miniwallet/.npmignore similarity index 100% rename from chaincode/.npmignore rename to miniwallet/.npmignore diff --git a/chaincode/.solhint.json b/miniwallet/.solhint.json similarity index 100% rename from chaincode/.solhint.json rename to miniwallet/.solhint.json diff --git a/chaincode/.solhintignore b/miniwallet/.solhintignore similarity index 100% rename from chaincode/.solhintignore rename to miniwallet/.solhintignore diff --git a/chaincode/README.md b/miniwallet/README.md similarity index 100% rename from chaincode/README.md rename to miniwallet/README.md diff --git a/chaincode/contracts/AssetManager.sol b/miniwallet/contracts/AssetManager.sol similarity index 100% rename from chaincode/contracts/AssetManager.sol rename to miniwallet/contracts/AssetManager.sol diff --git a/chaincode/contracts/Enums.sol b/miniwallet/contracts/Enums.sol similarity index 100% rename from chaincode/contracts/Enums.sol rename to miniwallet/contracts/Enums.sol diff --git a/chaincode/contracts/debug/TestTokens.sol b/miniwallet/contracts/debug/TestTokens.sol similarity index 100% rename from chaincode/contracts/debug/TestTokens.sol rename to miniwallet/contracts/debug/TestTokens.sol diff --git a/chaincode/contracts/lib/SafeCast.sol b/miniwallet/contracts/lib/SafeCast.sol similarity index 100% rename from chaincode/contracts/lib/SafeCast.sol rename to miniwallet/contracts/lib/SafeCast.sol diff --git a/chaincode/deploy/001_deploy_assetManager.ts b/miniwallet/deploy/001_deploy_assetManager.ts similarity index 100% rename from chaincode/deploy/001_deploy_assetManager.ts rename to miniwallet/deploy/001_deploy_assetManager.ts diff --git a/chaincode/hardhat.config.ts b/miniwallet/hardhat.config.ts similarity index 100% rename from chaincode/hardhat.config.ts rename to miniwallet/hardhat.config.ts diff --git a/chaincode/package.json b/miniwallet/package.json similarity index 100% rename from chaincode/package.json rename to miniwallet/package.json diff --git a/miniwallet/src/config.ts b/miniwallet/src/config.ts new file mode 100644 index 0000000..2839aa7 --- /dev/null +++ b/miniwallet/src/config.ts @@ -0,0 +1,16 @@ +import { ethers } from 'ethers' +import 'dotenv/config' + +export default { + initialOperatorThreshold: process.env.INITIAL_OPERATOR_THRESHOLD, + initialOperators: JSON.parse(process.env.INITIAL_OPERATORS || '[]'), + initialUserLimit: ethers.utils.parseEther(process.env.INIITIAL_USER_LIMIT || '1000000'), + initialAuthLimit: ethers.utils.parseEther(process.env.INIITIAL_AUTH_LIMIT || '100000'), + + test: { + initialOperatorThreshold: process.env.TEST_INITIAL_OPERATOR_THRESHOLD, + initialOperators: JSON.parse(process.env.TEST_INITIAL_OPERATORS || '[]'), + initialUserLimit: ethers.utils.parseEther(process.env.TEST_INIITIAL_USER_LIMIT || '1000'), + initialAuthLimit: ethers.utils.parseEther(process.env.TEST_INIITIAL_AUTH_LIMIT || '100') + } +} diff --git a/chaincode/test/README.md b/miniwallet/test/README.md similarity index 100% rename from chaincode/test/README.md rename to miniwallet/test/README.md diff --git a/chaincode/test/admin.ts b/miniwallet/test/admin.ts similarity index 100% rename from chaincode/test/admin.ts rename to miniwallet/test/admin.ts diff --git a/chaincode/test/approve.ts b/miniwallet/test/approve.ts similarity index 100% rename from chaincode/test/approve.ts rename to miniwallet/test/approve.ts diff --git a/chaincode/test/deposit.ts b/miniwallet/test/deposit.ts similarity index 100% rename from chaincode/test/deposit.ts rename to miniwallet/test/deposit.ts diff --git a/chaincode/test/extra.ts b/miniwallet/test/extra.ts similarity index 100% rename from chaincode/test/extra.ts rename to miniwallet/test/extra.ts diff --git a/chaincode/test/send.ts b/miniwallet/test/send.ts similarity index 100% rename from chaincode/test/send.ts rename to miniwallet/test/send.ts diff --git a/chaincode/test/transfer.ts b/miniwallet/test/transfer.ts similarity index 100% rename from chaincode/test/transfer.ts rename to miniwallet/test/transfer.ts diff --git a/miniwallet/test/utilities/constants.ts b/miniwallet/test/utilities/constants.ts new file mode 100644 index 0000000..53bc0fb --- /dev/null +++ b/miniwallet/test/utilities/constants.ts @@ -0,0 +1,12 @@ +export default { + TokenType: { + 0: 'ERC20', + 1: 'ERC721', + 2: 'ERC1155', + 3: 'NONE', + ERC20: 0, + ERC721: 1, + ERC1155: 2, + NONE: 3 + } +} diff --git a/chaincode/test/utilities/index.ts b/miniwallet/test/utilities/index.ts similarity index 100% rename from chaincode/test/utilities/index.ts rename to miniwallet/test/utilities/index.ts diff --git a/chaincode/test/withdraw.ts b/miniwallet/test/withdraw.ts similarity index 100% rename from chaincode/test/withdraw.ts rename to miniwallet/test/withdraw.ts diff --git a/chaincode/tsconfig.json b/miniwallet/tsconfig.json similarity index 100% rename from chaincode/tsconfig.json rename to miniwallet/tsconfig.json diff --git a/chaincode/yarn.lock b/miniwallet/yarn.lock similarity index 100% rename from chaincode/yarn.lock rename to miniwallet/yarn.lock