Add project scaffolding
All checks were successful
check / check (push) Successful in 10s

Makefile, Dockerfile, CI workflow, prettier config, manifests for
Chrome (MV3) and Firefox (MV2), source directory structure, and
minimal test suite. All checks pass.
This commit is contained in:
2026-02-24 09:48:21 +07:00
parent c2ff5d1788
commit 065f0eaa81
22 changed files with 3521 additions and 0 deletions

29
tests/constants.test.js Normal file
View File

@@ -0,0 +1,29 @@
const {
ETHEREUM_MAINNET_CHAIN_ID,
DEFAULT_RPC_URL,
BIP44_ETH_PATH,
ERC20_ABI,
} = require("../src/shared/constants");
describe("constants", () => {
test("exports expected chain ID", () => {
expect(ETHEREUM_MAINNET_CHAIN_ID).toBe("0x1");
});
test("exports a default RPC URL", () => {
expect(typeof DEFAULT_RPC_URL).toBe("string");
expect(DEFAULT_RPC_URL.startsWith("https://")).toBe(true);
});
test("exports BIP-44 Ethereum derivation path", () => {
expect(BIP44_ETH_PATH).toBe("m/44'/60'/0'/0");
});
test("exports ERC-20 ABI with expected functions", () => {
expect(Array.isArray(ERC20_ABI)).toBe(true);
expect(ERC20_ABI.length).toBeGreaterThan(0);
const joined = ERC20_ABI.join(" ");
expect(joined).toContain("balanceOf");
expect(joined).toContain("transfer");
});
});