Socket
Book a DemoInstallSign in
Socket

@laborx/actions-tracking-contracts

Package Overview
Dependencies
Maintainers
5
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@laborx/actions-tracking-contracts

Provides contracts for action tracking for bug hunters

1.0.1
latest
npmnpm
Version published
Maintainers
5
Created
Source

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:

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

or

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

Smart contracts

Import smart contract as you usually do with external libraries

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.

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)

FAQs

Package last updated on 03 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.