1.0.7 • Published 9 months ago

@epoch-protocol/encoded-data-manipulation-lib v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

Encoded Data Manipulation Library

This library is simply written to perform various operations that may be needed to perform on ABI encoed bytes calldata. This library can be used for things like on-chain chain watchers.

Note: This is not Audited yet so use it only if you understand what you are doing.

To Install

Hardhat or truffle

yarn add @epoch-protocol/encoded-data-manipulation-lib
or
npm install @epoch-protocol/encoded-data-manipulation-lib
import "@epoch-protocol/encoded-data-manipulation-lib/src/ByteManipulationLibrary.sol";

Foundry

forge install epochprotocol/encoded-data-manipulation-lib

Usage

You can use this library to do the following things:

  • Get fixed sized data like address, uint, bytes32 from a given position(like 4th argument of the encoding).
  • Get dynamic sized data like string or bytes from a given position.
  • Get fixed sized arrays wit dynamic data like strings and bytes.
  • Get fixed sized array of fixed sized data like address, uint8, bytes32.
  • Get dynamic sized array for dynamic sized data like strings and bytes.
  • Overwrite a fixed position/ overwrite some static sized data with some other static sized data, given the correct position.
1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago