:param args: the parameter is an array, containing element like [from, to, amount] :return: True means success, False or raising exception means failure.
(args)
| 179 | |
| 180 | |
| 181 | def transferMulti(args): |
| 182 | """ |
| 183 | :param args: the parameter is an array, containing element like [from, to, amount] |
| 184 | :return: True means success, False or raising exception means failure. |
| 185 | """ |
| 186 | for p in args: |
| 187 | if len(p) != 3: |
| 188 | # return False is wrong |
| 189 | raise Exception("transferMulti params error.") |
| 190 | if transfer(p[0], p[1], p[2]) == False: |
| 191 | # return False is wrong since the previous transaction will be successful |
| 192 | raise Exception("transferMulti failed.") |
| 193 | return True |
| 194 | |
| 195 | |
| 196 | def approve(owner,spender,amount): |