Documentation
  • PROTOCOL
    • About
    • Glossary
    • Protocol Roles
      • Creators
        • Creator NFT (mNFT)
      • Players
      • Analysts
        • Analyst NFT (vNFT)
      • Dispute Resolution
        • High Guard
    • FORE Markets
      • Market Types
      • Payout Logic
      • Protocol Rewards
    • Market Phases
      • Creation Phase
      • Participation Phase
      • Validation Phase
      • Dispute Phase
      • Resolution Phase
    • Protocol Rewards
      • Player Rewards
      • Infrastructure Rewards
      • NFT Tiers
    • NFT Marketplace
    • Config
      • Protocol Config
      • Market Config
  • DEVELOPERS
    • Addresses and Config
    • Smart Contracts
      • ForeMarkets (Factory)
      • ForeMarket
      • ProtocolConfig
      • MarketConfig
      • ForeAnalysts
      • ForeToken
    • IPFS
      • Verifier NFT Metadata Format
      • Market NFT Metadata Format
      • Market Object Format
      • Base58 <->Bytes32
Powered by GitBook
On this page
  • factory
  • marketConfig
  • market
  • privilegeNft
  • dispute
  • verifications
  • predictionsA
  • predictionsB
  • verificationHeigth
  • initialize
  • predict
  • stakeForPrivilege
  • maxAmountToVerifyForSide
  • verify
  • openDispute
  • resolveDispute
  • closeMarket
  • calculatePredictionReward
  • withdrawPredictionReward
  • withdrawVerificationReward
  • marketCreatorFeeWithdraw
  1. DEVELOPERS
  2. Smart Contracts

ForeMarket

factory

Returns address of factory contract

marketConfig

Returns address of market config contract

market

Returns market info

Input/Output
Data Type
Variable Name
Comment

output

bytes32

N/A

marketHash

output

uint256

N/A

sideA

output

uint256

N/A

sideB

output

uint256

N/A

verifiedA

output

uint256

N/A

verifiedB

output

uint256

N/A

startPredictionTimestamp

output

uint256

N/A

endPredictionTimestamp

output

uint256

N/A

marketTokenId

output

ResultType

N/A

result

privilegeNft

Returns privlegeNft info

Input/Output
Data Type
Variable Name
Comment

output

address

N/A

privilegeNftStaker

output

uint256

N/A

privilegeNftId

output

bool

N/A

privilegeNftUsed

dispute

Returns Dispute info

Input/Output
Data Type
Variable Name
Comment

output

address

N/A

disputeCreator

output

bool

N/A

confirmed

output

bool

N/A

solved

verifications

Returns verification info for id

Input/Output
Data Type
Variable Name
Comment

input

uint256

N/A

id

output

address

N/A

verifier

output

uint256

N/A

power

output

uint256

N/A

tokenId

output

bool

N/A

side

output

bool

N/A

withdrawn

predictionsA

Returns prediction amount for side A for address

predictionsB

Returns prediction amount for side B for address

verificationHeigth

Verification array size

Input/Output
Data Type
Variable Name
Comment

output

uint256

N/A

Verification array lenght

initialize

Possible to call only via the factory

Initialization function

Input/Output
Data Type
Variable Name
Comment

input

bytes32

mHash

market hash

input

address

receiver

market creator nft receiver

input

uint256

amountA

initial prediction for side A

input

uint256

amountB

initial prediction for side B

input

uint256

startPredictionTimestamp

Start predictions unix timestamp

input

uint256

endPredictionTimestamp

End predictions unix timestamp

input

uint256

tokenId

market creator token id (ForeMarkets)

predict

Add new prediction

Input/Output
Data Type
Variable Name
Comment

input

uint256

amount

Amount of ForeToken

input

bool

side

Predicition side (true - positive result, false - negative result)

stakeForPrivilege

Stakes nft token for the privilege of being a verifier

Input/Output
Data Type
Variable Name
Comment

input

uint256

tokenId

ForeVerifiers nft id

maxAmountToVerifyForSide

Returns the maximum value(power) available for verification

Input/Output
Data Type
Variable Name
Comment

input

bool

side

Marketd side (true - positive / false - negative);

output

uint256

N/A

Maximum power

verify

Verifies the side with maximum available power

Input/Output
Data Type
Variable Name
Comment

input

uint256

tokenId

ForeVerifiers token id

input

bool

side

Marketd side (true - positive / false - negative);

openDispute

Opens a dispute, takes fee

resolveDispute

Only HighGuard

Resolves Dispute

Input/Output
Data Type
Variable Name
Comment

input

undefined

result

Result Type

closeMarket

Closes market

calculatePredictionReward

Returns full available amount to withdraw(Deposited fund + reward of winnings - Protocol fees)

Returns prediction reward in ForeToken

Input/Output
Data Type
Variable Name
Comment

input

address

predictor

Predictior address

output

uint256

N/A

Amount to withdraw

withdrawPredictionReward

Withdraw prediction rewards

Input/Output
Data Type
Variable Name
Comment

input

address

predictor

predictor address

withdrawVerificationReward

Verification id

Withdraw Verificator Reward

Input/Output
Data Type
Variable Name
Comment

input

uint256

verificationId

verification id

marketCreatorFeeWithdraw

Withdraws Market Creators Reward

PreviousForeMarkets (Factory)NextProtocolConfig

Last updated 2 years ago