Skip to content

Commit ffa0856

Browse files
committedSep 30, 2022
update README.md
1 parent e1b3983 commit ffa0856

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed
 

‎README.md

+24-6
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ Get the hash according to eip-712 through the passed parameters.
1919
### Struct
2020
```
2121
typedef struct _eip712_domain {
22-
uint8_t chain_id[32];
22+
uint8_t chain_id[EIP712_HASH_SIZE];
2323
char* name;
24-
uint8_t* verifying_contract;
24+
uint8_t verifying_contract[20];
2525
char* version;
2626
} eip712_domain;
2727
@@ -30,11 +30,27 @@ typedef struct _eip712_active {
3030
char* params;
3131
} eip712_active;
3232
33+
typedef struct _eip712_cell {
34+
char* capacity;
35+
char* lock;
36+
char* type;
37+
char* data;
38+
char* extra_data;
39+
} eip712_cell;
40+
3341
typedef struct _eip712_data {
34-
eip712_domain doamin;
42+
eip712_domain domain;
3543
eip712_active active;
36-
char* cell_extra_data;
3744
char* transaction_das_message;
45+
char* inputs_capacity;
46+
char* outputs_capacity;
47+
char* fee;
48+
uint8_t digest[32];
49+
50+
eip712_cell* inputs;
51+
size_t inputs_len;
52+
eip712_cell* outputs;
53+
size_t outputs_len;
3854
} eip712_data;
3955
```
4056

@@ -80,5 +96,7 @@ Last message hash: 0xcce661e249e03e2e0c581e1763fa1432491863c625a4128dd966822cc5f
8096
#### C testcases
8197
Verify that the C code is executed correctly and check for memory problems, Also need to write fuzzing tests.
8298
83-
#### Contract Testcases
84-
Test cases that are actually executed in the contract, use rust.
99+
## NOTE
100+
* Only functions declared in eip712.h are tested
101+
* Tests are executed directly in ckb-debugger
102+
* All strings must be \0 terminated

0 commit comments

Comments
 (0)
Please sign in to comment.