$ oz check
$ oz create
$ oz send-tx
$ oz verify (w/ optimizer No)
$ oz verify (w/ optimizer Yes)
Errors
$ oz check
Nothing to compile, all contracts are up to date.
No issues were found
$ oz create
Nothing to compile, all contracts are up to date.
? Pick a contract to instantiate AST20
? Pick a network rinkeby
All contracts are up to date
? Do you want to call a function on the instance after creating it? No
Possible initialization method (initialize) found in contract. Make sure you initialize your instance.
✓ Instance created at 0xF945192F6f26D31F85CcE8666f358D0c1a665705
0xF945192F6f26D31F85CcE8666f358D0c1a665705
$ oz send-tx
? Pick a network rinkeby
? Pick an instance AST20 at 0xF945192F6f26D31F85CcE8666f358D0c1a665705
? Select which function * initialize(name: string, symbol: string, decimals: uint8, initialSupply: uint256, initialHolder: address, minters: address[], pausers: address[])
? name (string): Deakin University Library
? symbol (string): DUL
? decimals (uint8): 2
? initialSupply (uint256): 100000
? initialHolder (address): 0xb99f16787923B6Ba407d2Bd0cB4bAD92739bdec8
? minters (address[]): 0xb99f16787923B6Ba407d2Bd0cB4bAD92739bdec8
? pausers (address[]): 0xb99f16787923B6Ba407d2Bd0cB4bAD92739bdec8
✓ Transaction successful. Transaction hash: 0xc479e61ac7a00a4b2ecbc85faef6a524e4448df16339bf7d667ef87f04b95d11
Events emitted:
- Transfer(0x0000000000000000000000000000000000000000, 0xb99f16787923B6Ba407d2Bd0cB4bAD92739bdec8, 100000)
- MinterRemoved(0xF945192F6f26D31F85CcE8666f358D0c1a665705)
- PauserRemoved(0xF945192F6f26D31F85CcE8666f358D0c1a665705)
$ oz verify
? Pick a contract AST20
? Pick a network rinkeby
? Was the optimizer enabled when you compiled your contracts? No
? Select an endpoint etherscan
? Provide an etherscan API KEY <my api key>
✖ Verifying and publishing contract source code of AST20 on etherscan (this usually takes under 30 seconds)
Error while trying to verify contract: Fail - Unable to verify
$ oz verify
? Pick a contract AST20
? Pick a network rinkeby
? Was the optimizer enabled when you compiled your contracts? Yes
? Specify the optimizer runs 200
? Select an endpoint etherscan
? Provide an etherscan API KEY <my api key>
✖ Verifying and publishing contract source code of AST20 on etherscan (this usually takes under 30 seconds)
Error while trying to verify contract: Fail - Unable to verify
$ oz compile --optimizer off
✓ Compiled contracts with solc 0.5.12 (commit.7709ece9)
Create
I didn’t bother to call initialize for the purposes of this example
$ oz create
Nothing to compile, all contracts are up to date.
? Pick a contract to instantiate AST20
? Pick a network rinkeby
- Variables _minters (MinterRole), _pausers (PauserRole) contain a struct or enum. These are not automatically checked for storage compatibility in the current version. See https://docs.openzeppelin.com/sdk/2.5/writing_contracts.html#modifying-your-contracts for more info.
✓ Contract AST20 deployed
All contracts have been deployed
? Do you want to call a function on the instance after creating it? No
Possible initialization method (initialize) found in contract. Make sure you initialize your instance.
✓ Instance created at 0x36bc96eA75667c26cBF0AC7c84208A85f42357fC
0x36bc96eA75667c26cBF0AC7c84208A85f42357fC
Verify
$ oz verify
? Pick a contract AST20
? Pick a network rinkeby
? Was the optimizer enabled when you compiled your contracts? No
? Select an endpoint etherscan
? Provide an etherscan API KEY ZZZZZMYAPIKEYZZZZZ
✓ Contract source code of AST20 verified and published successfully. You can check it here: https://rinkeby.etherscan.io/address/0x6b5003B6cF30CbD8345aa09586114140399F1792#code
One address is for the proxy, this is the address shown from oz create, whilst the other address is for the logic conract, this is the address shown from oz verify:
Proxy contract: 0x36bc96eA75667c26cBF0AC7c84208A85f42357fC
Logic contract: 0x6b5003B6cF30CbD8345aa09586114140399F1792
If you have a look at rinkeby.json in .openzeppelin directory it should show the address of the contract (Proxy) and the address of the implementation (Logic).