NineLivesFactory
Inherits: IEvents, INineLivesFactory
Constants
BEACON_ADDR
address immutable BEACON_ADDR
DPPM_HOUR_CREATOR_ADDR
address immutable DPPM_HOUR_CREATOR_ADDR
DPPM_15_MIN_CREATOR_ADDR
address immutable DPPM_15_MIN_CREATOR_ADDR
DPPM_5_MIN_CREATOR_ADDR
address immutable DPPM_5_MIN_CREATOR_ADDR
ORACLE_ADDR
address immutable ORACLE_ADDR
VAULT_ADDR
INineLivesVault immutable VAULT_ADDR
SHARE_IMPL_ADDR
address immutable SHARE_IMPL_ADDR
State Variables
version
uint8 public version
operator
address public operator
enabled
bool public enabled
shouldTakeModFee
bool public shouldTakeModFee
tradingOwners
mapping(address => address) public tradingOwners
tradingAddresses
mapping(bytes32 => address) public tradingAddresses
tradingBackends
mapping(address => uint8) public tradingBackends
daoClaimable
uint256 public daoClaimable
Functions
constructor
constructor(
address beaconAddr,
address dppmHourCreatorAddr,
address dppm15MinCreatorAddr,
address dppm5MinCreatorAddr,
address oracleAddr,
address vaultAddr,
address shareImplAddr
) ;
ctor
function ctor(address _operator) external;
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
| Name | Type | Description |
|---|---|---|
addr | address | is 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 view returns (address);
dppmTradingHash
return the keccak256 hash of the trading contract in DPPM form.
function dppmTradingHash() 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);
createTradingId
function createTradingId(bytes8[] memory outcomes) internal pure returns (bytes32);
createErc20Id
function createErc20Id(address tradingAddr, bytes8 outcomeId) internal pure returns (bytes32);
makeBeaconSelProxySel
function makeBeaconSelProxySel(bytes4 sel, address beacon) internal pure returns (bytes memory);
deployTrading
function deployTrading(bool isDppm, bytes32 seed) internal returns (INineLivesTrading);
deployErc20
function deployErc20(address implAddr, bytes32 id) internal returns (IShare);
newTrading37E9F4BE
set up new trading contract, seeding the initial amounts
function newTrading37E9F4BE(
FactoryOutcome[] memory factoryOutcomes,
address oracle,
uint64 timeStart,
uint64 timeEnding,
bytes32,
/* documentation */
address feeRecipient,
uint64 feeCreator,
uint64 feeLp,
uint64 feeMinter,
uint64 feeReferrer,
bool backendIsDppm,
uint256 seedLiq
) external returns (INineLivesTrading trading);
Parameters
| Name | Type | Description |
|---|---|---|
factoryOutcomes | FactoryOutcome[] | |
oracle | address | to 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. |
timeStart | uint64 | to begin this contract at. This should be in the future. |
timeEnding | uint64 | to end this contract at. This should be in the future. |
<none> | bytes32 | |
feeRecipient | address | to send fees earned from the creator commission to. |
feeCreator | uint64 | pct to take as fees for the creator given. |
feeLp | uint64 | pct to take as fees for LPs who use the add/remove liquidity features. |
feeMinter | uint64 | pct to take as fees for users using the mint function. |
feeReferrer | uint64 | |
backendIsDppm | bool | |
seedLiq | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
trading | INineLivesTrading | tradingAddr address of the newly created Trading contract deployment. |
disableShares
function disableShares(bytes8[] calldata) external;