Skip to content

Instantly share code, notes, and snippets.

View HCharlanes's full-sized avatar

Hadrien HCharlanes

View GitHub Profile
/// @title Stablecoin Token API. Extension of the Token standard (https://github.com/ethereum/EIPs/issues/20)
/// @author Hadrien Charlanes - <hadrien.charlanes@consensys.net>
contract StablecoinTokenAPI {
/// @dev Getters of the conversion rates between USDcents and Wei
function getUSDcentstoWEIPrice(uint amountInUSDCents) constant returns (uint purchasePricesInWei);
function getWEItoUSDCentsPrice(uint amountinWei) constant returns (uint purchasePriceinUSDCents);
///@dev Return if a convertion ETH -> USD will be successful
///@param amountInWei WEI amount willing to be converted
import "StablecoinTokenAPI.sol";
/// @title Simple bet contract using USD Stablecoins.
/// @author Hadrien Charlanes - <hadrien.charlanes@consensys.net>
contract USDPool {
//Address of the private stablecoin Contract previously ordered by the SimpleBet dapp.
address public stablecoinLicensedAddress;
//Private Stablecoin service Contract Instance.
StablecoinTokenAPI public licensedStablecoin;