0.1.7 • Published 3 years ago

juicebox-metadata-helper v0.1.7

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Juicebox Metadata Helper Package

Install / Importing

Install with package manager npm i juicebox-metadata-helper

import {createMetadata} from "juicebox-metadata-helper";

Usage

  // Start building our data to add
  const types = ["address[]"];

  const testData = [
    [
      "0x6B175474E89094C44Da98b954EedeAC495271d0F",
      "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
    ],
  ];

  // Build our 4byte ID
  const id = ethers.utils.hexlify([1, 2, 3, 4]);

  // Encode metadata
  const testDataE = ethers.utils.defaultAbiCoder.encode(types, testData);

  // Create lookup table with our handy helper
  const res = createMetadata([id], [testDataE]);
0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago