OpenZeppelin / openzeppelin-sdk

OpenZeppelin SDK repository for CLI and upgrades.js. No longer actively developed.
MIT License
431 stars 200 forks source link

`oz send-tx` should put transaction hash into stdout #1527

Open abcoathup opened 4 years ago

abcoathup commented 4 years ago

oz send-tx should put transaction hash into stdout

Suggested on Telegram by @k06a: https://t.me/zeppelinos/11487

Current operation in interactive/no-interactive modes below:

Interactive

$ npx oz send-tx
? Pick a network development
? Pick an instance Box at 0xe78A0F7E598Cc8b0Bb87894B0F60dD2a88d6a8Ab
? Select which function store(newValue: uint256)
? newValue: uint256: 42
✓ Transaction successful. Transaction hash: 0x2bb81176965df92abac846f0baf1347fc47fee5ac2b70a23f95f66696db0175f
Events emitted:
 - ValueChanged(42)

No interactive

$ npx oz send-tx --no-interactive --network development --to 0xe78A0F7E598Cc8b0Bb87894B0F60dD2a88d6a8Ab --method store --args 42
✓ Transaction successful. Transaction hash: 0x2bad2e6f7c41d9ba77553e57d2ca435cf936ad5ab773d56383f0b3c1464a557c
Events emitted:
 - ValueChanged(42)