Skip to content

Commit

Permalink
Add documentation about --binary in encode cmds
Browse files Browse the repository at this point in the history
  • Loading branch information
guidanoli committed Mar 27, 2024
1 parent 1e6b7e5 commit 0ae742f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ If, instead, you install the package, you can just run `cmoic [args...]`.

## Encoding inputs

### To hex

```sh
pnpm cmioc encode input \
--chain-id 1 \
Expand All @@ -41,6 +43,10 @@ Output:
0xcc7dee1f000000000000000000000000000000000000000000000000000000000000000100000000000000000000000070ac08179605af2d9e75782b8decdd3c22aa4d0c000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266000000000000000000000000000000000000000000000000000000000000002a0000000000000000000000000000000000000000000000000000000000011170000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000
```

### To binary

Just add the `--binary` flag.

## Decoding inputs

### From hex
Expand Down Expand Up @@ -79,6 +85,8 @@ Output:

### Notices

#### To hex

```sh
pnpm cmioc encode notice \
--payload 0xdeadbeef
Expand All @@ -90,8 +98,14 @@ Output:
0xc258d6e500000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000
```

#### To binary

Just add the `--binary` flag.

### Vouchers

#### To hex

```sh
pnpm cmioc encode voucher \
--destination 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 \
Expand All @@ -105,6 +119,10 @@ Output:
0x237a816f000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb922660000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000003fafafa0000000000000000000000000000000000000000000000000000000000
```

#### To binary

Just add the `--binary` flag.

## Decoding outputs

### Notices
Expand Down

0 comments on commit 0ae742f

Please sign in to comment.