Socket
Book a DemoInstallSign in
Socket

@polymarket/uma-binary-adapter-sdk

Package Overview
Dependencies
Maintainers
12
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polymarket/uma-binary-adapter-sdk

SDK for the UMA Binary Adapter

latest
npmnpm
Version
1.2.4
Version published
Weekly downloads
7
-94.12%
Maintainers
12
Weekly downloads
 
Created
Source

Polymarket UMA CTF Adapter SDK

NPM

This SDK is a lightweight wrapper around the UmaConditionalTokensBinaryAdapter contract.

Usage

import { UmaBinaryAdapterClient } from "@polymarket/uma-binary-adapter-sdk";
const signer = new Wallet("0x" + process.env.KEY);
const adapter = new UmaBinaryAdapterClient(signer, 137);

// Initialize question
await adapter.initializeQuestion(
    questionID, 
    title, 
    description,
    outcomes, 
    resolutionTime, 
    rewardToken, 
    reward, 
    proposalBond, 
    { gasPrice: ethers.utils.parseUnits("100", 9) }
);

// Request resolution data
await adapter.requestResolutionData(questionID);

// Settle
await adapter.settle(questionID);

// View expected payout vector
await adapter.getExpectedPayouts(questionID);

//Report payouts
await adapter.reportPayouts(questionID);

Keywords

blockchain

FAQs

Package last updated on 26 Oct 2022

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