Skip to content

I'm finding to way to encode parameter using viem before writing to contract. #1616

Discussion options

You must be logged in to vote

Hi, I did solve it, I just simply ignore the 2nd struct like this

const encoded = encodeAbiParameters(
        parseAbiParameters('bytes32 aa, address bb, uint256 cc, uint64 dd, bytes bar2'),
        [
          data1,
          data2,
          data3,
          data4,
          data5,
        ],
      )

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Asaki-Katsu
Comment options

Answer selected by Asaki-Katsu
@Asaki-Katsu
Comment options

@Asaki-Katsu
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants