@unlock-protocol/contracts
TypeScript icon, indicating that this package has built-in type declarations

0.0.26 • Public • Published

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';

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

Readme

Keywords

none

Package Sidebar

Install

npm i @unlock-protocol/contracts

Weekly Downloads

412

Version

0.0.26

License

none

Unpacked Size

6.97 MB

Total Files

162

Last publish

Collaborators

  • unlock-dev
  • ops-unlock
  • clemsos
  • julien51