(cmd *cobra.Command, method uint, args []string)
| 190 | } |
| 191 | |
| 192 | func writeCallForMethod(cmd *cobra.Command, method uint, args []string) { |
| 193 | buf, err := useBuffer(method, cmd) |
| 194 | if err != nil { |
| 195 | fail(err) |
| 196 | } |
| 197 | |
| 198 | data := common.FromHex(args[0]) |
| 199 | addr := common.FromHex(args[1]) |
| 200 | |
| 201 | if len(addr) != 20 { |
| 202 | fail(fmt.Errorf("invalid address length")) |
| 203 | } |
| 204 | |
| 205 | if _, err := buf.WriteCall(addr, data); err != nil { |
| 206 | fail(err) |
| 207 | } |
| 208 | |
| 209 | fmt.Printf("0x%x\n", buf.Commited) |
| 210 | } |
| 211 | |
| 212 | func addEncodeSequenceCommands(cmd *cobra.Command) { |
| 213 | encodeSequenceCmd := &cobra.Command{ |
no test coverage detected