# truffle-kekchain-verify

> Verify your deployed smart contracts on Blockscout from the Truffle CLI

Latest version **0.0.4** (published 2022-09-19) · Apache Licence V2 license · 0 weekly downloads

## Install

```sh
npm install truffle-kekchain-verify
pnpm add truffle-kekchain-verify
yarn add truffle-kekchain-verify
bun add truffle-kekchain-verify
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2022-09-19 |
| First published | 2022-09-19 |
| Weekly downloads | 0 |
| License | Apache Licence V2 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 17 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Author | Interchained & Bill Aure @Kekchain @Crystaleum |
| Maintainers | interchained |
| Keywords | truffle, plugin, ethereum, blockscout, verify |

## Links

- npm: https://www.npmjs.com/package/truffle-kekchain-verify
- Repository: https://github.com/crystaleum/truffle-plugin-blockscout-verify
- Homepage: https://github.com/crystaleum/truffle-plugin-blockscout-verify#readme
- Issues: https://github.com/crystaleum/truffle-plugin-blockscout-verify/issues
- npm.io page: https://npm.io/package/truffle-kekchain-verify

## Dependencies (5)

- [axios](https://npm.io/package/axios.md) ^0.26.1
- [delay](https://npm.io/package/delay.md) ^4.4.1
- [sol-merger](https://npm.io/package/sol-merger.md) ^1.2.2
- [querystring](https://npm.io/package/querystring.md) ^0.2.1
- [@celo/contractkit](https://npm.io/package/@celo/contractkit.md) ^1.5.2

## Recent versions

- 0.0.4 (latest) — 2022-09-19
- 0.0.3 — 2022-09-19
- 0.0.2 — 2022-09-19

## README

# truffle-kekchain-verify
[![NPM Version](https://img.shields.io/npm/v/truffle-kekchain-verify.svg)](https://www.npmjs.com/package/truffle-kekchain-verify)
[![NPM Monthly Downloads](https://img.shields.io/npm/dm/truffle-kekchain-verify.svg)](https://www.npmjs.com/package/truffle-kekchain-verify)
[![NPM License](https://img.shields.io/npm/l/truffle-assertions.svg)](https://www.npmjs.com/package/truffle-kekchain-verify)

This truffle plugin allows you to automatically verify your smart contracts' source code on Blockscout, straight from the Truffle CLI.

This plugin is based in the [Truffle Plugin to verify Smart Contracts on Etherscan](https://github.com/rkalis/truffle-plugin-verify/).

## Installation
1. Install the plugin with npm
    ```sh
    npm install truffle-kekchain-verify
    ```
2. Add the plugin to your `truffle.js` or `truffle-config.js` file
    ```js
    module.exports = {
      /* ... rest of truffle-config */

      plugins: [
        'truffle-kekchain-verify'
      ]
    }
    ```


## Usage

Before running verification, make sure that you have actually deployed your contracts to a public network with Truffle. After deployment, run the following command with one or more contracts that you wish to verify:

```
truffle run verify SomeContractName AnotherContractName --network networkName
```

The network parameter should correspond to a network defined in the Truffle config file, with the correct network id set. The Ethereum mainnet and all main public testnets are supported.

For example, if we defined `mainnet` as network in Truffle, and we wish to verify the `SimpleStorage` contract:

```
truffle run verify SimpleStorage --network mainnet
```

This can take some time, and will eventually either return `Pass - Verified` or `Fail - Unable to verify` for each contract. Since the information we get from the Blockscout API is quite limited, it is currently impossible to retrieve any more information on verification failure. There should be no reason though why the verification should fail if the usage is followed correctly. If you do receive a `Fail - Unable to verify` and you are sure that you followed the instructions correctly, please [open an issue](/issues/new) and I will look into it.


### Plugin Development

During the development of the plugin, you can run it from the truffle folder running the following command:

```
npm link /path/to/truffle-kekchain-verify
./node_modules/.bin/truffle run verify Random --network integration

```

### Adding Preamble (Optional)

There is also the option of adding preamble to the beginning of your verified source code. This may be useful for adding authorship information, links to source code, copyright information, or versioning information.

To do so, add the following to your `truffle.js` or `truffle-config.js` file
```js
module.exports = {
  /* ... rest of truffle-config */

  verify: {
    preamble: "Author: John Doe.\nVersion: 0.0.1"
  }
}
```

## Notes
This plugin gets compiler optimisation settings from the truffle config file, so make sure that your truffle config settings are the same as they were when your contracts were compiled.

---
_Source: https://npm.io/package/truffle-kekchain-verify · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
