Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

INineLivesFactory

Git Source

Functions

newTrading320E32E9

set up new trading contract, seeding the initial amounts

function newTrading320E32E9(
    FactoryOutcome[] memory outcomes,
    address oracle,
    uint64 timeStart,
    uint64 timeEnding,
    bytes32 documentation,
    address feeRecipient,
    uint64 feeCreator,
    uint64 feeLp,
    uint64 feeMinter,
    uint64 feeReferrer
) external returns (address tradingAddr);

Parameters

NameTypeDescription
outcomesFactoryOutcome[]to set up as the default
oracleaddressto use as the provider. If set to 0, then a beauty contest is taking place, and when an oracle resolves it checks its own invested state to determine the winner. If set to the address of the infra market oracle as set up during the initialisation of the proxy contract, then an infrastructure market is taking place. If set to anything else, then a contract interaction is assumed being active (or, an AI resolver, depending on the circumstances). If the infrastructure market was chosen, then the code calls the Infrastructure Market to create a new market there with its own creation time.
timeStartuint64to begin this contract at. This should be in the future.
timeEndinguint64to end this contract at. This should be in the future.
documentationbytes32keccak'd hash of the information that makes up the description for infrastructure markets. This is sent out there.
feeRecipientaddressto send fees earned from the creator commission to.
feeCreatoruint64pct to take as fees for the creator given.
feeLpuint64pct to take as fees for LPs who use the add/remove liquidity features.
feeMinteruint64pct to take as fees for users using the mint function.
feeReferreruint64

Returns

NameTypeDescription
tradingAddraddressaddress of the newly created Trading contract deployment.

isModerationFeeEnabled

is the current fee that's taken for moderation reasons active?

function isModerationFeeEnabled() external view returns (bool);

getOwner

gets the owner address from the trading contract address

function getOwner(address addr) external view returns (address);

Parameters

NameTypeDescription
addraddressis trading address to get the owner

getBackend

function getBackend(address addr) external view returns (uint8);

getTradingAddr

function getTradingAddr(bytes32 id) external view returns (address);

shareImpl

function shareImpl() external pure returns (address);

dpmTradingHash

return the keccak256 hash of the trading contract in DPM form.

function dpmTradingHash() external view returns (bytes32);

ammTradingHash

return the keccak256 hash of the trading contract in AMM form.

function ammTradingHash() external view returns (bytes32);

erc20Hash

return the keccak256 hash of the ERC20

function erc20Hash() external view returns (bytes32);