Demo 3: Testing the OpenZeppelin Suite against Theta Local Privatenet
The OpenZeppelin suite contains battle-tested libraries of smart contracts for Ethereum and other blockchains, which helps the developers minimize risk with DApp development. It includes the most used implementations of ERC standards.
We have made a copy of the OpenZeppelin suite to this repository and adapted the unit test cases for the Theta blockchain.
Setup
First clone the repository and install the dependancies with the following commands:
git clone https://github.com/thetatoken/theta-openzeppelin-demo
cd theta-openzeppelin-demo
yarn
Run tests
Setup the Theta local privatenet with the Theta/Ethereum RPC Adaptor following this guide. The ETH RPC adaptor running at http://localhost:18888/rpc
interacts with the javascript code by translating the Theta RPC interface into the ETH RPC interface. Then, run the tests with the following commands:
# Run all tests
npx hardhat test --network theta_privatenet
# Run individual tests
npx hardhat test test/utils/math/* --network theta_privatenet
npx hardhat test test/proxy/transparent/ProxyAdmin.test.js --network theta_privatenet
npx hardhat test test/utils/*.test.js
Updated over 3 years ago