diff --git a/README.md b/README.md index 195b9836..38e02ca9 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,6 @@ npx -p @tradetrust-tt/tradetrust-cli tradetrust | Amoy | amoy | 80002 | Polygon | Testnet | | XDC Network | xdc | 50 | XDC Network | Mainnet | | Apothem | xdcapothem | 51 | XDC Network | Testnet | -| Hedera Mainnet | hederamainnet | 295 | Hedera | Mainnet | -| Hedera Testnet | hederatestnet | 296 | Hedera | Testnet | | Stability | stability | 101010 | Stability | Mainnet | | Stability Testnet | stabilitytestnet | 20180427 | Stability | Testnet | | Astron | Astron | 1338 | Astron | Mainnet | diff --git a/package-lock.json b/package-lock.json index aba18449..e5ec7244 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,12 +11,12 @@ "dependencies": { "@govtechsg/oa-encryption": "^1.3.3", "@snyk/protect": "^1.1196.0", - "@tradetrust-tt/dnsprove": "^2.14.2", - "@tradetrust-tt/document-store": "^2.7.0", - "@tradetrust-tt/token-registry": "^4.12.1", - "@tradetrust-tt/tradetrust": "^6.9.6", - "@tradetrust-tt/tradetrust-config": "^1.15.1", - "@tradetrust-tt/tt-verify": "^8.10.2", + "@tradetrust-tt/dnsprove": "^2.15.0", + "@tradetrust-tt/document-store": "^4.1.0", + "@tradetrust-tt/token-registry": "^4.15.0", + "@tradetrust-tt/tradetrust": "^6.9.7", + "@tradetrust-tt/tradetrust-config": "^1.16.0", + "@tradetrust-tt/tt-verify": "^9.2.0", "ajv": "^8.4.0", "ajv-formats": "^2.1.0", "chalk": "^4.1.2", @@ -77,6 +77,11 @@ "node": "18.x" } }, + "node_modules/@adraffy/ens-normalize": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", + "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==" + }, "node_modules/@babel/code-frame": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", @@ -3392,6 +3397,28 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -4128,9 +4155,9 @@ } }, "node_modules/@tradetrust-tt/dnsprove": { - "version": "2.14.2", - "resolved": "https://registry.npmjs.org/@tradetrust-tt/dnsprove/-/dnsprove-2.14.2.tgz", - "integrity": "sha512-wXoLzlOzFilIvSXvHIODv6vR9MLHcJS5681Ic+nwlTgiHOKOg29vPX/h3Dl4YrcKgiHZwH2p/VbtcUJeSDYOgA==", + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/dnsprove/-/dnsprove-2.15.0.tgz", + "integrity": "sha512-e7VZoaPL1B7ishBsSxvMuHahDqxX48PDiqKtkNzzKg3CF4K2yM+I55XVpyQG+O5sfQswJXVr4iACIZ0lG20VOA==", "dependencies": { "axios": "1.7.2", "debug": "^4.3.1", @@ -4141,14 +4168,17 @@ } }, "node_modules/@tradetrust-tt/document-store": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@tradetrust-tt/document-store/-/document-store-2.7.0.tgz", - "integrity": "sha512-wMTQkZ4FNzYvlWwaeKCHuV8fYxw+kefI38dTMHY5fpV3B5oaapePFGKHDs+4IrV1ZVFHQbqR/r/MP7dNwwjJDA==" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/document-store/-/document-store-4.1.0.tgz", + "integrity": "sha512-8q1zX8iWkOcIPpVovhdeuCetbAFh9ROlx0iItszp+vcDYVXzVhPeC9ynl0zOLknvyeaaMptdOmT1RE5TDLs1BA==", + "engines": { + "node": ">=18.x" + } }, "node_modules/@tradetrust-tt/token-registry": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@tradetrust-tt/token-registry/-/token-registry-4.12.1.tgz", - "integrity": "sha512-GM/q+pyRSzoRAaHuIxt1W/tr45JXv1CPMwF4nYIZhofDtVJTbLIeQsEnBpzJSyCp4hSQUe1LDAI3ma6SZRMq8A==", + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/token-registry/-/token-registry-4.15.0.tgz", + "integrity": "sha512-hwi/a8O1ng1Zj+gleg/9HaaggDGe8xxeVB0ghfVctrPFW93YXgPBlrGNPPox/02DmiMOSe5QDxYpRq7ZWgtwfA==", "dependencies": { "@typechain/ethers-v5": "10.2.1" }, @@ -4157,9 +4187,9 @@ } }, "node_modules/@tradetrust-tt/tradetrust": { - "version": "6.9.6", - "resolved": "https://registry.npmjs.org/@tradetrust-tt/tradetrust/-/tradetrust-6.9.6.tgz", - "integrity": "sha512-UyG+4dzzp8t79so7YXAKh9YxoyfJ89mtodkYwxZg8rp0qY5YPSKjRS5Df79SxTJsmUCRTvJrAlJfFhGZ7v8HOg==", + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/tradetrust/-/tradetrust-6.9.7.tgz", + "integrity": "sha512-fohB+lnH/1SVLlSeHKPh34wnj3FAUQcuBxgoFFcQVISgTP/GTOZVyIocCzfoMW4X/SDdmN/bdIXqHgEAR0HV/A==", "hasInstallScript": true, "dependencies": { "@govtechsg/jsonld": "^0.1.1", @@ -4177,13 +4207,13 @@ "validator": "^13.11.0" }, "engines": { - "node": "18.x" + "node": ">=18.x" } }, "node_modules/@tradetrust-tt/tradetrust-config": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@tradetrust-tt/tradetrust-config/-/tradetrust-config-1.15.1.tgz", - "integrity": "sha512-srO2N3zdmP8pJ1MlMzjKKcsl+vo+EEJwhpXgeh6taEqmMNzkIyYhYYVp0E1B4156S3ZxAk5pyCSaEAqk4Ke/Vw==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/tradetrust-config/-/tradetrust-config-1.16.0.tgz", + "integrity": "sha512-HUgm+Oy5wCHAntOME+n4JoCU+AA8B8YTnQHyoXCJtPMqDFFetj6oXhcHiaVJoC162HiHbgcWGBtk9uODe1Bdtg==", "dependencies": { "ajv": "^8.12.0", "ajv-formats": "^2.1.1", @@ -4221,18 +4251,18 @@ } }, "node_modules/@tradetrust-tt/tt-verify": { - "version": "8.10.2", - "resolved": "https://registry.npmjs.org/@tradetrust-tt/tt-verify/-/tt-verify-8.10.2.tgz", - "integrity": "sha512-7kkLZ9BxzTJUX3pdo/MmLSVS0AhQd72kECwg/cdTnTBM8eFHjnWVkGK67ubA4pnSuq0ZsZfzwwUh9E2J5zYSWw==", - "dependencies": { - "@tradetrust-tt/dnsprove": "^2.14.2", - "@tradetrust-tt/document-store": "^2.7.0", - "@tradetrust-tt/token-registry": "^4.12.1", - "@tradetrust-tt/tradetrust": "^6.9.0", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/tt-verify/-/tt-verify-9.2.0.tgz", + "integrity": "sha512-DmmRdERLk8imixPJh+1gs9T9PE3DYCou+84sk8f+3Dp2e8owqg8wD67Sa1Rzi0rd5J19H2M9aEYiRzSIHG05xg==", + "dependencies": { + "@tradetrust-tt/dnsprove": "^2.15.0", + "@tradetrust-tt/document-store": "^4.1.0", + "@tradetrust-tt/token-registry": "^5.1.0", + "@tradetrust-tt/tradetrust": "^6.9.7", "axios": "^1.7.2", "debug": "^4.3.1", "did-resolver": "^3.1.0", - "ethers": "^5.4.0", + "ethers": "^5.7.2", "ethr-did-resolver": "^4.3.3", "node-cache": "^5.1.2", "runtypes": "^6.3.0", @@ -4240,6 +4270,82 @@ }, "engines": { "node": ">=18.x" + }, + "peerDependencies": { + "ethers": "^5.7.2" + } + }, + "node_modules/@tradetrust-tt/tt-verify/node_modules/@tradetrust-tt/token-registry": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@tradetrust-tt/token-registry/-/token-registry-5.1.0.tgz", + "integrity": "sha512-FfOJZMfNfsIdPRCsVB/P3LE9BTO0/kx7QfmNB7/Wfja8kwMspy3v55TvQ93B6nXBSp+VMvUOsNLd1ly7V4D7dg==", + "dependencies": { + "ethers": "^6.13.4" + } + }, + "node_modules/@tradetrust-tt/tt-verify/node_modules/@tradetrust-tt/token-registry/node_modules/ethers": { + "version": "6.13.4", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.13.4.tgz", + "integrity": "sha512-21YtnZVg4/zKkCQPjrDj38B1r4nQvTZLopUGMLQ1ePU2zV/joCfDC3t3iKQjWRzjjjbzR+mdAIoikeBRNkdllA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@adraffy/ens-normalize": "1.10.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.2", + "@types/node": "22.7.5", + "aes-js": "4.0.0-beta.5", + "tslib": "2.7.0", + "ws": "8.17.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tradetrust-tt/tt-verify/node_modules/@types/node": { + "version": "22.7.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.5.tgz", + "integrity": "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/@tradetrust-tt/tt-verify/node_modules/aes-js": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==" + }, + "node_modules/@tradetrust-tt/tt-verify/node_modules/tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" + }, + "node_modules/@tradetrust-tt/tt-verify/node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, "node_modules/@tsconfig/node10": { @@ -18801,6 +18907,11 @@ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", diff --git a/package.json b/package.json index 3c33f338..4b54f859 100644 --- a/package.json +++ b/package.json @@ -70,12 +70,12 @@ "dependencies": { "@govtechsg/oa-encryption": "^1.3.3", "@snyk/protect": "^1.1196.0", - "@tradetrust-tt/dnsprove": "^2.14.2", - "@tradetrust-tt/document-store": "^2.7.0", - "@tradetrust-tt/token-registry": "^4.12.1", - "@tradetrust-tt/tradetrust": "^6.9.6", - "@tradetrust-tt/tradetrust-config": "^1.15.1", - "@tradetrust-tt/tt-verify": "^8.10.2", + "@tradetrust-tt/dnsprove": "^2.15.0", + "@tradetrust-tt/document-store": "^4.1.0", + "@tradetrust-tt/token-registry": "^4.15.0", + "@tradetrust-tt/tradetrust": "^6.9.7", + "@tradetrust-tt/tradetrust-config": "^1.16.0", + "@tradetrust-tt/tt-verify": "^9.2.0", "ajv": "^8.4.0", "ajv-formats": "^2.1.0", "chalk": "^4.1.2", diff --git a/src/commands/config/config.type.ts b/src/commands/config/config.type.ts index 70adb417..ab7c6d80 100644 --- a/src/commands/config/config.type.ts +++ b/src/commands/config/config.type.ts @@ -13,6 +13,5 @@ export enum TestNetwork { Sepolia = "sepolia", Amoy = "amoy (polygon)", Apothem = "apothem (xdc)", - Hedera = "hedera (testnet)", StabilityTestnet = "stability (testnet)", } diff --git a/src/commands/config/create.ts b/src/commands/config/create.ts index 30ceaaee..a8da4865 100644 --- a/src/commands/config/create.ts +++ b/src/commands/config/create.ts @@ -65,7 +65,6 @@ export const handler = async (args: CreateConfigCommand): Promise => { TestNetwork.Sepolia, TestNetwork.Amoy, TestNetwork.Apothem, - TestNetwork.Hedera, TestNetwork.StabilityTestnet, ]; const { network } = await inquirer.prompt({ @@ -91,7 +90,6 @@ const convertNetworkToNetworkCmdName = (selectedNetwork: TestNetwork): NetworkCm [TestNetwork.Sepolia]: NetworkCmdName.Sepolia, [TestNetwork.Amoy]: NetworkCmdName.Amoy, [TestNetwork.Apothem]: NetworkCmdName.XDCApothem, - [TestNetwork.Hedera]: NetworkCmdName.HederaTestnet, [TestNetwork.StabilityTestnet]: NetworkCmdName.StabilityTestnet, }; return network[selectedNetwork]; diff --git a/src/commands/dns/txt-record/__test__/__snapshots__/get.test.ts.snap b/src/commands/dns/txt-record/__test__/__snapshots__/get.test.ts.snap index f071e70e..6bb4c1fe 100644 --- a/src/commands/dns/txt-record/__test__/__snapshots__/get.test.ts.snap +++ b/src/commands/dns/txt-record/__test__/__snapshots__/get.test.ts.snap @@ -65,20 +65,6 @@ Array [ "netId": "137", "type": "openatts", }, - Object { - "addr": "0x740240f8d049420fC63C7ab2f0ad2910Ad6f9452", - "dnssec": true, - "net": "ethereum", - "netId": "295", - "type": "openatts", - }, - Object { - "addr": "0xb901968B6fC194f5518fee12d4cb719e4F0aF105", - "dnssec": true, - "net": "ethereum", - "netId": "295", - "type": "openatts", - }, Object { "addr": "0x48399Fb88bcD031C556F53e93F690EEC07963Af3", "dnssec": true, diff --git a/src/common/networks.ts b/src/common/networks.ts index eb20b9bd..9d73466e 100644 --- a/src/common/networks.ts +++ b/src/common/networks.ts @@ -2,7 +2,7 @@ import { providers } from "ethers"; import type { GasStationFunction } from "./gas-station"; import { gasStation } from "./gas-station"; -export type networkCurrency = "ETH" | "MATIC" | "XDC" | "HBAR" | "FREE" | "ASTRON"; +export type networkCurrency = "ETH" | "MATIC" | "XDC" | "FREE" | "ASTRON"; type SupportedNetwork = { explorer: string; @@ -21,8 +21,6 @@ export enum NetworkCmdName { Amoy = "amoy", XDC = "xdc", XDCApothem = "xdcapothem", - HederaMainnet = "hederamainnet", - HederaTestnet = "hederatestnet", StabilityTestnet = "stabilitytestnet", Stability = "stability", Astron = "astron", @@ -92,20 +90,6 @@ export const supportedNetwork: { networkName: NetworkCmdName.XDCApothem, currency: "XDC", }, - [NetworkCmdName.HederaMainnet]: { - explorer: "https://hashscan.io/mainnet", - provider: jsonRpcProvider("https://mainnet.hashio.io/api"), - networkId: 295, - networkName: NetworkCmdName.HederaMainnet, - currency: "HBAR", - }, - [NetworkCmdName.HederaTestnet]: { - explorer: "https://hashscan.io/testnet", - provider: jsonRpcProvider("https://testnet.hashio.io/api"), - networkId: 296, - networkName: NetworkCmdName.HederaTestnet, - currency: "HBAR", - }, [NetworkCmdName.Stability]: { explorer: "https://stability.blockscout.com", provider: jsonRpcProvider(`https://gtn.stabilityprotocol.com/zgt/tradeTrust`), diff --git a/src/implementations/deploy/document-store/document-store.test.ts b/src/implementations/deploy/document-store/document-store.test.ts index c4298784..20a04975 100644 --- a/src/implementations/deploy/document-store/document-store.test.ts +++ b/src/implementations/deploy/document-store/document-store.test.ts @@ -15,15 +15,6 @@ const deployParams: DeployDocumentStoreCommand = { dryRun: false, }; -const deployParamsHederaTestnet: DeployDocumentStoreCommand = { - storeName: "Test Document Store", - owner: "0x1234", - network: "hederatestnet", - key: "0000000000000000000000000000000000000000000000000000000000000001", - maxPriorityFeePerGasScale: 1, - dryRun: false, -}; - describe("document-store", () => { describe("deployDocumentStore", () => { const documentStoreFactory: any = DocumentStoreFactory; @@ -113,79 +104,5 @@ describe("document-store", () => { const addr = await passedSigner.getAddress(); expect(mockedDeploy.mock.calls[0][1]).toStrictEqual(addr); }); - - //Hedera Testnet - it("should take in the key from environment variable for hederatestnet", async () => { - process.env.OA_PRIVATE_KEY = "0000000000000000000000000000000000000000000000000000000000000002"; - - await deployDocumentStore({ - storeName: "Test", - network: "hederatestnet", - dryRun: false, - maxPriorityFeePerGasScale: 1, - }); - - const passedSigner: Wallet = mockedDocumentStoreFactory.mock.calls[0][0]; - expect(passedSigner.privateKey).toBe(`0x${process.env.OA_PRIVATE_KEY}`); - }); - - it("should take in the key from key file for hederatestnet", async () => { - await deployDocumentStore({ - storeName: "Test", - network: "hederatestnet", - keyFile: join(__dirname, "..", "..", "..", "..", "examples", "sample-key"), - dryRun: false, - maxPriorityFeePerGasScale: 1, - }); - - const passedSigner: Wallet = mockedDocumentStoreFactory.mock.calls[0][0]; - expect(passedSigner.privateKey).toBe(`0x0000000000000000000000000000000000000000000000000000000000000003`); - }); - - it("should pass in the correct params and return the deployed instance for hederatestnet", async () => { - const instance = await deployDocumentStore(deployParamsHederaTestnet); - - const passedSigner: Wallet = mockedDocumentStoreFactory.mock.calls[0][0]; - - expect(passedSigner.privateKey).toBe(`0x${deployParamsHederaTestnet.key}`); - expect(mockedDeploy.mock.calls[0][0]).toStrictEqual(deployParamsHederaTestnet.storeName); - expect(mockedDeploy.mock.calls[0][1]).toStrictEqual(deployParamsHederaTestnet.owner); - // price should be any length string of digits - expect(mockedDeploy.mock.calls[0][2].maxPriorityFeePerGas.toString()).toStrictEqual(expect.stringMatching(/\d+/)); - expect(instance.contractAddress).toBe("contractAddress"); - }); - - it("should allow errors to bubble up for hederatestnet", async () => { - mockedDeploy.mockRejectedValue(new Error("An Error")); - await expect(deployDocumentStore(deployParamsHederaTestnet)).rejects.toThrow("An Error"); - }); - - it("should throw when keys are not found anywhere for hederatestnet", async () => { - await expect( - deployDocumentStore({ - storeName: "Test", - network: "hederatestnet", - dryRun: false, - maxPriorityFeePerGasScale: 1, - }) - ).rejects.toThrow( - "No private key found in OA_PRIVATE_KEY, key, key-file, please supply at least one or supply an encrypted wallet path, or provide aws kms signer information" - ); - }); - - it("should default the owner as the deployer for hederatestnet", async () => { - process.env.OA_PRIVATE_KEY = "0000000000000000000000000000000000000000000000000000000000000002"; - - await deployDocumentStore({ - maxPriorityFeePerGasScale: 1, - storeName: "Test", - network: "hederatestnet", - dryRun: false, - }); - - const passedSigner: Wallet = mockedDocumentStoreFactory.mock.calls[0][0]; - const addr = await passedSigner.getAddress(); - expect(mockedDeploy.mock.calls[0][1]).toStrictEqual(addr); - }); }); }); diff --git a/src/implementations/deploy/title-escrow-factory/title-escrow-factory.test.ts b/src/implementations/deploy/title-escrow-factory/title-escrow-factory.test.ts index ebf34701..8fc49b7c 100644 --- a/src/implementations/deploy/title-escrow-factory/title-escrow-factory.test.ts +++ b/src/implementations/deploy/title-escrow-factory/title-escrow-factory.test.ts @@ -13,13 +13,6 @@ const deployParams: DeployTitleEscrowFactoryCommand = { maxPriorityFeePerGasScale: 1.0, }; -const deployParamsHederaTestnet: DeployTitleEscrowFactoryCommand = { - network: "hederatestnet", - key: "0000000000000000000000000000000000000000000000000000000000000001", - dryRun: false, - maxPriorityFeePerGasScale: 1.0, -}; - describe("title escrow factory", () => { describe("deployTitleEscrowFactory", () => { const mockedTitleEscrowFactory: jest.Mock = TitleEscrowFactory__factory as any; @@ -89,58 +82,5 @@ describe("title escrow factory", () => { "No private key found in OA_PRIVATE_KEY, key, key-file, please supply at least one or supply an encrypted wallet path, or provide aws kms signer information" ); }); - - //Hedera Testnet - it("should take in the key from environment variable for hederatestnet", async () => { - process.env.OA_PRIVATE_KEY = "0000000000000000000000000000000000000000000000000000000000000002"; - - await deployTitleEscrowFactory({ - network: "hederatestnet", - dryRun: false, - maxPriorityFeePerGasScale: 1.0, - }); - - const passedSigner: Wallet = mockedTitleEscrowFactory.mock.calls[0][0]; - expect(passedSigner.privateKey).toBe(`0x${process.env.OA_PRIVATE_KEY}`); - }); - - it("should take in the key from key file for hederatestnet", async () => { - await deployTitleEscrowFactory({ - network: "hederatestnet", - keyFile: join(__dirname, "..", "..", "..", "..", "examples", "sample-key"), - dryRun: false, - maxPriorityFeePerGasScale: 1.0, - }); - - const passedSigner: Wallet = mockedTitleEscrowFactory.mock.calls[0][0]; - expect(passedSigner.privateKey).toBe(`0x0000000000000000000000000000000000000000000000000000000000000003`); - }); - - it("should pass in the correct params and return the deployed instance for hederatestnet", async () => { - const instance = await deployTitleEscrowFactory(deployParamsHederaTestnet); - - const passedSigner: Wallet = mockedTitleEscrowFactory.mock.calls[0][0]; - - expect(passedSigner.privateKey).toBe(`0x${deployParamsHederaTestnet.key}`); - // price should be any length string of digits - expect(instance.contractAddress).toBe("contractAddress"); - }); - - it("should allow errors to bubble up for hederatestnet", async () => { - mockedDeploy.mockRejectedValue(new Error("An Error")); - await expect(deployTitleEscrowFactory(deployParamsHederaTestnet)).rejects.toThrow("An Error"); - }); - - it("should throw when keys are not found anywhere for hederatestnet", async () => { - await expect( - deployTitleEscrowFactory({ - network: "hederatestnet", - dryRun: false, - maxPriorityFeePerGasScale: 1.0, - }) - ).rejects.toThrow( - "No private key found in OA_PRIVATE_KEY, key, key-file, please supply at least one or supply an encrypted wallet path, or provide aws kms signer information" - ); - }); }); }); diff --git a/src/implementations/deploy/token-registry/token-registry-astron.test.ts b/src/implementations/deploy/token-registry/token-registry-astron.test.ts index 85f53d7e..cffbd817 100644 --- a/src/implementations/deploy/token-registry/token-registry-astron.test.ts +++ b/src/implementations/deploy/token-registry/token-registry-astron.test.ts @@ -41,7 +41,7 @@ describe("deploy Token Registry", () => { data: "0x0000000000000000000000000f1fc16ef456d0fdc7c53d1d94f4a2e97c7064e3000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000088f17c6964c859cf0bb9ee53d91685b2529e09760000000000000000000000000000000000000000000000000000000000000001410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014100000000000000000000000000000000000000000000000000000000000000", args: [ "0xe7163d4666e15ec691f0ba0ec300fe1dd71ae2de", - "0xb30ba3b8ba59ed74a9d55ded647b4516823ac750", + "0xA0Da221B3cd3e863425E1F1D34B9307D295a9d03", "0x88f17c6964c859cf0bb9ee53d91685b2529e0976", "0x0f1fc16ef456d0fdc7c53d1d94f4a2e97c7064e3", "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000088f17c6964c859cf0bb9ee53d91685b2529e09760000000000000000000000000000000000000000000000000000000000000001410000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014100000000000000000000000000000000000000000000000000000000000000", @@ -61,7 +61,7 @@ describe("deploy Token Registry", () => { deployer: "0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf", }); - expect(mockedDeploy.mock.calls[0][0]).toEqual("0xb30Ba3B8Ba59eD74A9d55dEd647b4516823Ac750"); + expect(mockedDeploy.mock.calls[0][0]).toEqual("0xA0Da221B3cd3e863425E1F1D34B9307D295a9d03"); expect(mockedDeploy.mock.calls[0][1]).toEqual(expectedInitParams); // price should be any length string of digits @@ -82,7 +82,7 @@ describe("deploy Token Registry", () => { deployer: "0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf", }); - expect(mockedDeploy.mock.calls[0][0]).toEqual("0xb30Ba3B8Ba59eD74A9d55dEd647b4516823Ac750"); + expect(mockedDeploy.mock.calls[0][0]).toEqual("0xA0Da221B3cd3e863425E1F1D34B9307D295a9d03"); expect(mockedDeploy.mock.calls[0][1]).toEqual(expectedInitParams); // price should be any length string of digits @@ -101,7 +101,7 @@ describe("deploy Token Registry", () => { deployer: "0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf", }); - expect(mockedDeploy.mock.calls[0][0]).toEqual("0xb30Ba3B8Ba59eD74A9d55dEd647b4516823Ac750"); + expect(mockedDeploy.mock.calls[0][0]).toEqual("0xA0Da221B3cd3e863425E1F1D34B9307D295a9d03"); expect(mockedDeploy.mock.calls[0][1]).toEqual(expectedInitParams); // price should be any length string of digits diff --git a/src/implementations/document-store/issue.test.ts b/src/implementations/document-store/issue.test.ts index b66e93e6..788abad1 100644 --- a/src/implementations/document-store/issue.test.ts +++ b/src/implementations/document-store/issue.test.ts @@ -16,14 +16,6 @@ const deployParams: DocumentStoreIssueCommand = { dryRun: false, }; -const deployParamsHederaTestnet: DocumentStoreIssueCommand = { - hash: "0xabcd", - address: "0x1234", - network: "hederatestnet", - key: "0000000000000000000000000000000000000000000000000000000000000001", - maxPriorityFeePerGasScale: 1, - dryRun: false, -}; // TODO the following test is very fragile and might break on every interface change of DocumentStoreFactory // ideally must setup ganache, and run the function over it describe("issue document-store", () => { @@ -126,79 +118,4 @@ describe("issue document-store", () => { "No private key found in OA_PRIVATE_KEY, key, key-file, please supply at least one or supply an encrypted wallet path, or provide aws kms signer information" ); }); - - //Hedera Testnet - it("should take in the key from environment variable for hederatestnet", async () => { - process.env.OA_PRIVATE_KEY = "0000000000000000000000000000000000000000000000000000000000000002"; - - await issueToDocumentStore({ - hash: "0xabcd", - address: "0x1234", - network: "hederatestnet", - dryRun: false, - maxPriorityFeePerGasScale: 1, - }); - - const passedSigner: Wallet = mockedConnect.mock.calls[0][1]; - expect(passedSigner.privateKey).toBe(`0x${process.env.OA_PRIVATE_KEY}`); - }); - - it("should pass in the correct params and return the deployed instance for hederatestnet", async () => { - const instance = await issueToDocumentStore(deployParamsHederaTestnet); - - const passedSigner: Wallet = mockedConnect.mock.calls[0][1]; - - expect(passedSigner.privateKey).toBe(`0x${deployParamsHederaTestnet.key}`); - expect(mockedConnect.mock.calls[0][0]).toEqual(deployParamsHederaTestnet.address); - expect(mockCallStaticIssue).toHaveBeenCalledTimes(1); - expect(mockedIssue.mock.calls[0][0]).toEqual(deployParamsHederaTestnet.hash); - expect(instance).toStrictEqual({ transactionHash: "transactionHash" }); - }); - - it("should take in the key from key file for hederatestnet", async () => { - await issueToDocumentStore({ - hash: "0xabcd", - address: "0x1234", - network: "hederatestnet", - keyFile: join(__dirname, "..", "..", "..", "examples", "sample-key"), - dryRun: false, - maxPriorityFeePerGasScale: 1, - }); - - const passedSigner: Wallet = mockedConnect.mock.calls[0][1]; - expect(passedSigner.privateKey).toBe(`0x0000000000000000000000000000000000000000000000000000000000000003`); - }); - - it("should accept hash without 0x prefix and return deployed instance for hederatestnet", async () => { - const instance = await issueToDocumentStore({ ...deployParamsHederaTestnet, hash: addAddressPrefix("abcd") }); - - const passedSigner: Wallet = mockedConnect.mock.calls[0][1]; - - expect(passedSigner.privateKey).toBe(`0x${deployParamsHederaTestnet.key}`); - expect(mockedConnect.mock.calls[0][0]).toEqual(deployParamsHederaTestnet.address); - expect(mockCallStaticIssue).toHaveBeenCalledTimes(1); - expect(mockedIssue.mock.calls[0][0]).toEqual(deployParamsHederaTestnet.hash); - expect(instance).toStrictEqual({ transactionHash: "transactionHash" }); - }); - - it("should allow errors to bubble up for hederatestnet", async () => { - mockedConnect.mockImplementation(() => { - throw new Error("An Error"); - }); - await expect(issueToDocumentStore(deployParamsHederaTestnet)).rejects.toThrow("An Error"); - }); - - it("should throw when keys are not found anywhere for hederatestnet", async () => { - await expect( - issueToDocumentStore({ - hash: "0xabcd", - address: "0x1234", - network: "hederatestnet", - dryRun: false, - maxPriorityFeePerGasScale: 1, - }) - ).rejects.toThrow( - "No private key found in OA_PRIVATE_KEY, key, key-file, please supply at least one or supply an encrypted wallet path, or provide aws kms signer information" - ); - }); }); diff --git a/src/implementations/document-store/revoke.test.ts b/src/implementations/document-store/revoke.test.ts index 7ad175ce..62e346f2 100644 --- a/src/implementations/document-store/revoke.test.ts +++ b/src/implementations/document-store/revoke.test.ts @@ -17,14 +17,6 @@ const deployParams: DocumentStoreRevokeCommand = { dryRun: false, }; -const deployParamsHederaTestnet: DocumentStoreRevokeCommand = { - hash: "0xabcd", - address: "0x1234", - network: "sepolia", - key: "0000000000000000000000000000000000000000000000000000000000000001", - maxPriorityFeePerGasScale: 1, - dryRun: false, -}; // TODO the following test is very fragile and might break on every interface change of DocumentStoreFactory // ideally must setup ganache, and run the function over it describe("document-store", () => { @@ -126,79 +118,5 @@ describe("document-store", () => { "No private key found in OA_PRIVATE_KEY, key, key-file, please supply at least one or supply an encrypted wallet path, or provide aws kms signer information" ); }); - - //Hedera Testnet - it("should pass in the correct params and return the deployed instance for hederatestnet", async () => { - const instance = await revokeToDocumentStore(deployParamsHederaTestnet); - - const passedSigner: Wallet = mockedConnect.mock.calls[0][1]; - - expect(passedSigner.privateKey).toBe(`0x${deployParamsHederaTestnet.key}`); - expect(mockedConnect.mock.calls[0][0]).toEqual(deployParamsHederaTestnet.address); - expect(mockCallStaticRevoke).toHaveBeenCalledTimes(1); - expect(mockedRevoke.mock.calls[0][0]).toEqual(deployParamsHederaTestnet.hash); - expect(instance).toStrictEqual({ transactionHash: "transactionHash" }); - }); - - it("should accept hash without 0x prefix and return deployed instance for hederatestnet", async () => { - const instance = await revokeToDocumentStore({ ...deployParamsHederaTestnet, hash: addAddressPrefix("abcd") }); - - const passedSigner: Wallet = mockedConnect.mock.calls[0][1]; - - expect(passedSigner.privateKey).toBe(`0x${deployParamsHederaTestnet.key}`); - expect(mockedConnect.mock.calls[0][0]).toEqual(deployParamsHederaTestnet.address); - expect(mockCallStaticRevoke).toHaveBeenCalledTimes(1); - expect(mockedRevoke.mock.calls[0][0]).toEqual(deployParamsHederaTestnet.hash); - expect(instance).toStrictEqual({ transactionHash: "transactionHash" }); - }); - - it("should take in the key from environment variable for hederatestnet", async () => { - process.env.OA_PRIVATE_KEY = "0000000000000000000000000000000000000000000000000000000000000002"; - await revokeToDocumentStore({ - hash: "0xabcd", - address: "0x1234", - network: "hederatestnet", - dryRun: false, - maxPriorityFeePerGasScale: 1, - }); - - const passedSigner: Wallet = mockedConnect.mock.calls[0][1]; - expect(passedSigner.privateKey).toBe(`0x${process.env.OA_PRIVATE_KEY}`); - }); - - it("should take in the key from key file for hederatestnet", async () => { - await revokeToDocumentStore({ - hash: "0xabcd", - address: "0x1234", - network: "hederatestnet", - keyFile: join(__dirname, "..", "..", "..", "examples", "sample-key"), - dryRun: false, - maxPriorityFeePerGasScale: 1, - }); - - const passedSigner: Wallet = mockedConnect.mock.calls[0][1]; - expect(passedSigner.privateKey).toBe(`0x0000000000000000000000000000000000000000000000000000000000000003`); - }); - - it("should allow errors to bubble up for hederatestnet", async () => { - mockedConnect.mockImplementation(() => { - throw new Error("An Error"); - }); - await expect(revokeToDocumentStore(deployParamsHederaTestnet)).rejects.toThrow("An Error"); - }); - - it("should throw when keys are not found anywhere for hederatestnet", async () => { - await expect( - revokeToDocumentStore({ - hash: "0xabcd", - address: "0x1234", - network: "hederatestnet", - dryRun: false, - maxPriorityFeePerGasScale: 1, - }) - ).rejects.toThrow( - "No private key found in OA_PRIVATE_KEY, key, key-file, please supply at least one or supply an encrypted wallet path, or provide aws kms signer information" - ); - }); }); }); diff --git a/src/implementations/document-store/transfer-ownership.test.ts b/src/implementations/document-store/transfer-ownership.test.ts index e7e903dd..91efa078 100644 --- a/src/implementations/document-store/transfer-ownership.test.ts +++ b/src/implementations/document-store/transfer-ownership.test.ts @@ -16,15 +16,6 @@ const deployParams: DocumentStoreTransferOwnershipCommand = { dryRun: false, }; -const deployParamsHederaTestnet: DocumentStoreTransferOwnershipCommand = { - newOwner: "0xabcd", - address: "0x1234", - network: "hederatestnet", - key: "0000000000000000000000000000000000000000000000000000000000000001", - maxPriorityFeePerGasScale: 1, - dryRun: false, -}; - // TODO the following test is very fragile and might break on every interface change of DocumentStoreFactory // ideally must setup ganache, and run the function over it describe("document-store", () => { @@ -123,66 +114,5 @@ describe("document-store", () => { const passedSigner: Wallet = mockedConnect.mock.calls[0][1]; expect(passedSigner.privateKey).toBe(`0x0000000000000000000000000000000000000000000000000000000000000003`); }); - - //Hedera Testnet - it("should pass in the correct params and return the deployed instance for hederatestnet", async () => { - const instance = await transferDocumentStoreOwnership(deployParamsHederaTestnet); - - const passedSigner: Wallet = mockedConnect.mock.calls[0][1]; - - expect(passedSigner.privateKey).toBe(`0x${deployParamsHederaTestnet.key}`); - expect(mockedConnect.mock.calls[0][0]).toEqual(deployParamsHederaTestnet.address); - expect(mockedCallStaticGrantRole).toHaveBeenCalledTimes(1); - expect(mockedGrantRole.mock.calls[0][0]).toEqual("ADMIN"); - expect(mockedGrantRole.mock.calls[0][1]).toEqual(deployParamsHederaTestnet.newOwner); - - expect(await instance.grantTransaction).toStrictEqual({ transactionHash: "transactionHash" }); - expect(await instance.revokeTransaction).toStrictEqual({ transactionHash: "transactionHash" }); - }); - - it("should accept account without 0x prefix and return deployed instance for hederatestnet", async () => { - const instance = await transferDocumentStoreOwnership({ - ...deployParamsHederaTestnet, - newOwner: addAddressPrefix("abcd"), - }); - - const passedSigner: Wallet = mockedConnect.mock.calls[0][1]; - - expect(passedSigner.privateKey).toBe(`0x${deployParamsHederaTestnet.key}`); - expect(mockedConnect.mock.calls[0][0]).toEqual(deployParamsHederaTestnet.address); - expect(mockedCallStaticGrantRole).toHaveBeenCalledTimes(1); - expect(mockedGrantRole.mock.calls[0][0]).toEqual("ADMIN"); - expect(mockedGrantRole.mock.calls[0][1]).toEqual(deployParamsHederaTestnet.newOwner); - - expect(await instance.grantTransaction).toStrictEqual({ transactionHash: "transactionHash" }); - expect(await instance.revokeTransaction).toStrictEqual({ transactionHash: "transactionHash" }); - }); - - it("should take in the key from environment variable for hederatestnet", async () => { - process.env.OA_PRIVATE_KEY = "0000000000000000000000000000000000000000000000000000000000000002"; - await transferDocumentStoreOwnership({ - newOwner: "0xabcd", - address: "0x1234", - network: "hederatestnet", - dryRun: false, - maxPriorityFeePerGasScale: 1, - }); - - const passedSigner: Wallet = mockedConnect.mock.calls[0][1]; - expect(passedSigner.privateKey).toBe(`0x${process.env.OA_PRIVATE_KEY}`); - }); - it("should take in the key from key file for hederatestnet", async () => { - await transferDocumentStoreOwnership({ - newOwner: "0xabcd", - address: "0x1234", - network: "hederatestnet", - keyFile: join(__dirname, "..", "..", "..", "examples", "sample-key"), - dryRun: false, - maxPriorityFeePerGasScale: 1, - }); - - const passedSigner: Wallet = mockedConnect.mock.calls[0][1]; - expect(passedSigner.privateKey).toBe(`0x0000000000000000000000000000000000000000000000000000000000000003`); - }); }); }); diff --git a/src/implementations/token-registry/issue.test.ts b/src/implementations/token-registry/issue.test.ts index c32fd256..ae5e5a22 100644 --- a/src/implementations/token-registry/issue.test.ts +++ b/src/implementations/token-registry/issue.test.ts @@ -17,16 +17,6 @@ const deployParams: TokenRegistryIssueCommand = { dryRun: false, }; -const deployParamsHederaTestnet: TokenRegistryIssueCommand = { - beneficiary: "0xabcd", - holder: "0xabce", - tokenId: "0xzyxw", - address: "0x1234", - network: "hederatestnet", - maxPriorityFeePerGasScale: 1, - dryRun: false, -}; - describe("token-registry", () => { describe("issue", () => { jest.setTimeout(30000); @@ -105,55 +95,5 @@ describe("token-registry", () => { }); await expect(issueToTokenRegistry(deployParams)).rejects.toThrow("An Error"); }); - - //Hedera Testnet - it("should pass in the correct params and return the deployed instance for hederatestnet", async () => { - const privateKey = "0000000000000000000000000000000000000000000000000000000000000001"; - const instance = await issueToTokenRegistry({ - ...deployParamsHederaTestnet, - key: privateKey, - }); - - const passedSigner: Wallet = mockedConnectERC721.mock.calls[0][1]; - expect(passedSigner.privateKey).toBe(`0x${privateKey}`); - expect(mockedConnectERC721.mock.calls[0][0]).toEqual(deployParamsHederaTestnet.address); - expect(mockedIssue.mock.calls[0][0]).toEqual(deployParamsHederaTestnet.beneficiary); - expect(mockedIssue.mock.calls[0][1]).toEqual(deployParamsHederaTestnet.holder); - expect(mockedIssue.mock.calls[0][2]).toEqual(deployParamsHederaTestnet.tokenId); - expect(mockCallStaticSafeMint).toHaveBeenCalledTimes(1); - expect(instance).toStrictEqual({ transactionHash: "transactionHash" }); - }); - - it("should accept tokenId without 0x prefix and return deployed instance for hederatestnet", async () => { - const privateKey = "0000000000000000000000000000000000000000000000000000000000000001"; - const instance = await issueToTokenRegistry({ - ...deployParamsHederaTestnet, - key: privateKey, - tokenId: addAddressPrefix("zyxw"), - }); - - const passedSigner: Wallet = mockedConnectERC721.mock.calls[0][1]; - expect(passedSigner.privateKey).toBe(`0x${privateKey}`); - expect(mockedConnectERC721.mock.calls[0][0]).toEqual(deployParamsHederaTestnet.address); - expect(mockedIssue.mock.calls[0][0]).toEqual(deployParamsHederaTestnet.beneficiary); - expect(mockedIssue.mock.calls[0][1]).toEqual(deployParamsHederaTestnet.holder); - expect(mockedIssue.mock.calls[0][2]).toEqual(deployParamsHederaTestnet.tokenId); - expect(mockCallStaticSafeMint).toHaveBeenCalledTimes(1); - expect(instance).toStrictEqual({ transactionHash: "transactionHash" }); - }); - - it("should throw when keys are not found anywhere for hederatestnet", async () => { - await expect(issueToTokenRegistry(deployParamsHederaTestnet)).rejects.toThrow( - "No private key found in OA_PRIVATE_KEY, key, key-file, please supply at least one or supply an encrypted wallet path, or provide aws kms signer information" - ); - }); - - it("should allow errors to bubble up for hederatestnet", async () => { - process.env.OA_PRIVATE_KEY = "0000000000000000000000000000000000000000000000000000000000000002"; - mockedConnectERC721.mockImplementation(() => { - throw new Error("An Error"); - }); - await expect(issueToTokenRegistry(deployParamsHederaTestnet)).rejects.toThrow("An Error"); - }); }); }); diff --git a/src/implementations/transaction/transaction.test.ts b/src/implementations/transaction/transaction.test.ts index 84b3c0d6..748530cf 100644 --- a/src/implementations/transaction/transaction.test.ts +++ b/src/implementations/transaction/transaction.test.ts @@ -35,30 +35,5 @@ describe("document-store", () => { expect(mockSendTransaction.mock.calls[0][0].nonce.toNumber()).toEqual(10); expect(mockSendTransaction.mock.calls[0][0].gasPrice.toNumber()).toEqual(6); }); - - it("success in retrieving transaction nonce and gas price using --transaction-hash for hederatestnet", async () => { - const mockGetTransaction = jest.fn(); - mockGetTransaction.mockResolvedValue({ - nonce: 10, - gasPrice: BigNumber.from(3), - }); - - const mockSendTransaction = jest.fn(); - - mockGetWallet.mockResolvedValue({ - provider: { getTransaction: mockGetTransaction }, - sendTransaction: mockSendTransaction, - getAddress: () => "0xC84b0719A82626417c40f3168513dFABDB6A9079", - }); - - await cancelTransaction({ - transactionHash: "0x456bba58226f03e3fb7d72b5143ceecfb6bfb66b00586929f6d60890ec264c2c", - network: "hederatestnet", - keyFile: path.resolve(__dirname, "./key.file"), - }); - expect(signaleInfoSpy).toHaveBeenNthCalledWith(1, "Transaction detail retrieved. Nonce: 10, Gas-price: 3"); - expect(mockSendTransaction.mock.calls[0][0].nonce.toNumber()).toEqual(10); - expect(mockSendTransaction.mock.calls[0][0].gasPrice.toNumber()).toEqual(6); - }); }); });