Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More

@polymarket/ctf-utils

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polymarket/ctf-utils

Utilities for handling CTF ERC1155 positions

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
10
Created

Utility to calculate CTF ERC1155 token IDs

import { calculatePositionId } from "@polymarket/ctf-utils";

const conditionId = "0xbd31dc8a20211944f6b70f31557f1001557b59905b7738480ca09bd4532f84af";
const collateral = "0x2E8DCfE708D44ae2e406a1c02DFE2Fa13012f961";
const outcomeSlotCount = 2;
const outcomeIndex = 0;

// 1343197538147866997676250008839231694243646439454152539053893078719042421992
const positionId = calculatePositionId(conditionId, collateral, outcomeSlotCount, outcomeIndex);

FAQs

Package last updated on 18 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts