OpenZeppelin Starter Kit
An OpenZeppelin Starter Kit containing React, OpenZeppelin CLI, OpenZeppelin Contracts, Truffle and Infura.
This kit comes with everything you need to start using upgradeable Smart contracts inside your applications. It also includes all the configuration required to deploy to different networks.
Install Ganache, and Truffle
npm install -g firstname.lastname@example.org email@example.com
Ensure you are in a new and empty directory, and run the
unpack command with
starter to create a starter project:
npx @openzeppelin/cli unpack starter
In a new terminal window, run your local blockchain:
In your original terminal window, at the top level of your folder, initialize the project and follow the prompts:
npx oz init
In a new terminal window, in the
client directory, run the React app:
cd client npm run start
You can interact directly with your smart contracts from the
npx oz transfer
send funds to a given address.
npx oz balance [address]
query the ETH balance of the specified account, also supports ERC20s.
npx oz send-tx
sends a transaction to your contract and returns the events.
npx oz call
execute a constant method and receive back the value.
npx oz to see a complete list of availible commands.
// inside the development console. test // outside the development console.. truffle test
Jest is included for testing React components. Compile your contracts before running Jest, or you may receive some file not found errors.
// ensure you are inside the client directory when running this npm run test
To build the application for production, use the build script. A production build will be in the
// ensure you are inside the client directory when running this npm run build
How do I use this with the Ganache-CLI?
It's as easy as modifying the config file! Check out our documentation on adding network configurations. Depending on the port you're using, you'll also need to update line 29 of
Where is my production build?
The production build will be in the
client/buildfolder after running
npm run buildin the
Where can I find more documentation?
Check out the OpenZeppelin Starter Kits documentation.