# @laborx/actions-tracking-contracts

> Provides contracts for action tracking for bug hunters

Latest version **1.0.1** (published 2019-06-03) · AGPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @laborx/actions-tracking-contracts
pnpm add @laborx/actions-tracking-contracts
yarn add @laborx/actions-tracking-contracts
bun add @laborx/actions-tracking-contracts
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-06-03 |
| First published | 2019-04-02 |
| Weekly downloads | 0 |
| License | AGPL-3.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 4 |
| Unpacked size | 55.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | LaborX PTY |
| Maintainers | alesanro, aliaksei.hiatsevich, be1box, mike.chronobank, ozalexo |

## Links

- npm: https://www.npmjs.com/package/@laborx/actions-tracking-contracts
- Repository: https://gitlab.chronobank.io:SmartContracts/TokenAirdrop
- Homepage: https://gitlab.chronobank.io/SmartContracts/TokenAirdrop
- Issues: https://gitlab.chronobank.io/SmartContracts/TokenAirdrop/issues
- npm.io page: https://npm.io/package/@laborx/actions-tracking-contracts

## Dependencies (4)

- [openzeppelin-solidity](https://npm.io/package/openzeppelin-solidity.md) 2.0.0-rc.3
- [@truffle-types/typescript-types](https://npm.io/package/@truffle-types/typescript-types.md) ~0.1.9
- [@truffle-types/deployment-context](https://npm.io/package/@truffle-types/deployment-context.md) ~0.4.2
- [@laborx/solidity-eventshistory-contracts](https://npm.io/package/@laborx/solidity-eventshistory-contracts.md) ~1.1.0

## Recent versions

- 1.0.1 (latest) — 2019-06-03
- 1.0.0 — 2019-04-02

## README

# Actions Tracking smart contracts

Provides smart contract to track user actions and register them with certain payload.

## Details

- `ActionsTracker` smart contract
- support code to deploy and interpret contract outputs (like error codes).

## Usage

Install package using npm or yarn package managers:

```bash
yarn add `@laborx/actions-tracking-contracts`
```

or

```bash
npm install `@laborx/actions-tracking-contracts`
```

### Smart contracts

Import smart contract as you usually do with external libraries

```javascript
import "@laborx/actions-tracking-contracts/contracts/ActionsTracker.sol";

contract ExtendedTracker is ActionsTracker {
	// ...
}
```

### Support

There are two main areas for support functionality:

- deployment scripts
- constants

#### Deployment scripts

Deployment of a contract could be run with truffle framework by providing deployment context from `@truffle-types/deployment-context` package.

```javascript
const deployerAccount = "0x...";
const deploymentContext = new ContractDeploymentContext(
	web3,
	artifacts,
	undefined,
	"path to deployed-addresses.json file"
);

await ActionsTrackerDeployment.deployActionsTracker(
	deploymentContext,
	deployerAccount,
	{ eventsHistory: "EventsHistoryContractKey" },
	{ actionsTracker: "ActionsTrackerContractKey" },
	{ redeploy: false, owners: [] }
);
```

#### Support constants

Provides the next constants:

- revert reasons (`ActionsTrackerRevertReasons`)
- error codes (`errorsLibrary`)
- names for deployed addresses file (`ContractNames`)

---
_Source: https://npm.io/package/@laborx/actions-tracking-contracts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
