Prediction Mkt Repo

PATH: C:\XFT\prediction-mkts\prod

COUNTERPARTIES contracts/XFTConditionalTokens.sol 0x786Bc48C7ef3E9AA811068Fb4b0eC0DC01028740arrow-up-right contracts/XFTPredictionMktFacility.sol

USDXT 0xC1BF9854E43b84f3abec5f5d1C72F0a6f602034barrow-up-right USDX 0x4F1D5c7221dB8F3F28b2F0398Aa2bc321b72C523arrow-up-right


HARDHAT PROJECT SETUP

npm init -y npm i -D hardhat @nomicfoundation/hardhat-toolbox dotenv npx hardhat --init

PS C:\XFT\prediction-mkts\prod> npx hardhat --init

 █████  █████                         ███  ███                  ███      ██████
░░███  ░░███                         ░███ ░███                 ░███     ███░░███
 ░███   ░███   ██████  ████████   ███████ ░███████    ██████  ███████  ░░░  ░███
 ░██████████  ░░░░░███░░███░░███ ███░░███ ░███░░███  ░░░░░███░░░███░      ████░
 ░███░░░░███   ███████ ░███ ░░░ ░███ ░███ ░███ ░███   ███████  ░███      ░░░░███
 ░███   ░███  ███░░███ ░███     ░███ ░███ ░███ ░███  ███░░███  ░███ ███ ███ ░███
 █████  █████░░███████ █████    ░░███████ ████ █████░░███████  ░░█████ ░░██████
░░░░░  ░░░░░  ░░░░░░░ ░░░░░      ░░░░░░░ ░░░░ ░░░░░  ░░░░░░░    ░░░░░   ░░░░░░

👷 Welcome to Hardhat v3.0.4 👷

√ Which version of Hardhat would you like to use? · hardhat-2
Where would you like to initialize the project?

Please provide either a relative or an absolute path: · .
√ What type of project would you like to initialize? · empty-hardhat-config-js
✨ Template files copied ✨
√ You need to update the following dependencies using the following command:
npm install --save-dev "hardhat@^2.14.0"

Do you want to run it now? (Y/n) · true

npm install --save-dev "hardhat@^2.14.0"

added 75 packages, removed 22 packages, changed 16 packages, and audited 593 packages in 8s

117 packages are looking for funding
  run `npm fund` for details

15 low severity vulnerabilities

To address issues that do not require attention, run:
  npm audit fix

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
✨ Dependencies updated ✨
Give Hardhat a star on Github if you're enjoying it! ⭐️✨

     https://github.com/NomicFoundation/hardhat
PS C:\XFT\prediction-mkts\prod>

mkdir scripts mkdir contracts cd contracts touch XFTConditionalTokens.sol npx hardhat clean npx hardhat compile


XFTConditionalTokens.sol

Path: contracts/XFTConditionalTokens.sol


Yes—deploy ConditionalTokens.sol as-is (0.5.x). Use it unchanged; wire your facility + oracle around it. Collateral: USDXT.

contracts /scripts/ contracts/ConditionalTokens.sol contracts/XFTPredictionMktFacility.sol contracts/XFTTrustedOracle.sol scripts/deploy-conditional-tokens.js scripts/deploy-xft-trusted-oracle.js scripts/deploy-xft-facility.js scripts/create-market.js

Hardhat setup

Build & deploy cmds

Notes (least words)

  • ConditionalTokens stays unmodified; it mints/burns positions and escrows USDXT via split/merge/redeem.

  • XFTPredictionMktFacility: wraps CT (depositAndMint, merge, redeem, lock, resolveFromOracle, withdrawFees).

  • XFTTrustedOracle: demo truth source; later swap to UMA adapter with same surface.

  • Ensure hardhat.config has a 0.5.13 compiler entry for CT (and another for 0.8.x if used).

Last updated