oz send-tx with parameter arguments separated by spaces errors with: A network name must be provided to execute the requested action.
$ npx oz send-tx --network development --from 0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1 --to 0x9b1f7F645351AF3631a656421eD2e40f2802E6c0 --method doStuff --args 1 2
A network name must be provided to execute the requested action.
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
contract A {
function doStuff(uint256 a, uint256 b) public {}
}
Deploy
$ code .
✓ Compiled contracts with solc 0.6.8 (commit.0bbfe453)
? Choose the kind of deployment regular
? Pick a network development
? Pick a contract to deploy A
✓ Deployed instance of A
0x9b1f7F645351AF3631a656421eD2e40f2802E6c0
send-tx
$ npx oz send-tx --network development --from 0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1 --to 0x9b1f7F645351AF3631a656421eD2e40f2802E6c0 --method doStuff --args 1 2
A network name must be provided to execute the requested action.
The community member wasn't able to find the correct syntax in the --help or the documentation.
The correct syntax is to separate parameters with commas.
$ npx oz send-tx --network development --from 0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1 --to 0x9b1f7F645351AF3631a656421eD2e40f2802E6c0 --method doStuff --args 1,2
✓ Transaction successful. Transaction hash: 0x847ad217d23eb263869dd48a1fbb1f1b62ff843997431f194916ff3361d1f705
oz send-tx
with parameter arguments separated by spaces errors with:A network name must be provided to execute the requested action
.Reported in Telegram (with a post in the forum): https://forum.openzeppelin.com/t/oz-send-tx-to-a-function-with-array-arguments-errors-with-a-network-name-must-be-provided-to-execute-the-requested-action/2916
It can be reproduced as follows:
A.sol
Deploy
send-tx
The community member wasn't able to find the correct syntax in the
--help
or the documentation.The correct syntax is to separate parameters with commas.