0.1.7 • Published 2 years ago

juicebox-metadata-helper v0.1.7

Weekly downloads
-
License
ISC
Repository
-
Last release
2 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

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago