I'm troubled with a problem about how I can use command line cleos push action
to push a vector to an already existing action, such as:
void vectortest(const std::vector &vec) ;
Anyone who can help me? Thanks
suppose your action looks like this: first define type of your vector let say you need a vector of double
void vectortest(const std::vector<double> &vec) ;
than you should be able to call like this:
cleos push action your_account vectortest '{"vec":[1.2,2.5,4.6]}' -p your_account
your_account is the account with which you set your contract.
cleos push action <contract> <action> '["arg1", ["vec_elem1", "vec_elem2"]]' -p <account>
assuming the second param is the vector