{"_id":"@dedge_security/hardhat3-deployment-notifier","_rev":"3-8e4e756b7b088d0d026b72112826c003","name":"@dedge_security/hardhat3-deployment-notifier","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@dedge_security/hardhat3-deployment-notifier","version":"0.1.0","keywords":["hardhat","hardhat-plugin","hardhat3","deployment","notifier","ethereum","smart-contracts"],"author":{"name":"dedge-security"},"license":"MIT","_id":"@dedge_security/hardhat3-deployment-notifier@0.1.0","maintainers":[{"name":"ds_ruben","email":"rjimenez@dedgesecurity.com"},{"name":"ds-rabadie","email":"rabadie@dedgesecurity.com"}],"homepage":"https://dedgesecurity.com/","dist":{"shasum":"cab98b906e947b227c8c283f6a40ce763456ec76","tarball":"https://registry.npmjs.org/@dedge_security/hardhat3-deployment-notifier/-/hardhat3-deployment-notifier-0.1.0.tgz","fileCount":4,"integrity":"sha512-aQjjVFAPUcRL8WnBMhJLsPRldcI9xE+ARm8Cy9kiYHqYZrQyeTsOMwpHVcyM6S+ycexWIciWw6eg+19MvRZ8Uw==","signatures":[{"sig":"MEYCIQDcy4pZp3eF4COekd7eE6UYw5PA8v53WoLBVilbjvJGKAIhAJXJtClxrRipgWRNwQfhvIdksxO3t/lKhpTtwQDb8xjk","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9487},"main":"dist/index.js","type":"module","engines":{"node":">=22.10.0"},"exports":{".":"./dist/index.js"},"gitHead":"2ba39b000a9aa32b1130a26a3627276f0ff94cb8","scripts":{"test":"cd example && npm run test:ci","build":"node build.js","clean":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"ds-rabadie","email":"rabadie@dedgesecurity.com"},"repository":{"url":"","type":"git"},"_npmVersion":"10.9.4","description":"Hardhat 3 plugin to notify endpoints on contract deployment","directories":{},"_nodeVersion":"22.22.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.19.12"},"peerDependencies":{"hardhat":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hardhat3-deployment-notifier_0.1.0_1772637872579_0.6741612885957111","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@dedge_security/hardhat3-deployment-notifier","version":"0.1.1","keywords":["hardhat","hardhat-plugin","hardhat3","deployment","notifier","ethereum","smart-contracts"],"author":{"name":"dedge-security"},"license":"MIT","_id":"@dedge_security/hardhat3-deployment-notifier@0.1.1","maintainers":[{"name":"ds_ruben","email":"rjimenez@dedgesecurity.com"},{"name":"ds-rabadie","email":"rabadie@dedgesecurity.com"}],"homepage":"https://dedgesecurity.com/","dist":{"shasum":"0432d97f7d94d2aa024739fd61a0bf08bfe5956e","tarball":"https://registry.npmjs.org/@dedge_security/hardhat3-deployment-notifier/-/hardhat3-deployment-notifier-0.1.1.tgz","fileCount":4,"integrity":"sha512-7FPBjkmxzkaQ39jFl00FbuH4AzGc8weAHv+obQ5MYqVCVPlu4kGpiHUt7BuAaMO23YW1YHh5L0UNXxuDoR2quQ==","signatures":[{"sig":"MEUCIQDhbOcSVu7pYwM2EFXJJDILnU742CJGAafHKTNEC5LdmwIgRh/QBDlX/VxOS1xcP8Nw+3eHTM8/4WmqyVYtOanpG1U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9599},"main":"dist/index.js","type":"module","engines":{"node":">=22.10.0"},"exports":{".":"./dist/index.js"},"gitHead":"35addaad542708541af9e9c951e8b0cda9b7904f","scripts":{"test":"cd example && npm run test:ci","build":"node build.js","clean":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"ds-rabadie","email":"rabadie@dedgesecurity.com"},"repository":{"url":"","type":"git"},"_npmVersion":"10.9.4","description":"Hardhat 3 plugin to notify endpoints on contract deployment","directories":{},"_nodeVersion":"22.22.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.19.12"},"peerDependencies":{"hardhat":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hardhat3-deployment-notifier_0.1.1_1773140761203_0.5637589304342001","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@dedge_security/hardhat3-deployment-notifier","version":"0.2.0","description":"Hardhat 3 plugin to notify endpoints on contract deployment","type":"module","main":"dist/index.js","exports":{".":"./dist/index.js"},"keywords":["hardhat","hardhat-plugin","hardhat3","deployment","notifier","ethereum","smart-contracts"],"author":{"name":"dedge-security"},"license":"MIT","homepage":"https://dedgesecurity.com/","publishConfig":{"access":"public"},"repository":{"type":"git","url":""},"engines":{"node":">=22.10.0"},"scripts":{"build":"node build.js","prepublishOnly":"npm run build","test":"cd example && npm run test:ci","clean":"rm -rf dist"},"peerDependencies":{"hardhat":"^3.0.0"},"devDependencies":{"esbuild":"^0.19.12"},"_id":"@dedge_security/hardhat3-deployment-notifier@0.2.0","gitHead":"4fb94250ea483c7d0a54c94095f48faf8e705b59","_nodeVersion":"22.22.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-49S7ZdgO5FhO8nlnM5r8TVUlEEftaX+4Uf8Bfdiijl7BJRp0SK9ng3k69q5PqijJR3xJ7IQJNIfBl0Wq6ipD6Q==","shasum":"4a1623e372ef4b24ea286b92ae7063e0c8a9eeb4","tarball":"https://registry.npmjs.org/@dedge_security/hardhat3-deployment-notifier/-/hardhat3-deployment-notifier-0.2.0.tgz","fileCount":4,"unpackedSize":10601,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDkmdzyaZ9q/nwXrvTACT2TP7AQabjs1RPjMj9UkVdh6QIgMx9SliCjfmEHX+8yVD8OFrGH3V8iqvVhzqMNs61agLc="}]},"_npmUser":{"name":"ds-rabadie","email":"rabadie@dedgesecurity.com"},"directories":{},"maintainers":[{"name":"ds_ruben","email":"rjimenez@dedgesecurity.com"},{"name":"ds-rabadie","email":"rabadie@dedgesecurity.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/hardhat3-deployment-notifier_0.2.0_1773155031289_0.6027061219346548"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-04T15:24:32.470Z","modified":"2026-03-10T15:03:51.565Z","0.1.0":"2026-03-04T15:24:32.708Z","0.1.1":"2026-03-10T11:06:01.351Z","0.2.0":"2026-03-10T15:03:51.410Z"},"author":{"name":"dedge-security"},"license":"MIT","homepage":"https://dedgesecurity.com/","keywords":["hardhat","hardhat-plugin","hardhat3","deployment","notifier","ethereum","smart-contracts"],"repository":{"type":"git","url":""},"description":"Hardhat 3 plugin to notify endpoints on contract deployment","maintainers":[{"name":"ds_ruben","email":"rjimenez@dedgesecurity.com"},{"name":"ds-rabadie","email":"rabadie@dedgesecurity.com"}],"readme":"# @dedge_security/hardhat3-deployment-notifier\n\nA Hardhat plugin that automatically sends deployment information to a configurable endpoint whenever a smart contract is deployed.\n\n## Requirements\n\n- Node.js 22.10+\n- Hardhat 3.x\n\n## Features\n\n- Automatically captures deployment information\n- Sends data to configurable HTTP endpoint\n- Includes git commit ID, contract address, ABI, constructor arguments, file path, and contract name\n- Configurable timeout and error handling\n- Works with any EVM network supported by Hardhat\n\n## Install\n\n```bash\nnpm install --save-dev @dedge_security/hardhat3-deployment-notifier\n```\n\n## Config\n\n```js\nimport { defineConfig } from \"hardhat/config\";\nimport deploymentNotifierPlugin from \"@dedge_security/hardhat3-deployment-notifier\";\n\nexport default defineConfig({\n  plugins: [deploymentNotifierPlugin],\n  deploymentNotifier: {\n    endpoint: \"http://localhost:3000/api/deployments\", // Required: endpoint URL\n    timeout: 10000, // Optional: request timeout in ms (default: 10000)\n    failOnError: false, // Optional: throw error if notification fails (default: false)\n  },\n  // ... networks, solidity, etc.\n});\n```\n\n## Usage\n\n### Deploy task (CLI)\n\n```bash\nnpx hardhat deploy --contract SimpleStorage 42 \"MyStorage\" --network localhost\n```\n\n### In scripts or tests (programmatic)\n\nIn Hardhat 3, get `ethers` from the network connection. Use the notifier’s **async** getters and `notifyDeployment` after deploying:\n\n```js\nimport hre from \"hardhat\";\n\nasync function main() {\n  const connection = await hre.network.connect();\n  const { ethers } = connection;\n\n  const contractName = \"SimpleStorage\";\n  const Contract = await ethers.getContractFactory(contractName);\n  const contract = await Contract.deploy(42, \"MyStorage\");\n  await contract.waitForDeployment();\n  const address = await contract.getAddress();\n\n  const filePath = await hre.deploymentNotifier.getContractFilePath(contractName);\n  const abi = await hre.deploymentNotifier.getContractABI(contractName);\n  const bytecode = await hre.deploymentNotifier.getContractBytecode(contractName);\n\n  await hre.deploymentNotifier.notifyDeployment({\n    address,\n    contractName,\n    constructorArgs: [42, \"MyStorage\"],\n    abi,\n    bytecode,\n    filePath,\n    transactionHash: hre.deploymentNotifier.getDeploymentTransactionHash(contract),\n    deployerAddress: hre.deploymentNotifier.getDeployerAddress(contract),\n  });\n}\n```\n\n## Data Sent to Endpoint\n\nThe plugin sends a POST request with the following JSON payload:\n\n```json\n{\n  \"gitCommitId\": \"abc123...\",\n  \"gitRepositoryUrl\": \"https://github.com/org/repo.git\",\n  \"contractName\": \"MyContract\",\n  \"contractAddress\": \"0x...\",\n  \"filePath\": \"contracts/MyContract.sol\",\n  \"network\": \"localhost\",\n  \"chainId\": \"31337\",\n  \"timestamp\": \"2024-01-01T00:00:00.000Z\",\n  \"transactionHash\": \"0x...\",\n  \"deployerAddress\": \"0x...\",\n  \"constructorArguments\": [...],\n  \"abi\": [...],\n  \"bytecode\": \"0x6080604052...\"\n}\n```\n\n**API (all artifact getters are async):**\n\n- `getContractFilePath(contractName)` → `Promise<string | null>`\n- `getContractABI(contractName)` → `Promise<object[] | null>`\n- `getContractBytecode(contractName)` → `Promise<string | null>`\n- `getDeploymentTransactionHash(contract)` → `string | null` — from deployed contract instance\n- `getDeployerAddress(contract)` → `string | null` — from deployed contract instance\n- `notifyDeployment(payload)` → `Promise<void>`\n- `getGitCommitId()` / `getGitRepositoryUrl()` → sync, return `string | null`\n\n## Build and Test\n\n```bash\nnpm run clean\nnpm run build\nnpm run test\n```\n\nOutput: `dist/index.js` (ESM, minified).\n\n## License\n\nMIT\n","readmeFilename":"README.md"}