{"_id":"@clrfund/waffle-mock-contract","_rev":"5-3c94bc1724757d9cf457d0f5c028ac44","name":"@clrfund/waffle-mock-contract","dist-tags":{"latest":"0.0.11"},"versions":{"0.0.1":{"name":"@clrfund/waffle-mock-contract","version":"0.0.1","main":"dist/cjs/src/index.js","module":"dist/esm/src/index.ts","types":"dist/esm/src/index.d.ts","license":"MIT","scripts":{"build":"yarn build:sol && yarn build:esm && yarn build:cjs && yarn test","build:sol":"hardhat compile","build:esm":"tsc -p tsconfig.json --outDir dist/esm --module ES6","build:cjs":"tsc -p tsconfig.json --outDir dist/cjs","test":"hardhat test","clean":"rm -rf ./dist"},"repository":{"type":"git","url":"git+https://github.com/clrfund/waffle-mock-contract.git"},"dependencies":{"@types/node":"^20.11.0","ethers":"^6.9.2"},"devDependencies":{"@nomicfoundation/hardhat-chai-matchers":"^2.0.3","@nomicfoundation/hardhat-ethers":"^3.0.5","@typechain/ethers-v6":"^0.5.1","@types/mocha":"^10.0.6","chai":"^4.2.0","hardhat":"^2.19.4","mocha":"^10.2.0","ts-node":"^10.9.2","typescript":"^4.9.5"},"_id":"@clrfund/waffle-mock-contract@0.0.1","gitHead":"9b6aca434f0c223fbfac412956948ad184834a12","description":"Library for mocking smart contract dependencies during unit testing.","bugs":{"url":"https://github.com/clrfund/waffle-mock-contract/issues"},"homepage":"https://github.com/clrfund/waffle-mock-contract#readme","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-8joTr14+DJ5nRQfYEiyknkTNGMBIt2Mlild+cSHswEFRPPwKJQJwJ8YwOka1TeJx6olyqeW90o1lrshyJbqkGQ==","shasum":"337ce7b12b7ac83144f4dbfdce44a9fab322ffae","tarball":"https://registry.npmjs.org/@clrfund/waffle-mock-contract/-/waffle-mock-contract-0.0.1.tgz","fileCount":84,"unpackedSize":188897,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+YkqV67L0CgXYVZr0+fwX75imAYhQR10YBcOG8nY4BwIgKXp29Ae2er4mMtov/2HRqV+Tx7jmFkIpK+kVY1mA9mM="}]},"_npmUser":{"name":"yuetlooo","email":"contact@yuetloo.com"},"directories":{},"maintainers":[{"name":"yuetlooo","email":"contact@yuetloo.com"},{"name":"auryn_macmillan","email":"aurynmacmillan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/waffle-mock-contract_0.0.1_1705127659858_0.6984751010647785"},"_hasShrinkwrap":false},"0.0.2":{"name":"@clrfund/waffle-mock-contract","version":"0.0.2","main":"dist/cjs/src/index.js","module":"dist/esm/src/index.ts","types":"dist/esm/src/index.d.ts","license":"MIT","scripts":{"build":"yarn build:sol && yarn build:esm && yarn build:cjs && yarn test","build:sol":"hardhat compile","build:esm":"tsc -p tsconfig.json --outDir dist/esm --module ES6","build:cjs":"tsc -p tsconfig.json --outDir dist/cjs","test":"hardhat test","clean":"rm -rf ./dist"},"repository":{"type":"git","url":"git+https://github.com/clrfund/waffle-mock-contract.git"},"dependencies":{"@types/node":"^20.11.0","ethers":"^6.9.2"},"devDependencies":{"@nomicfoundation/hardhat-chai-matchers":"^2.0.3","@nomicfoundation/hardhat-ethers":"^3.0.5","@typechain/ethers-v6":"^0.5.1","@types/mocha":"^10.0.6","chai":"^4.2.0","hardhat":"^2.19.4","mocha":"^10.2.0","ts-node":"^10.9.2","typescript":"^4.9.5"},"_id":"@clrfund/waffle-mock-contract@0.0.2","gitHead":"200d0df7edeaf7bda09ae926e9bfb0d820e20ee1","description":"Library for mocking smart contract dependencies during unit testing.","bugs":{"url":"https://github.com/clrfund/waffle-mock-contract/issues"},"homepage":"https://github.com/clrfund/waffle-mock-contract#readme","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-m+h0jIRNZCmHfzEcJzJNZkZXsj16RmlE6IhVTVjLpJzDxLBZIEF6U6UhGgm5YkvcBfc9gQcbpywL3TpHwYAGwg==","shasum":"1d8a0dee4a5b16f4eac59bf77942ea8e0d9499be","tarball":"https://registry.npmjs.org/@clrfund/waffle-mock-contract/-/waffle-mock-contract-0.0.2.tgz","fileCount":87,"unpackedSize":276374,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDt6sslYmA5wMzhor2+0Iq0CoexCtusH0T+HYjkd3qAYwIhANVhZdBJxiPk4x0M7JVh4fOnZ14etafW6Jy81y5ZFWsL"}]},"_npmUser":{"name":"yuetlooo","email":"contact@yuetloo.com"},"directories":{},"maintainers":[{"name":"yuetlooo","email":"contact@yuetloo.com"},{"name":"auryn_macmillan","email":"aurynmacmillan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/waffle-mock-contract_0.0.2_1705141752772_0.2716267969777786"},"_hasShrinkwrap":false},"0.0.3":{"name":"@clrfund/waffle-mock-contract","version":"0.0.3","main":"dist/cjs/src/index.js","module":"dist/esm/src/index.js","types":"dist/esm/src/index.d.ts","license":"MIT","scripts":{"build":"yarn build:sol && yarn build:esm && yarn build:cjs && yarn test","build:sol":"hardhat compile","build:esm":"tsc -p tsconfig.json --outDir dist/esm --module ES6","build:cjs":"tsc -p tsconfig.json --outDir dist/cjs","test":"hardhat test","clean":"rm -rf ./dist"},"repository":{"type":"git","url":"git+https://github.com/clrfund/waffle-mock-contract.git"},"export":{"import":"dist/esm/src/index.js","default":"dist/cjs/src/index.js"},"devDependencies":{"@nomicfoundation/hardhat-chai-matchers":"^2.0.3","@nomicfoundation/hardhat-ethers":"^3.0.5","ethers":"^6.9.2","@typechain/ethers-v6":"^0.5.1","@types/node":"^20.11.0","@types/mocha":"^10.0.6","chai":"^4.2.0","hardhat":"^2.19.4","mocha":"^10.2.0","ts-node":"^10.9.2","typescript":"^4.9.5"},"_id":"@clrfund/waffle-mock-contract@0.0.3","gitHead":"63fc7e7bbe3210820758ddcad2cd2d5dd00420f7","description":"Library for mocking smart contract dependencies during unit testing.","bugs":{"url":"https://github.com/clrfund/waffle-mock-contract/issues"},"homepage":"https://github.com/clrfund/waffle-mock-contract#readme","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-j3uKrxen71w2GjthgpolXrNVvWt3bwazxdzhwEqcTHBjzthrbOEYf/i39gYz9TRHQ58+wRuirGLA+pOOAS8xrg==","shasum":"d35892adccd21ad654320860c0b65a240905f082","tarball":"https://registry.npmjs.org/@clrfund/waffle-mock-contract/-/waffle-mock-contract-0.0.3.tgz","fileCount":88,"unpackedSize":277440,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcJimaSFsFGOcCXaAwrxfjgw5zvEtto2wBtzeb3zFOWQIhAPNJhVlYgpbENztI+wJYoDpuAgJ7GjRCScr5yHGL1vC4"}]},"_npmUser":{"name":"yuetlooo","email":"contact@yuetloo.com"},"directories":{},"maintainers":[{"name":"yuetlooo","email":"contact@yuetloo.com"},{"name":"auryn_macmillan","email":"aurynmacmillan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/waffle-mock-contract_0.0.3_1705199959762_0.06920081588597005"},"_hasShrinkwrap":false},"0.0.4":{"name":"@clrfund/waffle-mock-contract","version":"0.0.4","main":"dist/cjs/src/index.js","module":"dist/esm/src/index.js","types":"dist/esm/src/index.d.ts","license":"MIT","scripts":{"build":"yarn build:sol && yarn build:esm && yarn build:cjs && yarn test","build:sol":"hardhat compile","build:esm":"tsc -p tsconfig.json --outDir dist/esm --module ES6","build:cjs":"tsc -p tsconfig.json --outDir dist/cjs","test":"hardhat test","clean":"rm -rf ./dist"},"repository":{"type":"git","url":"git+https://github.com/clrfund/waffle-mock-contract.git"},"export":{"import":"dist/esm/src/index.js","default":"dist/cjs/src/index.js"},"dependencies":{"ethers":"^6.9.2"},"devDependencies":{"@nomicfoundation/hardhat-chai-matchers":"^2.0.3","@nomicfoundation/hardhat-ethers":"^3.0.5","@typechain/ethers-v6":"^0.5.1","@types/mocha":"^10.0.6","@types/node":"^20.11.0","chai":"^4.2.0","hardhat":"^2.19.4","mocha":"^10.2.0","ts-node":"^10.9.2","typechain":"^8.3.2","typescript":"^4.9.5"},"gitHead":"181503812f3ddc21591400eb3325bf49a4c4891e","description":"Library for mocking smart contract dependencies during unit testing.","bugs":{"url":"https://github.com/clrfund/waffle-mock-contract/issues"},"homepage":"https://github.com/clrfund/waffle-mock-contract#readme","_id":"@clrfund/waffle-mock-contract@0.0.4","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-YRAMIFIHVpvu99b7mvVY0+XsN1JWJ57St7xv5M2VzBTXB/ARPLZENAdfpyjr1xPdpyFVed6TCurdsR6K8SWWpQ==","shasum":"97bb6b20df60a77b8a501e45fb4f049bdaebbea0","tarball":"https://registry.npmjs.org/@clrfund/waffle-mock-contract/-/waffle-mock-contract-0.0.4.tgz","fileCount":88,"unpackedSize":277491,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGmCClY3Tuu+TIuNGWXtmjhe08Ecb0dZUP+rOenFL5edAiB/VOOZMzkh/LpoQz4E90yJQ7SXuqKC41G8B+47WbkGCg=="}]},"_npmUser":{"name":"yuetlooo","email":"contact@yuetloo.com"},"directories":{},"maintainers":[{"name":"yuetlooo","email":"contact@yuetloo.com"},{"name":"auryn_macmillan","email":"aurynmacmillan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/waffle-mock-contract_0.0.4_1705201398488_0.4001635777656307"},"_hasShrinkwrap":false},"0.0.6":{"name":"@clrfund/waffle-mock-contract","version":"0.0.6","main":"dist/cjs/src/index.js","module":"dist/esm/src/index.js","types":"dist/esm/src/index.d.ts","license":"MIT","scripts":{"build":"yarn build:sol && yarn build:esm && yarn build:cjs && yarn test","build:sol":"hardhat compile","build:esm":"tsc -p tsconfig.json --outDir dist/esm --module ES6","build:cjs":"tsc -p tsconfig.json --outDir dist/cjs","test":"hardhat test","clean":"rm -rf ./dist"},"repository":{"type":"git","url":"git+https://github.com/clrfund/waffle-mock-contract.git"},"export":{"import":"dist/esm/src/index.js","default":"dist/cjs/src/index.js"},"dependencies":{"ethers":"^6.12.1"},"devDependencies":{"@nomicfoundation/hardhat-chai-matchers":"^2.0.3","@nomicfoundation/hardhat-ethers":"^3.0.5","@typechain/ethers-v6":"^0.5.1","@types/mocha":"^10.0.6","@types/node":"^20.11.0","chai":"^4.2.0","hardhat":"^2.19.4","mocha":"^10.2.0","ts-node":"^10.9.2","typechain":"^8.3.2","typescript":"^4.9.5"},"_id":"@clrfund/waffle-mock-contract@0.0.6","gitHead":"4a64a8820de8477f21c23274f7f234d07037c7de","description":"Library for mocking smart contract dependencies during unit testing.","bugs":{"url":"https://github.com/clrfund/waffle-mock-contract/issues"},"homepage":"https://github.com/clrfund/waffle-mock-contract#readme","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-R5jiUKIIEtBqKukZFfukQ92NIEMNkxKY8arGs5p0YKQDNayCM+sEUlyFNTqdQUvVfHE31g9609UwLP7m7kdaug==","shasum":"897df7537275838c44690a05f9d350a3327ebdba","tarball":"https://registry.npmjs.org/@clrfund/waffle-mock-contract/-/waffle-mock-contract-0.0.6.tgz","fileCount":89,"unpackedSize":278661,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGrSNPLn4qv+Hv5YEh2PVqOqIcL39jaFyc3HqBz01w4gIhAK+/RIV/08sAd49XVPKHM+CYIybsQTm1PAL/QbTAqVPg"}]},"_npmUser":{"name":"yuetlooo","email":"contact@yuetloo.com"},"directories":{},"maintainers":[{"name":"yuetlooo","email":"contact@yuetloo.com"},{"name":"auryn_macmillan","email":"aurynmacmillan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/waffle-mock-contract_0.0.6_1715974302321_0.442243533486151"},"_hasShrinkwrap":false},"0.0.11":{"name":"@clrfund/waffle-mock-contract","version":"0.0.11","main":"dist/cjs/src/index.js","module":"dist/esm/src/index.js","types":"dist/esm/src/index.d.ts","license":"MIT","scripts":{"build":"yarn build:sol && yarn build:esm && yarn build:cjs && yarn test","build:sol":"hardhat compile","build:esm":"tsc -p tsconfig.json --outDir dist/esm --module ES6","build:cjs":"tsc -p tsconfig.json --outDir dist/cjs","test":"hardhat test","clean":"rm -rf ./dist"},"repository":{"type":"git","url":"git+https://github.com/clrfund/waffle-mock-contract.git"},"export":{"import":"dist/esm/src/index.js","default":"dist/cjs/src/index.js"},"dependencies":{"ethers":"^6.12.1"},"devDependencies":{"@nomicfoundation/hardhat-chai-matchers":"^2.0.3","@nomicfoundation/hardhat-ethers":"^3.0.5","@typechain/ethers-v6":"^0.5.1","@types/mocha":"^10.0.6","@types/node":"^20.11.0","chai":"^4.2.0","hardhat":"^2.19.4","mocha":"^10.2.0","ts-node":"^10.9.2","typechain":"^8.3.2","typescript":"^4.9.5"},"_id":"@clrfund/waffle-mock-contract@0.0.11","gitHead":"ba545cb6d3434f72f9420531a4d41b4a056fa88e","description":"Library for mocking smart contract dependencies during unit testing.","bugs":{"url":"https://github.com/clrfund/waffle-mock-contract/issues"},"homepage":"https://github.com/clrfund/waffle-mock-contract#readme","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-PkaTsujg4Ybbwuq7QjWlakO3io1B88GGVesfc3VlY5EWptA3LuNqfv51KpK7L1qoWpbyZP8vsBheL8GxHwfw6A==","shasum":"4e5917ca19ce90ae9e3160b6a1d5858e7121e408","tarball":"https://registry.npmjs.org/@clrfund/waffle-mock-contract/-/waffle-mock-contract-0.0.11.tgz","fileCount":97,"unpackedSize":1220994,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDptcvTGgmMbkHZ1ZliZ/tXC/UEJdYfD3FKpI4/KQS/FAiEA23C0eEeOJQx+IgDWbP0MP2Lcn/gChx6ZEsmk54T8e6w="}]},"_npmUser":{"name":"yuetlooo","email":"contact@yuetloo.com"},"directories":{},"maintainers":[{"name":"yuetlooo","email":"contact@yuetloo.com"},{"name":"auryn_macmillan","email":"aurynmacmillan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/waffle-mock-contract_0.0.11_1715976473541_0.6503568226234981"},"_hasShrinkwrap":false}},"time":{"created":"2024-01-13T06:34:19.767Z","0.0.1":"2024-01-13T06:34:19.999Z","modified":"2024-05-17T20:07:54.044Z","0.0.2":"2024-01-13T10:29:12.915Z","0.0.3":"2024-01-14T02:39:19.977Z","0.0.4":"2024-01-14T03:03:18.696Z","0.0.6":"2024-05-17T19:31:42.499Z","0.0.11":"2024-05-17T20:07:53.825Z"},"maintainers":[{"name":"yuetlooo","email":"contact@yuetloo.com"},{"name":"auryn_macmillan","email":"aurynmacmillan@gmail.com"}],"description":"Library for mocking smart contract dependencies during unit testing.","homepage":"https://github.com/clrfund/waffle-mock-contract#readme","repository":{"type":"git","url":"git+https://github.com/clrfund/waffle-mock-contract.git"},"bugs":{"url":"https://github.com/clrfund/waffle-mock-contract/issues"},"license":"MIT","readme":"# @clrfund/waffle-mock-contract\n\nLibrary for mocking smart contract dependencies during unit testing.\n\nThis library was cloned from [@ethereum-waffle/waffle-mock-contract](https://github.com/TrueFiEng/Waffle/tree/master/waffle-mock-contract) and modified to use ethers v6 and hardhat environment. This library will not be actively updated, it is only used in the Clr.fund project unit testing. As soon as the Waffle team release an updated version with ethers v6 support, this library will be archived.\n\n## Installation\n```\nyarn add --dev @clrfund/waffle-mock-contract\nnpm install --save-dev @clrfund/waffle-mock-contract\n```\n\n## Usage\n\nCreate an instance of a mock contract providing the ABI/interface of the smart contract you want to mock:\n\n```js\nconst {deployMockContract} = require('@clrfund/waffle-mock-contract');\n\n...\n\nconst mockContract = await deployMockContract(wallet, contractAbi);\n```\n\nMock contract can now be passed into other contracts by using the `target` attribute.\n\n```js\n   const anotherContract = await otherContract.doSomethingInteresting(mockContract.target);\n```\n\nReturn values for mocked functions can be set using:\n\n```js\nawait mockContract.mock.<nameOfMethod>.returns(<value>)\n```\n","readmeFilename":"README.md"}