{"_id":"@ape.swap/test-helpers","_rev":"18-47a25fbb197e8981b4def91b73e0f241","name":"@ape.swap/test-helpers","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@ape.swap/test-helpers","version":"1.0.0","keywords":["ethereum","smart","contracts","test","solidity","zeppelin","openzeppelin","ape","apeswap"],"author":{"name":"ApeSwap"},"license":"MIT","_id":"@ape.swap/test-helpers@1.0.0","maintainers":[{"name":"defifofum","email":"DeFiFoFum0@gmail.com"},{"name":"babadrape","email":"babadrape@gmail.com"},{"name":"ixm-759","email":"759ixm@gmail.com"},{"name":"obiedobo","email":"obiedobo@gmail.com"},{"name":"harambe-nakamoto","email":"harambeN@protonmail.com"},{"name":"justus_o","email":"justus.onuoha@innovationupstream.com"},{"name":"apeguru","email":"hello@apeswap.finance"}],"homepage":"https://github.com/ApeSwapFinance/apeswap-test-helpers#readme","bugs":{"url":"https://github.com/ApeSwapFinance/apeswap-test-helpers/issues"},"dist":{"shasum":"8dc29e05296e039fbc4399d80c8ee1db357446be","tarball":"https://registry.npmjs.org/@ape.swap/test-helpers/-/test-helpers-1.0.0.tgz","fileCount":20,"integrity":"sha512-4EuMiccMHYqqmIguJ6X+ilXnvsT7f0yQ2dD7yndBfkaC5+/aI2ozgTKPx+WOi/R38O32Wo95ayzUQ5G/ID/GQw==","signatures":[{"sig":"MEUCIQDw4fDwKP6IxP0MpAcNhhGKThRf74J8Q2eDWSUryfGTqAIgKxaF4uTeJ40W+QjakHwz9aFj96cUjwkd7Mit4OTH3+Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":369657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJicccnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrK2A/+JBlrYCzBOsVPWok6h8YnkzcFG0Jru71S1AzGEOD/pnoio9e0\r\n4aYjiOaZCzUlcP2Oc34i98/dWDTUFqrp2Cfj7m/s2/fYAk7QO8r9CltnBJu5\r\nxz2oOLeq6OJNKbjheliq5xyf8YzIq/N9ivUGPt456mCe+0MUIjTOxIJ6eYiQ\r\nqF1ot/jf66krHlK+OCcXU3ZdSluXP2RgM3BqX5S+wRqaByFrIh9obs1sGjnN\r\nHg6FjgN9tGrcN6n0RGrHZejImhRDH/O9xlMQCGBUyrf4s7TPgFYt+2zSMMS0\r\nY+ncXG8l+9leXsZM2Nhi43uPSoP+Nkrb+dIbSKThIHJXyRN5uOtANisDv8FL\r\noZHmO+sbS6SZ327+T5+E74I6iGbU/BbvTmSbYxvJlAJKul1sIYd608qyWcCo\r\nSlz/yTecoSs661o43NKK28fuY2P/zlrE1Kovr5iIPSeAHSKxES2cTeY75Guc\r\npzkYWSO92K8OKQBZQwXzrjIYEDuECts2SrGzgM11et4Glu2ExhiUA2saQQBW\r\n6slmrwoWPATbRU2iwQ5DjDrDibByOENjg2WKj8nepaftZ9cTvFMLlIzuWIdV\r\nJgB7yAhJyS2sh2TW6tKwcj8t4MnDv6FCOLPNaehJORK4cg7RQvhZe+CqvXVz\r\nMeYru8yBNjLp9oVAlJKwKPn2iKpRVJfH8HE=\r\n=FEti\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"32f0c6d6f6a1165b1bc4c3d9aab89879a5cce1d6","scripts":{"docs":"oz-docs","lint":"eslint .","test":"mocha --exit --recursive","release":"scripts/release/release.sh","version":"scripts/release/update-changelog-release-date.js","lint:fix":"eslint . --fix","docs:watch":"npm run docs watch","test-legacy":"./scripts/test.sh --network ganache","test-integration":"bash -x test-integration/run-all.sh"},"_npmUser":{"name":"defifofum","email":"DeFiFoFum0@gmail.com"},"repository":{"url":"git+https://github.com/ApeSwapFinance/apeswap-test-helpers.git","type":"git"},"_npmVersion":"8.8.0","description":"JavaScript testing helpers for ApeSwap contract integration.","directories":{},"resolutions":{"**/ua-parser-js":"^0.7.30"},"_nodeVersion":"16.14.2","dependencies":{"web3":"^1.2.5","semver":"^5.6.0","chai-bn":"^0.2.1","ethjs-abi":"^0.2.1","web3-utils":"^1.2.5","ansi-colors":"^3.2.3","lodash.flatten":"^4.4.0","@truffle/contract":"^4.0.35","@openzeppelin/contract-loader":"^0.6.2","@openzeppelin/test-environment":"^0.1.9"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","mocha":"^8.1.2","eslint":"^5.9.0","truffle":"^5.1.46","ganache-cli":"^6.5.0","eslint-plugin-node":"^8.0.0","eslint-plugin-import":"^2.14.0","eslint-plugin-promise":"^4.0.1","eslint-config-standard":"^12.0.0","eslint-plugin-standard":"^4.0.0","openzeppelin-docs-utils":"git+https://OpenZeppelin@github.com/OpenZeppelin/docs-utils.git","eslint-plugin-mocha-no-only":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/test-helpers_1.0.0_1651623718889_0.04969652036994532","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@ape.swap/test-helpers","version":"1.0.1","keywords":["ethereum","smart","contracts","test","solidity","zeppelin","openzeppelin","ape","apeswap"],"author":{"name":"ApeSwap"},"license":"MIT","_id":"@ape.swap/test-helpers@1.0.1","maintainers":[{"name":"defifofum","email":"DeFiFoFum0@gmail.com"},{"name":"babadrape","email":"babadrape@gmail.com"},{"name":"ixm-759","email":"759ixm@gmail.com"},{"name":"obiedobo","email":"obiedobo@gmail.com"},{"name":"harambe-nakamoto","email":"harambeN@protonmail.com"},{"name":"justus_o","email":"justus.onuoha@innovationupstream.com"},{"name":"apeguru","email":"hello@apeswap.finance"}],"homepage":"https://github.com/ApeSwapFinance/apeswap-test-helpers#readme","bugs":{"url":"https://github.com/ApeSwapFinance/apeswap-test-helpers/issues"},"dist":{"shasum":"4bdbcfe6126d495223b6cfd87eb37f9a1b092388","tarball":"https://registry.npmjs.org/@ape.swap/test-helpers/-/test-helpers-1.0.1.tgz","fileCount":20,"integrity":"sha512-fgyAlRnQvhlTpcwxGiB0J0TAHlArpcs6MI8ogDG/sgPH9JAt/lskh4Yt589fLSh1Qm04/aSivlcyBMI+jE7+ZA==","signatures":[{"sig":"MEUCIG+KpOMx9pZp5/1I4WDNaH1BxIPMtSr4fFvMKkdixA/nAiEAmtEo6vSpkFpizgqRduMFgjEUcBXpciyrrWqG0pglOGE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":370029,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiccuDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp1MQ//SN0ChvZu8qRK8Okdx8qsXaHx7H6nqTOp5m5qSrDensP5iLru\r\ndeBSj28hP98ZIbsCgoYgkAFZWlzaRjNHRVJtRwhRIUjlx4MdjcesEZZaXtuB\r\n4qtoY1esCRx5C5jyVrQxRJGd7E2+GnltZdYRVhDvfUNEUvx6mZucQk/6HCM0\r\nz0gO6GgGNFZ8iO/zcqWkq6joWVSYkbGmHJa1CqJNlue0/acrTXjtVT10VQbq\r\nR65xHz1g0FsKEXjFIGSFSgJSfkmSwxylOi0a351pZCmaclAlCFIDemvvgFFG\r\nKzgJDlUG/HyqnDrXE27GBIcWR/fQcvaGwiJWmLYh5RJEQRDZvhNWiiDdus6o\r\nV7yAsPLgwwOxKBNbd0dxyyOULVNUW6Oma69ZT/DCEVvabG0sTLAVwAV3SeTs\r\nUkW3wHXW36SoRwvnX2Rzhpe44Ywlynp85bUQ+J0LGym6B+P+b2Mf3pI7trsp\r\nBlASHUd10x5XoWM2ZiuaLDg5qTMov095PI4MOj+5JeqUcJqf3bMkRCJHY4GW\r\nXIcnwPbxD64rivp3uD3xaCrarcUYT5d4/kBaG01vKDzTCKIDvEucYO+2Nr1F\r\ng5+e2C3uRBA5VsxoZyljq/8mg38G/hVQPXEK5a4RCMi6OzOOHeBmlsu1gR0z\r\njpTjFbIr41QOVAJpM4ZkFGtqKh82V6wdKRc=\r\n=a2jK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"d6e142dfbbb301327ac49e0db905d7d07387645a","scripts":{"docs":"oz-docs","lint":"eslint .","test":"mocha --exit --recursive","release":"scripts/release/release.sh","version":"scripts/release/update-changelog-release-date.js","lint:fix":"eslint . --fix","docs:watch":"npm run docs watch","test-legacy":"./scripts/test.sh --network ganache","test-integration":"bash -x test-integration/run-all.sh"},"_npmUser":{"name":"defifofum","email":"DeFiFoFum0@gmail.com"},"repository":{"url":"git+https://github.com/ApeSwapFinance/apeswap-test-helpers.git","type":"git"},"_npmVersion":"8.8.0","description":"JavaScript testing helpers for ApeSwap contract integration.","directories":{},"resolutions":{"**/ua-parser-js":"^0.7.30"},"_nodeVersion":"16.14.2","dependencies":{"web3":"^1.2.5","semver":"^5.6.0","chai-bn":"^0.2.1","ethjs-abi":"^0.2.1","web3-utils":"^1.2.5","ansi-colors":"^3.2.3","lodash.flatten":"^4.4.0","@truffle/contract":"^4.0.35","@openzeppelin/contract-loader":"^0.6.2","@openzeppelin/test-environment":"^0.1.9"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","mocha":"^8.1.2","eslint":"^5.9.0","truffle":"^5.1.46","ganache-cli":"^6.5.0","eslint-plugin-node":"^8.0.0","eslint-plugin-import":"^2.14.0","eslint-plugin-promise":"^4.0.1","eslint-config-standard":"^12.0.0","eslint-plugin-standard":"^4.0.0","openzeppelin-docs-utils":"git+https://OpenZeppelin@github.com/OpenZeppelin/docs-utils.git","eslint-plugin-mocha-no-only":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/test-helpers_1.0.1_1651624834882_0.3665080461982342","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@ape.swap/test-helpers","version":"1.1.0","keywords":["ethereum","smart","contracts","test","solidity","zeppelin","openzeppelin","ape","apeswap"],"author":{"name":"ApeSwap"},"license":"MIT","_id":"@ape.swap/test-helpers@1.1.0","maintainers":[{"name":"defifofum","email":"DeFiFoFum0@gmail.com"},{"name":"babadrape","email":"babadrape@gmail.com"},{"name":"ixm-759","email":"759ixm@gmail.com"},{"name":"obiedobo","email":"obiedobo@gmail.com"},{"name":"harambe-nakamoto","email":"harambeN@protonmail.com"},{"name":"justus_o","email":"justus.onuoha@innovationupstream.com"},{"name":"apeguru","email":"hello@apeswap.finance"}],"homepage":"https://github.com/ApeSwapFinance/apeswap-test-helpers#readme","bugs":{"url":"https://github.com/ApeSwapFinance/apeswap-test-helpers/issues"},"dist":{"shasum":"6c8d58063539f20794ea489c9ccaaf3b58793603","tarball":"https://registry.npmjs.org/@ape.swap/test-helpers/-/test-helpers-1.1.0.tgz","fileCount":21,"integrity":"sha512-CMWVia5p35Cad23dhC+Y7jT2mlrBGXtkDEHXNIu1ed42Pf8ATmUo3tqGPvwdaIx0lJpRQXYNolG2X4HzThEEWw==","signatures":[{"sig":"MEYCIQCBSYnoEEeTRJXjaR4W+ouOZyt8qYZfqo47vFLeVRXCmQIhAKG1EEZgxmHE/iQ6vA5oj1UlOyXzkDVT/0CNqU9SyCAd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":428104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJig9M4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpW2A/+JO9I2/dHja+NSQpFlCeIEavSsdheslpq+vEzlQjLzHnrk4TZ\r\nnP8hMJDxS9LRkxvVggpGaQU9MSyNEn1aZIacxiwAi6MWYCyy7qGfhdMwqimy\r\n3M8rR9IrG77lkXQLea+8bBFzrBTRvWcCBFotErqZdvO+d+51TXmjWFdycz2k\r\n05iY4Dx+fHvztXwNbEqw88vYmrGAgj8ItVlJ0dkPFLTA377IjY3HDTSLotDQ\r\nQ7zdb5RKMa2AXLvGGd4bgBZg+4KTx8uTrS+kIe3042iEoSmGu4f40At0ykwD\r\nEjMEKmh2plIPveTE+x2QWmC+otf/UCXZJ1T+7fbFi13HHM4YmW4S2i/eiJCI\r\nijwrCUg9AwwdgiKsYHKkxQOH0iwgkD+xM8ksF5f1DXKHglwsmjodqvBGmZWF\r\nrvhzAqWeTEN5BKlDlCTpoUsfzuhU73tcn4HuYVUgb4a8fuIKMr4CgE1G0xQd\r\nSnrwizv5lV96UCR+xzulv6fkOm1cbT9XXUb5XDzbRbFUllB1kRhj+LH2XwSe\r\nFKlOeRLoGabjeW/5NCRHIKgkHRnqdyX0O7XkAQygan4/gXI7twMDp/xwwBg2\r\nVARgnCZ0IMiqUhfpdghaQq0mkyBFnQjKrQpLzdgOy3FSPR+tIJ5kd1K0wZZj\r\n6ccu1NiLkdsxoax8aVEeLlKh0/HassJBK3Q=\r\n=ugdf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"d08d81105d7eadccbcc00c5301b37ada26018a4e","scripts":{"docs":"oz-docs","lint":"eslint .","test":"mocha --exit --recursive","release":"scripts/release/release.sh","version":"scripts/release/update-changelog-release-date.js","lint:fix":"eslint . --fix","docs:watch":"npm run docs watch","test-legacy":"./scripts/test.sh --network ganache","test-integration":"bash -x test-integration/run-all.sh"},"_npmUser":{"name":"defifofum","email":"DeFiFoFum0@gmail.com"},"repository":{"url":"git+https://github.com/ApeSwapFinance/apeswap-test-helpers.git","type":"git"},"_npmVersion":"8.10.0","description":"JavaScript testing helpers for ApeSwap contract integration.","directories":{},"resolutions":{"**/ua-parser-js":"^0.7.30"},"_nodeVersion":"16.14.2","dependencies":{"web3":"^1.2.5","semver":"^5.6.0","chai-bn":"^0.2.1","ethjs-abi":"^0.2.1","web3-utils":"^1.2.5","ansi-colors":"^3.2.3","lodash.flatten":"^4.4.0","@truffle/contract":"^4.0.35","@openzeppelin/contract-loader":"^0.6.2","@openzeppelin/test-environment":"^0.1.9"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.4","mocha":"^8.1.2","eslint":"^5.9.0","truffle":"^5.1.46","ganache-cli":"^6.5.0","eslint-plugin-node":"^8.0.0","eslint-plugin-import":"^2.14.0","eslint-plugin-promise":"^4.0.1","eslint-config-standard":"^12.0.0","eslint-plugin-standard":"^4.0.0","openzeppelin-docs-utils":"git+https://OpenZeppelin@github.com/OpenZeppelin/docs-utils.git","eslint-plugin-mocha-no-only":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/test-helpers_1.1.0_1652806455915_0.06090321981106106","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-05-04T00:21:58.823Z","modified":"2025-02-07T18:33:33.206Z","1.0.0":"2022-05-04T00:21:59.153Z","1.0.1":"2022-05-04T00:40:35.082Z","1.1.0":"2022-05-17T16:54:16.124Z"},"bugs":{"url":"https://github.com/ApeSwapFinance/apeswap-test-helpers/issues"},"author":{"name":"ApeSwap"},"license":"MIT","homepage":"https://github.com/ApeSwapFinance/apeswap-test-helpers#readme","keywords":["ethereum","smart","contracts","test","solidity","zeppelin","openzeppelin","ape","apeswap"],"repository":{"url":"git+https://github.com/ApeSwapFinance/apeswap-test-helpers.git","type":"git"},"description":"JavaScript testing helpers for ApeSwap contract integration.","maintainers":[{"email":"dev.efedaniels@gmail.com","name":"efedaniels"},{"email":"apefede09@gmail.com","name":"apefede"},{"email":"hello@apeguru.dev","name":"apeguru"},{"email":"DeFiFoFum0@gmail.com","name":"defifofum"},{"email":"n0mbr3al3at0r10@gmail.com","name":"nombrealeatorio"},{"email":"pathakshivam983@gmail.com","name":"shivammp"},{"email":"doublo54@gmail.com","name":"doublo54"},{"email":"759ixm@gmail.com","name":"ixm-759"}],"readme":"# ApeSwap Test Helpers\n\nA suite of Solidity smart contract test helpers. Use to easily test contracts against popular ApeSwap features.\n### _**NOTICE**_: \nThis project uses [@openzeppelin/test-environment](https://github.com/OpenZeppelin/openzeppelin-test-environment) under the hood to deploy contracts to the development. Using this helper module assumes you are using `@openzeppelin/test-environment` for testing as well.\n\n## Overview\n\n### Installation\n\n```bash\nyarn add -D @apeswapfinance/test-helpers\n```\nOR \n```bash\nnpm install --save-dev @apeswapfinance/test-helpers\n```\n\n### Configruation\nAs this module is hosted as a GitHub package, create a `.npmrc` file in the root of your project with these details: \n\n```\n@apeswapfinance:registry=https://npm.pkg.github.com\n//npm.pkg.github.com/:_authToken=${NPM_TOKEN}\n```\n\nIn your environment, set `NPM_TOKEN` to your [github access token](https://docs.github.com/en/packages/learn-github-packages/introduction-to-github-packages#authenticating-to-github-packages). \n```bash\nexport NPM_TOKEN=<github-access-token>\n```\n\n#### Hardhat (formerly Buidler)\nInstall `web3` and the `hardhat-web3` plugin.\n\n```\nnpm install --save-dev @nomiclabs/hardhat-web3 web3\n```\n\nRemember to include the plugin in your configuration as explained in the [installation instructions](https://hardhat.org/plugins/nomiclabs-hardhat-web3.html#installation).\n\n### Usage\n\nImport `@apeswapfinance/test-helpers` in your test files to access helper deploy functions.\n\n\n**Mock Farm**\n```javascript\nconst {\n  dex,  // Deploy/manage a test dex\n  farm, // Deploy/manage a test farm\n} = require('@ape.swap/test-helpers');\nconst { accounts, contract } = require('@openzeppelin/test-environment');\nconst { assert } = require('chai');\n\ndescribe('MasterApe', function () {\n    const [owner, feeTo, alice, bob, carol] = accounts;\n\n    beforeEach(async () => {\n        const {\n            bananaToken,\n            bananaSplitBar,\n            masterApe,\n        } = await farm.deployMockFarm(accounts, {\n            initialMint, // defaults to 25,000\n            bananaPerBlock, // defaults to 10\n        }); // accounts passed will be used in the deployment\n        this.masterApe = masterApe;\n    });\n\n    it('should have proper pool length', async () => {\n        assert.equal((await this.masterApe.poolLength()).toString(), '1');\n    });\n});\n```\n\n**Mock Dex**\n```javascript\nconst {\n  dex,  // Deploy/manage a test dex\n  farm, // Deploy/manage a test farm\n} = require('@ape.swap/test-helpers');\nconst { accounts, contract } = require('@openzeppelin/test-environment');\nconst { assert } = require('chai');\n\ndescribe('ApeFactory', function () {\n    this.timeout(10000);\n    const [owner, feeTo, alice, bob, carol] = accounts;\n\n    beforeEach(async () => {\n        const {\n            dexFactory,\n            dexRouter,\n            mockWBNB,\n            mockTokens,\n            dexPairs\n        } = await dex.deployMockDex(accounts, 5); // accounts passed will be used in the deployment\n        this.dexFactory = dexFactory;\n    });\n\n    it('should have proper pair length', async () => {\n        assert.equal((await this.dexFactory.allPairsLength()).toString(), '5');\n    });\n});\n```\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md"}