
Full-stack Web Developer | Maker Tweets are mostly about web-dev, web3, and #buildinpublic. Also books, coffee, and running. Currently building @spottidApp
- Tweets249
- Following496
- Followers197
- Likes7.3K
![The code from the image: import {ListBinaryCodec} from "@multiversx/sdk-core/out/smartcontracts/codec/list"; import {BinaryCodec, List, ListType, Type, U64Type} from "@multiversx/sdk-core/out"; const decodeBase64List = (encodedStr: string, paramType: Type): List => { const buffer = Buffer.from(encodedStr, 'base64') const codec = new ListBinaryCodec(new BinaryCodec()) return codec.decodeTopLevel(buffer, new ListType(paramType)) } // E.g. Base64 encoded "List<u64>" const result = decodeBase64List('AAAAAAAAAAoAAAAAAAAACw==', new U64Type()) const numArr = result.getItems().map((item) => item.valueOf().toNumber()) console.log(numArr) // Shows [ 10, 11 ]](https://pbs.twimg.com/media/FnfdJb7WAAE6RQj.jpg?name=small&format=webp)
ALT The code from the image: import {ListBinaryCodec} from "@multiversx/sdk-core/out/smartcontracts/codec/list"; import {BinaryCodec, List, ListType, Type, U64Type} from "@multiversx/sdk-core/out"; const decodeBase64List = (encodedStr: string, paramType: Type): List => { const buffer = Buffer.from(encodedStr, 'base64') const codec = new ListBinaryCodec(new BinaryCodec()) return codec.decodeTopLevel(buffer, new ListType(paramType)) } // E.g. Base64 encoded "List<u64>" const result = decodeBase64List('AAAAAAAAAAoAAAAAAAAACw==', new U64Type()) const numArr = result.getItems().map((item) => item.valueOf().toNumber()) console.log(numArr) // Shows [ 10, 11 ]









