I'm finding to way to encode parameter using viem before writing to contract. #1616
Answered
by
Asaki-Katsu
Asaki-Katsu
asked this question in
Question
-
Hi, I have these 3 structs: struct T1 {
uint8 foo,
bytes bar
} However, struct T2 {
T3 foo2,
bytes bar2
}
struct T3 {
bytes32 aa,
address bb,
uint256 cc,
uint64 dd
} Could anyone give me a how-to encode this kind of struct with viem in .js before writing to the contract? |
Beta Was this translation helpful? Give feedback.
Answered by
Asaki-Katsu
Dec 25, 2023
Replies: 1 comment 3 replies
-
Can you share some code of what you tried already? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I did solve it, I just simply ignore the 2nd struct like this