2

For example, I want to call a create market function from augur in my contract. I'm using the recommended pattern, but there are additional contracts that this function brings in, ex ICash, IMarket and afterInitialized modifier.

Is there a simpler way besides importing every single dependent contract?

pragma solidity ^0.4.25;

contract Augur {
     function createYesNoMarket(uint256 _endTime, uint256 _feePerEthInWei, ICash _denominationToken, address _designatedReporterAddress, bytes32 _topic, string _description, string _extraInfo) public afterInitialized payable returns (IMarket _newMarket);
}

contract AugurWrapper {
    Augur universe;
    constructor(address _address) public {
        universe = Augur(_address);
    }
    function myCreateMarket(uint256 _endTime, uint256 _feePerEthInWei, ICash _denominationToken, address _designatedReporterAddress, bytes32 _topic, string _description, string _extraInfo) public {
        return universe.createYesNoMarket(_endTime,_feePerEthInWei,_denominationToken,_designatedReporterAddress, _topic, _description, _extraInfo);
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.