This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function buy(address _reserveToken, uint256 _depositAmount, uint256 _minimumValue) public returns (uint256 value) { | |
uint8 reserveRatio = reserveRatioOf[_reserveToken]; | |
if (reserveRatio == 0 || _depositAmount == 0) // validate input | |
throw; | |
if (stage != Stage.Traded) // validate state | |
throw; | |
ReserveToken reserveToken = ReserveToken(_reserveToken); | |
uint256 reserveBalance = reserveToken.balanceOf(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function BancorToken(string _name, string _symbol, uint8 _numDecimalUnits, address _formula, address _events) { | |
if (bytes(_name).length == 0 || bytes(_symbol).length < 1 || bytes(_symbol).length > 6 || _formula == 0x0) // validate input | |
throw; | |
name = _name; | |
symbol = _symbol; | |
numDecimalUnits = _numDecimalUnits; | |
formula = _formula; | |
events = _events; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Default Single | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
if ( have_posts() ) : | |
while ( have_posts() ) : the_post(); ?> | |
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | |
<?php if ( $image_url = Pojo_Thumbnails::get_post_thumbnail_url( array( 'width' => '940', 'height' => '300' ) ) ) : ?> | |
<img src="<?php echo $image_url; ?>" alt="<?php echo esc_attr( get_the_title() ); ?>" class="media-object" /> |