Source Code
Latest 25 from a total of 124 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Perform_withdraw | 4800410 | 2991 days ago | IN | 0 ETH | 0.00110808 | ||||
| Perform_withdraw | 4750796 | 3000 days ago | IN | 0 ETH | 0.00110808 | ||||
| Perform_withdraw | 4750666 | 3000 days ago | IN | 0 ETH | 0.00050952 | ||||
| Perform_withdraw | 4745314 | 3001 days ago | IN | 0 ETH | 0.00052766 | ||||
| Perform_withdraw | 4740973 | 3002 days ago | IN | 0 ETH | 0.00052766 | ||||
| Perform_withdraw | 4740952 | 3002 days ago | IN | 0 ETH | 0.00052766 | ||||
| Perform_withdraw | 4740412 | 3002 days ago | IN | 0 ETH | 0.00110808 | ||||
| Perform_withdraw | 4739384 | 3002 days ago | IN | 0 ETH | 0.00110808 | ||||
| Perform_withdraw | 4739358 | 3002 days ago | IN | 0 ETH | 0.00050952 | ||||
| Perform_withdraw | 4738485 | 3002 days ago | IN | 0 ETH | 0.00110808 | ||||
| Perform_withdraw | 4737712 | 3002 days ago | IN | 0 ETH | 0.00034297 | ||||
| Perform_withdraw | 4737595 | 3002 days ago | IN | 0 ETH | 0.00026383 | ||||
| Perform_withdraw | 4737140 | 3002 days ago | IN | 0 ETH | 0.00290213 | ||||
| Perform_withdraw | 4736542 | 3002 days ago | IN | 0 ETH | 0.00110808 | ||||
| Perform_withdraw | 4736536 | 3002 days ago | IN | 0 ETH | 0.00110808 | ||||
| Perform_withdraw | 4735674 | 3003 days ago | IN | 0 ETH | 0.00153021 | ||||
| Perform_withdraw | 4732237 | 3003 days ago | IN | 0 ETH | 0.00316596 | ||||
| Perform_withdraw | 4731636 | 3003 days ago | IN | 0 ETH | 0.00110808 | ||||
| Perform_withdraw | 4729876 | 3004 days ago | IN | 0 ETH | 0.00052766 | ||||
| Perform_withdraw | 4729740 | 3004 days ago | IN | 0 ETH | 0.00024263 | ||||
| Perform_withdraw | 4728924 | 3004 days ago | IN | 0 ETH | 0.00151064 | ||||
| Perform_withdraw | 4728853 | 3004 days ago | IN | 0 ETH | 0.00052766 | ||||
| Perform_withdraw | 4728234 | 3004 days ago | IN | 0 ETH | 0.00089702 | ||||
| Perform_withdraw | 4728080 | 3004 days ago | IN | 0 ETH | 0.00110808 | ||||
| Perform_withdraw | 4727260 | 3004 days ago | IN | 0 ETH | 0.00168851 |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
BuyerFund
Compiler Version
v0.4.17+commit.bdeb9e52
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2017-10-08
*/
// ERC20 Interface: https://github.com/ethereum/EIPs/issues/20
contract ERC20 {
function transfer(address _to, uint256 _value) returns (bool success);
function balanceOf(address _owner) constant returns (uint256 balance);
}
contract BuyerFund {
// Store the amount of ETH deposited by each account.
mapping (address => uint256) public balances;
// Track whether the contract has bought the tokens yet.
bool public bought_tokens;
// Whether contract is enabled.
bool public contract_enabled;
// Record ETH value of tokens currently held by contract.
uint256 public contract_eth_value;
// The minimum amount of ETH that must be deposited before the buy-in can be performed.
uint256 constant public min_required_amount = 100 ether;
// The maximum amount of ETH that can be deposited into the contract.
uint256 public max_raised_amount = 300 ether;
// The first block after which a refund is allowed. Set in the contract constructor.
uint256 public min_refund_block;
// The crowdsale address.
address constant public sale = 0x09AE9886C971279E771030aD5Da37f227fb1e7f9;
// Constructor.
function BuyerFund() {
// Minimum block for refund - roughly a week from now, in case of rejected payment.
min_refund_block = 4362646;
}
// Allows any user to withdraw his tokens.
// Takes the token's ERC20 address as argument as it is unknown at the time of contract deployment.
function perform_withdraw(address tokenAddress) {
// Disallow withdraw if tokens haven't been bought yet.
if (!bought_tokens) throw;
// Retrieve current token balance of contract.
ERC20 token = ERC20(tokenAddress);
uint256 contract_token_balance = token.balanceOf(address(this));
// Disallow token withdrawals if there are no tokens to withdraw.
if (contract_token_balance == 0) throw;
// Store the user's token balance in a temporary variable.
uint256 tokens_to_withdraw = (balances[msg.sender] * contract_token_balance) / contract_eth_value;
// Update the value of tokens currently held by the contract.
contract_eth_value -= balances[msg.sender];
// Update the user's balance prior to sending to prevent recursive call.
balances[msg.sender] = 0;
// Send the funds. Throws on failure to prevent loss of funds.
if(!token.transfer(msg.sender, tokens_to_withdraw)) throw;
}
// Allows any user to get his eth refunded before the purchase is made or after approx. 20 days in case the devs refund the eth.
function refund_me() {
if (bought_tokens) {
// Only allow refunds when the tokens have been bought if the minimum refund block has been reached.
if (block.number < min_refund_block) throw;
}
// Store the user's balance prior to withdrawal in a temporary variable.
uint256 eth_to_withdraw = balances[msg.sender];
// Update the user's balance prior to sending ETH to prevent recursive call.
balances[msg.sender] = 0;
// Return the user's funds. Throws on failure to prevent loss of funds.
msg.sender.transfer(eth_to_withdraw);
}
// Buy the tokens. Sends ETH to the presale wallet and records the ETH amount held in the contract.
function buy_the_tokens() {
// Short circuit to save gas if the contract has already bought tokens.
if (msg.sender == 0xC68bb418ee2B566E4a3786F0fA838aEa85aE1186) {
if (bought_tokens) return;
// Throw if the contract balance is less than the minimum required amount
if (this.balance < min_required_amount) throw;
// Record that the contract has bought the tokens.
bought_tokens = true;
// Record the amount of ETH sent as the contract's current value.
contract_eth_value = this.balance;
// Transfer all the funds to the crowdsale address.
sale.transfer(contract_eth_value);
}
}
// Raise total cap.
function upgrade_cap() {
if (msg.sender == 0xC68bb418ee2B566E4a3786F0fA838aEa85aE1186) {
max_raised_amount = 500 ether;
}
}
// A helper function for the default function, allowing contracts to interact.
function default_helper() payable {
// Only allow deposits if the contract hasn't already purchased the tokens.
require(!bought_tokens);
// Requires contract creator to enable contract.
require(contract_enabled);
// Require balance to be less than cap.
require(this.balance < max_raised_amount);
// Update records of deposited ETH to include the received amount.
balances[msg.sender] += msg.value;
}
function enable_sale(){
if (msg.sender == 0xC68bb418ee2B566E4a3786F0fA838aEa85aE1186) {
contract_enabled = true;
}
}
// Default function. Called when a user sends ETH to the contract.
function () payable {
// Delegate to the helper function.
default_helper();
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":false,"inputs":[],"name":"enable_sale","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balances","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"buy_the_tokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"min_required_amount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"default_helper","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"bought_tokens","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"sale","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"refund_me","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"contract_eth_value","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"upgrade_cap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"min_refund_block","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"max_raised_amount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"contract_enabled","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"tokenAddress","type":"address"}],"name":"perform_withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"}]Contract Creation Code
6060604052681043561a8829300000600355341561001c57600080fd5b624291966004819055506109d4806100356000396000f300606060405236156100ce576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806301ebd36b146100d857806327e235e3146100ed57806328b8e9cf1461013a5780632a2fbd4b1461014f5780635259347d146101785780636360fc3f146101825780636ad1fe02146101af57806381702c3414610204578063c42bb1e414610219578063c7ccc55914610242578063cc74e2ca14610257578063dd9e7b1b14610280578063ea083b86146102a9578063fcfdbc23146102d6575b6100d661030f565b005b34156100e357600080fd5b6100eb6103ba565b005b34156100f857600080fd5b610124600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061041f565b6040518082815260200191505060405180910390f35b341561014557600080fd5b61014d610437565b005b341561015a57600080fd5b610162610558565b6040518082815260200191505060405180910390f35b61018061030f565b005b341561018d57600080fd5b610195610565565b604051808215151515815260200191505060405180910390f35b34156101ba57600080fd5b6101c2610578565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561020f57600080fd5b610217610590565b005b341561022457600080fd5b61022c61067f565b6040518082815260200191505060405180910390f35b341561024d57600080fd5b610255610685565b005b341561026257600080fd5b61026a6106e0565b6040518082815260200191505060405180910390f35b341561028b57600080fd5b6102936106e6565b6040518082815260200191505060405180910390f35b34156102b457600080fd5b6102bc6106ec565b604051808215151515815260200191505060405180910390f35b34156102e157600080fd5b61030d600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106fe565b005b600160009054906101000a900460ff1615151561032b57600080fd5b6001809054906101000a900460ff16151561034557600080fd5b6003543073ffffffffffffffffffffffffffffffffffffffff163110151561036c57600080fd5b346000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550565b73c68bb418ee2b566e4a3786f0fa838aea85ae118673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561041d5760018060016101000a81548160ff0219169083151502179055505b565b60006020528060005260406000206000915090505481565b73c68bb418ee2b566e4a3786f0fa838aea85ae118673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561055557600160009054906101000a900460ff161561049957610556565b68056bc75e2d631000003073ffffffffffffffffffffffffffffffffffffffff163110156104c657600080fd5b60018060006101000a81548160ff0219169083151502179055503073ffffffffffffffffffffffffffffffffffffffff16316002819055507309ae9886c971279e771030ad5da37f227fb1e7f973ffffffffffffffffffffffffffffffffffffffff166108fc6002549081150290604051600060405180830381858888f19350505050151561055457600080fd5b5b5b565b68056bc75e2d6310000081565b600160009054906101000a900460ff1681565b7309ae9886c971279e771030ad5da37f227fb1e7f981565b6000600160009054906101000a900460ff16156105b7576004544310156105b657600080fd5b5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561067c57600080fd5b50565b60025481565b73c68bb418ee2b566e4a3786f0fa838aea85ae118673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156106de57681b1ae4d6e2ef5000006003819055505b565b60045481565b60035481565b6001809054906101000a900460ff1681565b6000806000600160009054906101000a900460ff16151561071e57600080fd5b8392508273ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15156107c457600080fd5b6102c65a03f115156107d557600080fd5b50505060405180519050915060008214156107ef57600080fd5b600254826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540281151561083c57fe5b0490506000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460026000828254039250508190555060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561097c57600080fd5b6102c65a03f1151561098d57600080fd5b5050506040518051905015156109a257600080fd5b505050505600a165627a7a72305820e6c0ff8de4520c9a5b9c25f5b335d7af2a95659733566548d1283e72c77f7b610029
Deployed Bytecode
0x606060405236156100ce576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806301ebd36b146100d857806327e235e3146100ed57806328b8e9cf1461013a5780632a2fbd4b1461014f5780635259347d146101785780636360fc3f146101825780636ad1fe02146101af57806381702c3414610204578063c42bb1e414610219578063c7ccc55914610242578063cc74e2ca14610257578063dd9e7b1b14610280578063ea083b86146102a9578063fcfdbc23146102d6575b6100d661030f565b005b34156100e357600080fd5b6100eb6103ba565b005b34156100f857600080fd5b610124600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061041f565b6040518082815260200191505060405180910390f35b341561014557600080fd5b61014d610437565b005b341561015a57600080fd5b610162610558565b6040518082815260200191505060405180910390f35b61018061030f565b005b341561018d57600080fd5b610195610565565b604051808215151515815260200191505060405180910390f35b34156101ba57600080fd5b6101c2610578565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561020f57600080fd5b610217610590565b005b341561022457600080fd5b61022c61067f565b6040518082815260200191505060405180910390f35b341561024d57600080fd5b610255610685565b005b341561026257600080fd5b61026a6106e0565b6040518082815260200191505060405180910390f35b341561028b57600080fd5b6102936106e6565b6040518082815260200191505060405180910390f35b34156102b457600080fd5b6102bc6106ec565b604051808215151515815260200191505060405180910390f35b34156102e157600080fd5b61030d600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106fe565b005b600160009054906101000a900460ff1615151561032b57600080fd5b6001809054906101000a900460ff16151561034557600080fd5b6003543073ffffffffffffffffffffffffffffffffffffffff163110151561036c57600080fd5b346000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550565b73c68bb418ee2b566e4a3786f0fa838aea85ae118673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561041d5760018060016101000a81548160ff0219169083151502179055505b565b60006020528060005260406000206000915090505481565b73c68bb418ee2b566e4a3786f0fa838aea85ae118673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561055557600160009054906101000a900460ff161561049957610556565b68056bc75e2d631000003073ffffffffffffffffffffffffffffffffffffffff163110156104c657600080fd5b60018060006101000a81548160ff0219169083151502179055503073ffffffffffffffffffffffffffffffffffffffff16316002819055507309ae9886c971279e771030ad5da37f227fb1e7f973ffffffffffffffffffffffffffffffffffffffff166108fc6002549081150290604051600060405180830381858888f19350505050151561055457600080fd5b5b5b565b68056bc75e2d6310000081565b600160009054906101000a900460ff1681565b7309ae9886c971279e771030ad5da37f227fb1e7f981565b6000600160009054906101000a900460ff16156105b7576004544310156105b657600080fd5b5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561067c57600080fd5b50565b60025481565b73c68bb418ee2b566e4a3786f0fa838aea85ae118673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156106de57681b1ae4d6e2ef5000006003819055505b565b60045481565b60035481565b6001809054906101000a900460ff1681565b6000806000600160009054906101000a900460ff16151561071e57600080fd5b8392508273ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15156107c457600080fd5b6102c65a03f115156107d557600080fd5b50505060405180519050915060008214156107ef57600080fd5b600254826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540281151561083c57fe5b0490506000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460026000828254039250508190555060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561097c57600080fd5b6102c65a03f1151561098d57600080fd5b5050506040518051905015156109a257600080fd5b505050505600a165627a7a72305820e6c0ff8de4520c9a5b9c25f5b335d7af2a95659733566548d1283e72c77f7b610029
Swarm Source
bzzr://e6c0ff8de4520c9a5b9c25f5b335d7af2a95659733566548d1283e72c77f7b61
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.