INineLivesTrading
Functions
ctor
ctor to set the values for this contract.
function ctor(
bytes8[] memory outcomes,
address oracle,
uint256 timeStart,
uint256 timeEnding,
address feeRecipient,
address shareImpl,
bool shouldBufferTime
) external;
Parameters
Name | Type | Description |
---|---|---|
outcomes | bytes8[] | to use to use as betting outcomes in this contract. |
oracle | address | to use as the resolver for this contract. |
timeStart | uint256 | to begin this contract by. |
timeEnding | uint256 | to end this contract by. |
feeRecipient | address | to send fees earned from trading. |
shareImpl | address | |
shouldBufferTime | bool | to extend time by 3 hours for every purchase within a 3 hour window. If this is enabled, the contract will enforce purchases to exceed $10 if they are taking place within 3 hours of the contract's scheduled end time. |
mintPermitE90275AB
Mint some shares in exchange for fUSDC. Optionally branches to permit or a classic approval based on the deadline argument (if set to 0, assumes approval)
function mintPermitE90275AB(
bytes8 outcome,
uint256 value,
address recipient,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256);
quoteC0E17FC7
Quote function for testing the amount that could be minted.
function quoteC0E17FC7(bytes8 outcome, uint256 value) external returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
outcome | bytes8 | to test for |
value | uint256 | to test spending for |
priceA827ED27
Get the price of an outcome in fUSDC.
function priceA827ED27(bytes8 outcome) external returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
outcome | bytes8 | to test for |
shutdown
Shutdown this contract by disabling associated pools. Compensates callers of this function by distributing them a small amount of token for doing so. This can only be called when the contract has exceeded its deadline.
function shutdown() external returns (uint256);
decide
Decide an outcome. Only callable by the oracle!
function decide(bytes8 outcome) external;
Parameters
Name | Type | Description |
---|---|---|
outcome | bytes8 | to set as the winner. |
payoff91FA8C2E
Collect the payoff if holding winning shares!
function payoff91FA8C2E(bytes8 outcomeId, uint256 amount, address recipient) external returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
outcomeId | bytes8 | to collect the payoff for. |
amount | uint256 | of share to use for receiving the payoff. |
recipient | address | to send the winnings to. |
details
Details that're available for this outcome.
function details(bytes8 outcomeId)
external
view
returns (uint256 shares, uint256 invested, uint256 globalInvested, bytes8 winner);
Parameters
Name | Type | Description |
---|---|---|
outcomeId | bytes8 | to get the details for |
isDpm
is this trading contract running the DPM?
function isDpm() external view returns (bool);
globalShares
global shares minted.
function globalShares() external view returns (uint256);
invested
Invested amount of fusdc in the betting pool.
function invested() external view returns (uint256);
shareAddr
get a share address using the identifier given instead of an online check.
function shareAddr(bytes8 outcomeId) external view returns (address);