# ForeMarkets (Factory)

### INIT\_CODE\_PAIR\_HASH

Returns init creation code, eeded to calculate market address

### market

Returns market address for hash(bytes32)

### isForeMarket

Returns true if address is Fore Market

### allMarkets

Returns market address of index&#x20;

### tokenURI

Returns token uri for existing token

| Input/Output | Data Type | Variable Name | Comment   |
| ------------ | --------- | ------------- | --------- |
| input        | uint256   | tokenId       |           |
| output       | string    | N/A           | token uri |

### isForeOperator

*ForeOperators: ForeMarkets(as factory), ForeMarket contracts and marketplace*

Returns true if Address is ForeOperator

| Input/Output | Data Type | Variable Name | Comment                         |
| ------------ | --------- | ------------- | ------------------------------- |
| input        | address   | addr          |                                 |
| output       | bool      | N/A           | true if Address is ForeOperator |

### allMarketLength

Returns length of all markets array

| Input/Output | Data Type | Variable Name | Comment                     |
| ------------ | --------- | ------------- | --------------------------- |
| output       | uint256   | N/A           | length of all markets array |

### mintVerifier

Mints Verifier Nft (ForeVerifier)

| Input/Output | Data Type | Variable Name | Comment          |
| ------------ | --------- | ------------- | ---------------- |
| input        | address   | receiver      | receiver address |

### buyPower

Buys additional power (ForeVerifier)

| Input/Output | Data Type | Variable Name | Comment       |
| ------------ | --------- | ------------- | ------------- |
| input        | uint256   | id            | token id      |
| input        | uint256   | amount        | amount to buy |

### createMarket

Creates Market

| Input/Output | Data Type | Variable Name            | Comment                          |
| ------------ | --------- | ------------------------ | -------------------------------- |
| input        | bytes32   | marketHash               | 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   |
| output       | address   | createdMarket            | Address of created market        |

### isApprovedForAll

*Allow tokens to be used by market contracts*

| Input/Output | Data Type | Variable Name | Comment                     |
| ------------ | --------- | ------------- | --------------------------- |
| input        | address   | owner         |                             |
| input        | address   | operator      |                             |
| output       | bool      | N/A           | true if address is operator |
