Overview
This is just an example of using our solc-transpiler
as the solc-js
compiler within waffle
and truffle
.
Truffle
Transpiling
- Make sure the
@eth-optimisim/solc-transpiler
dependency points to the latest release - Run
yarn install
- Run
truffle compile --config truffle-config-ovm.js
- See the compiled + transpiled output in the contract JSON in the
build/contracts/
directory
Testing
The beauty of the OVM and our compatibility with Ethereum dev tools is that you can test regularly or test against the OVM without any code changes.
Testing Regularly
yarn install
rm -rf build
truffle compile
truffle test ./truffle-tests/test-erc20.js
Testing w/ OVM
yarn install
rm -rf build
truffle compile --config truffle-config-ovm.js
- Make sure the
rollup-full-node
is running truffle test ./truffle-tests/test-erc20.js --config truffle-config-ovm.js
Waffle
Transpiling
- Make sure the
@eth-optimisim/solc-transpiler
dependency points to the latest release - Run
yarn install
- Run
yarn build:waffle
- See the compiled + transpiled output in the contract JSON in the
build/waffle/
directory