🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@polymarket/ctf-utils

Package Overview
Dependencies
Maintainers
10
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polymarket/ctf-utils

Utilities for handling CTF ERC1155 positions

latest
npmnpm
Version
1.0.1
Version published
Weekly downloads
14
-74.07%
Maintainers
10
Weekly downloads
 
Created
Source

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);

Keywords

blockchain

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