# waves-deployer

> This package helps to deploy smart contracts to the blockchain Waves

Latest version **1.1.0** (published 2021-04-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install waves-deployer
pnpm add waves-deployer
yarn add waves-deployer
bun add waves-deployer
```

Provides the command `waves-deployer`.

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2021-04-10 |
| First published | 2021-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 43.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Albert Iblyaminov |
| Maintainers | rieset |

## Links

- npm: https://www.npmjs.com/package/waves-deployer
- Repository: https://github.com/rieset/waves-contract-deployer
- Homepage: https://github.com/rieset/waves-contract-deployer#readme
- Issues: https://github.com/rieset/waves-contract-deployer/issues
- npm.io page: https://npm.io/package/waves-deployer

## Dependencies (4)

- [yargs](https://npm.io/package/yargs.md) ^16.2.0
- [@actions/core](https://npm.io/package/@actions/core.md) ^1.1.0
- [@waves/node-api-js](https://npm.io/package/@waves/node-api-js.md) ^1.2.1-beta.1
- [@waves/waves-transactions](https://npm.io/package/@waves/waves-transactions.md) 4.1.8

## Recent versions

- 1.1.0 (latest) — 2021-04-10
- 1.0.0 — 2021-04-09

## README

# Waves Contract Deployer

This package helps to deploy smart contracts to the blockchain Waves

## Configure

```yml
{
  "host": "https://nodes-testnet.wavesnodes.com",
  "chainId": "T", // W for mainnet and T for testnet
  
  // Address with a non-zero balance for deployment operations contracts
  "deposit": "seed phrase", 
  "contracts": [
    {
      // Required. The text of the contract in base64 encoding
      "script": "path to contract file",

      // Optional. Use in other contracts like ENV vaariable ${MAIN_CONTRACT_ADDRESS}
      "anchor": "MAIN_CONTRACT_ADDRESS"

      // Optional. The amount that must be sent to the contract for it to work
      // 1400000 fee for contract deploy
      // >= 900000 per transaction
      "requestBalance": 10000000,

      // Optional. If it does not exist or is null, then create a new address for the contract
      "seed": "seed phrase",

      // Optional. Initializing contract after deploy 
      "init": {
        "addMember": [{
          "type": "string", // 'binary' | 'integer' | 'boolean' | 'string'
          "value": "...." // string | LONG | boolean
        }]
      }
    },
    // ...
    {
      "script": "path to contract file"
    }
  ]
}
```

## Use NPX
```
    npx waves-deployer contract-config.json
```

## Use in Github Action
```
- name: Waves deployer
  uses: rieset/waves-deployer@v.1.0.0.action.alpha
  id: deploy
  with:
    config: './contracts-deploy-config.json'

# Optional. Output data
- name: Output data
  run: |
    echo "${{ steps.deploy.outputs.contracts }}" >> ./contracts.json
   
# Save output data as artifact after deploy    
- name: Artifacts
  uses: actions/upload-artifact@v2
  with:
    name: contracts
    path: ./contracts.json

```

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