Closed formingform closed 8 months ago
ex_abi version is 0.6.4 or 0.7.0
AFAIK there is no bytes64
type. For byte arrays larger than 32 bytes, just use :bytes
(dynamic sized byte array).
For your example:
raw_data = "00000000000000000000000097ab3d4f7f5051f127b0e9f8d10772125d94d65b0000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000407c278b7e4320528bdbf5c02db611282b431dbaec2509b1fbebe3de4be7442a4114f1c9970ffd0c589afa8ef6262692efd4edae5d77c87641f21f44b1d082c3480000000000000000000000000000000000000000000000000000000000000030b969678ef2cf458b49b8c568d95e63221efe0f30383a9b0c5eb683bf2e23d118664631ce992d81ec4b6127ec0a760f8600000000000000000000000000000000"
data_bytes = Base.decode16!(raw_data , case: :mixed)
[owner, rate, pub_key, bls_key] = TypeDecoder.decode_raw(data_bytes, [:address, {:uint, 256}, :bytes, :bytes])
It worked. Thank you very much!
great!
to docode the log data,
and get this error message, pub_key size is 64 bytes and bls_key size is 48 bytes.