Created
December 13, 2017 13:09
Star
You must be signed in to star a gist
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.19+commit.c4cbbb05.js&optimize=undefined&gist=
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
pragma solidity ^0.4.18; | |
contract Sample { | |
uint256 public minvaltoken =5; | |
uint256 public mintokendenomination =10; | |
function() payable { | |
var value= (msg.value); | |
var reqfraction= (1 ether * minvaltoken) / mintokendenomination; | |
if(value < reqfraction) { | |
revert(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment