New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@unlock-protocol/contracts

Package Overview
Dependencies
Maintainers
0
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unlock-protocol/contracts

  • 0.0.33
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Contracts

Javascript usage

// get latest version
import { Unlock } from '@unlock-protocol/contracts'
import { PublicLock } from '@unlock-protocol/contracts'

// a previous version
import UnlockV12 from '@unlock-protocol/contracts/UnlockV12'
import { UnlockV12 } from '@unlock-protocol/contracts'

// all contracts
import { contracts } from '@unlock-protocol/contracts'

// the number of latest versions available
import {
  PUBLICLOCK_LATEST_VERSION,
  UNLOCK_LATEST_VERSION,
} from '@unlock-protocol/contracts'

Solidity usage

NB: all the contracts have been flattened and exist mostly for archiving.

import '@unlock-protocol/contracts/Unlock/UnlockV0.sol';

Adding a contract

You can add a contract from the smart-contracts folder (which is used for development/testing) with the following command:

yarn hardhat release --contract contracts/<contract>.sol

Build the package

After adding a contract, you need to append the file to the index by running:

yarn build:index

Run Tests

Make sure all the contracts are building correctly by running

yarn test

Build the docs

Output documentation for Unlock and PublicLock in the /docs folder

yarn docs

FAQs

Package last updated on 12 Dec 2024

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc