ERC20 based token for wrapping PCI.
- UUPS proxy pattern (EIP1822)
- OpenZeppelin Truffle Upgrades API
- CentOS Linux release 7.9.2009 (Core)
- Truffle v5.3.14 (core: 5.3.14)
- Solidity v0.5.16 (solc-js)
- Node v16.20.2
- Web3.js v1.4.0
% npm install
% truffle compile
Run local dev node and console
% truffle develop
Migrate (compile & deploy)
truffle(develop)> migrate --to 1
Example
truffle(develop)> wt = await WPCI.deployed()
truffle(develop)> wt.address
truffle(develop)> wt.wrap(accounts[0], '12300000000', '0x77742e756e777261702827307835303433343933303331333933333335333633')
truffle(develop)> wt.wrapped('0x77742e756e777261702827307835303433343933303331333933333335333633')
truffle(develop)> (await wt.balanceOf(accounts[0])).toString()
truffle(develop)> wt.unwrap('PCI01EF50758D506AD9570B1C567123B0390D9F5AEE651770018A', '1000')
% truffle migrate --network goerli
// specific files
% truffle migrate -f 2 --to 2 --network goerli
- Go Remix Ethereum IDE
- Create a contract source file in the contracts folder
- Add the module version to import statements
import "@openzeppelin/contracts-upgradeable@4.5.1/...
- Choose the compiler version and compile
- Add the 'FLATTENER' plugin and use it