encoding.ts

The code imports the ethers library and two custom types, then defines three functions. The first function, encodeValues, encodes an array of types and an array of values into a string. The second function, encodeFunction, encodes function data from an ABI, a function name, and an array of function arguments. The getNonce function returns a random string of numbers of a specified length.

Functions

  • encodeValues
  • encodeFunction
  • getNonce