I'm building a contract function that purchases and distributes complete sets of AugurShares for a specific market. (Testing on Rinkeby).
Version of Augur-core (node_modules/augur) used: https://github.com/AugurProject/augur-core
pragma solidity >=0.4.20;
import "./../node_modules/augur/source/contracts/trading/CompleteSets.sol";
import "./../node_modules/augur/source/contracts/reporting/IMarket.sol";
contract BuyCompleteAugurSets {
CompleteSets completeSetsInstance
function BuyCompleteAugurSets(address _completeSetsAddress)
public
{
completeSetsInstance = CompleteSets(_completeSetsAddress);
}
function buyAugurShares (
IMarket _market
)
public
payable
{
uint256 amount = 10 ** 14;
completeSetsInstance.publicBuyCompleteSets.value(1 ether)(_market, amount);
}
}
I call this function through Truffle:
var res = await contract.buyAugurShares(MARKET_ADDRESS, {value: toWei("1", "ether")});
I double checked and the market is valid. I am able to purchase the complete sets for the given market through Augur.js but I should be able to also purchase these complete sets through a contract function aimed at the CompeleteSets.sol contract. Any clue what might be going wrong?
Failing transactions: https://rinkeby.etherscan.io/address/0x824a064503ba92d54c6e498c0bab6413854fbd6f
fillAugurOrders
. 2. What do you meando the same through the contracts
? (since your solidity code doesn't seem to share anything in common with your JS code).invalid address
.do the same through the contracts
any clearer. What are you trying to do that works for you in one place but not in the other place? Please show a piece of code for each case.