Get Started
Quickstart
Start a patchwork-based project
Setup your development environment
In a git repository root directory, perform the following steps to prepare a project:
1
Install Foundry
Foundry is a smart contract development toolchain. You can install it by following the instructions at Foundry’s installation guide.
forge install
2
Install Patchwork Contracts Library
forge install runic-inc/patchwork
3
Install OpenZeppelin Contracts
forge install openzeppelin/openzeppelin-contracts
4
Configure Project Remappings
In project directory, create the file remappings.txt
@openzeppelin/=lib/openzeppelin-contracts/
@patchwork/=lib/patchwork/src/
forge-std/=lib/forge-std/src/
lib/=lib/
5
Install PDK
Option 1 - Local project installation (recommended for npm/js projects)
npm i @patchworkdev/pdk
Option 2 - Global binary installation
npm i -g @patchworkdev/pdk