Scry Protocol
  • Introduction
  • Morpheus
    • Morpheus
    • Build Your Own Oracle
    • Contract Use and Request Feeds
      • VRF
      • Crosschain Data
      • Jury - Human Defined Questions
    • Sample Templates for Contracts
    • MetaMorph: A Decentralized Oracle Tool
    • VRF Hash RanCh
    • Deployments and Oracles Available
    • Veryfi - cross-chain asset verification
  • Vain
    • Deep dive
  • Scry Token and Staking $SCRY
    • The $SCRY Token: A New Age in Oracle Collateralization and Decentralization
    • Staking
    • Distribution
  • Open Oracle Framework
    • Subscription Based Models
    • Data Feeds for Historical Tracking
    • Time Weighted Average Price using OOF
    • Feed Requests
    • Oracle Spreadsheet Management and Creation
    • Oracle Creation
    • Oracle Management
    • Front End
    • Solidity Contracts and Interface
    • OpenOracleFramework.sol
    • OOFFactory.sol
    • Deployments
  • SMART CONTRACTS
    • Smart Contracts
  • Links
    • Links
    • Deprecated
      • Purchasing a License
      • Licensing and Perks
      • Scry NFT
Powered by GitBook
On this page
  1. Open Oracle Framework

OOFFactory.sol

This contract is used to generate new Open Oracle Framework Contracts.

oofMint

function oofMint(
    address[] memory signers_,
    uint256 signerThreshold_,
    address payable payoutAddress_,
    uint256 subscriptionPassPrice_
)
external
returns(address oof)

�This function generates a new OOF contract with the values provided by cloning an existing Implementation of OOF to save gas and then calling the initialize function with the values provided as the arguments.

The contract also has the functions to change the ownership, update the Implementation address and the router address.

    /**
     * @dev gets the address of the current factory owner
     *
     * @return the address of the conjure router
    */
    function getConjureRouter() external view returns (address payable) {
        return conjureRouter;
    }

    /**
     * @dev lets the owner change the current conjure implementation
     *
     * @param oofImplementation_ the address of the new implementation
    */
    function newOOFImplementation(address oofImplementation_) external {
        require(msg.sender == factoryOwner, "Only factory owner");
        require(oofImplementation_ != address(0), "No zero address for oofImplementation_");

        oofImplementation = oofImplementation_;
        emit NewOOFImplementation(oofImplementation);
    }

    /**
     * @dev lets the owner change the current conjure router
     *
     * @param conjureRouter_ the address of the new router
    */
    function newConjureRouter(address payable conjureRouter_) external {
        require(msg.sender == factoryOwner, "Only factory owner");
        require(conjureRouter_ != address(0), "No zero address for conjureRouter_");

        conjureRouter = conjureRouter_;
        emit NewConjureRouter(conjureRouter);
    }

    /**
     * @dev lets the owner change the ownership to another address
     *
     * @param newOwner the address of the new owner
    */
    function newFactoryOwner(address payable newOwner) external {
        require(msg.sender == factoryOwner, "Only factory owner");
        require(newOwner != address(0), "No zero address for newOwner");

        factoryOwner = newOwner;
        emit FactoryOwnerChanged(factoryOwner);
    }

    /**
     * receive function to receive funds
    */
    receive() external payable {}
}

interface IOOF {
    function initialize(
        address[] memory signers_,
        uint256 signerThreshold_,
        address payable payoutAddress_,
        uint256 subscriptionPassPrice_,
        address factoryContract_
    ) external;
}

�

PreviousOpenOracleFramework.solNextDeployments

Last updated 3 years ago