-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14381b1
commit 075203b
Showing
2 changed files
with
1,014 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,159 @@ | ||
# Hut32ICO | ||
Escrowing ICO/ERC20 contract for Hut32 | ||
# Hut34ICO | ||
Escrowing ICO/ERC20 contract for Hut34 | ||
|
||
Web presence: | ||
|
||
[Hut32.io](https://hut34.io/) | ||
|
||
[Whitepaper](https://docsend.com/view/b4h7ygu) | ||
|
||
### Contract Abstract | ||
``` | ||
contract Hut34ICOAbstract | ||
{ | ||
/// @dev Logged upon receiving a deposit | ||
/// @param _from The address from which value has been recieved | ||
/// @param _value The value of ether received | ||
event Deposit(address indexed _from, uint _value); | ||
/// @dev Logged upon a withdrawal | ||
/// @param _by the address of the withdrawer | ||
/// @param _to Address to which value was sent | ||
/// @param _value The value in ether which was withdrawn | ||
event Withdrawal(address indexed _by, address indexed _to, uint _value); | ||
/// @dev Logged upon refund | ||
/// @param _to Address to which value was sent | ||
/// @param _value The value in ether which was withdrawn | ||
event Refunded(address indexed _to, uint _value); | ||
/// @dev Logged when new owner accepts ownership | ||
/// @param _from the old owner address | ||
/// @param _to the new owner address | ||
event ChangedOwner(address indexed _from, address indexed _to); | ||
/// @dev Logged when owner initiates a change of ownership | ||
/// @param _to the new owner address | ||
event ChangeOwnerTo(address indexed _to); | ||
/// @dev Logged when a funder exceeds the KYC limit | ||
/// @param _addr The address that must clear KYC before tokens are unlocked | ||
event MustKyc(address indexed _addr); | ||
/// @dev Logged when a KYC flag is cleared against an address | ||
/// @param _addr The addres which has had KYC clearance | ||
event ClearedKyc(address indexed _addr); | ||
/// @dev Logged when vested tokens are released back to HUT32_WALLET | ||
/// @param _releaseDate The official release date (even if released at | ||
/// later date) | ||
event VestingReleased(uint _releaseDate); | ||
// | ||
// Constants | ||
// | ||
// The Hut34 vesting psudo-address for transfering and releaseing vested | ||
// tokens to and from. The address is UTF8 encoding of the string and can | ||
// only be accessed by contract. | ||
address public constant HUT32_VEST_ADDR = address(bytes20("Hut34 Vesting")); | ||
// | ||
// State Variables | ||
// | ||
/// @dev This fuse blows upon calling abort() which forces a fail state | ||
/// @return the abort state. true == not aborted | ||
bool public __abortFuse = true; | ||
/// @dev Sets to true after the fund is swept to the fund wallet, allows token | ||
/// transfers and prevents abort() | ||
/// @return final success state of ICO | ||
bool public icoSucceeded; | ||
/// @dev An address permissioned to enact owner restricted functions | ||
/// @return owner | ||
address public owner; | ||
/// @dev An address permissioned to take ownership of the contract | ||
/// @return new owner address | ||
address public newOwner; | ||
/// @dev A tally of total ether raised during the funding period | ||
/// @return Total ether raised during funding | ||
uint public etherRaised; | ||
/// @return Wholesale tokens available for sale | ||
uint public wholesaleLeft; | ||
/// @return Total ether refunded. Used to permision call to `destroy()` | ||
uint public refunded; | ||
/// @returns Date of next vesting release | ||
uint public nextReleaseDate; | ||
/// @return Ether paid by an address | ||
mapping (address => uint) public etherContributed; | ||
/// @returns KYC flag for an address | ||
mapping (address => bool) public mustKyc; | ||
// | ||
// Modifiers | ||
// | ||
// | ||
// Function Abstracts | ||
// | ||
/// @return `true` if MIN_FUNDS were raised | ||
function fundSuccessful() public view returns (bool); | ||
/// @return `true` if MIN_FUNDS were not raised before endDate or contract | ||
/// has been aborted | ||
function fundFailed() public view returns (bool); | ||
/// @param _wei A value of ether in units of wei | ||
/// @return allTokens_ tokens returnable for the funding amount | ||
/// @return wholesaleToken_ Number of tokens purchased at wholesale rate | ||
function ethToTokens(uint _wei) | ||
public view returns (uint allTokens_, uint wholesaleTokens_); | ||
/// @notice Processes a token purchase for `_addr` | ||
/// @param _addr An address to purchase tokens | ||
/// @return Boolean success value | ||
function proxyPurchase(address _addr) public payable returns (bool); | ||
/// @notice Finalize the ICO and transfer funds | ||
/// @return Boolean success value | ||
function finalizeICO() public returns (bool); | ||
/// @notice Clear the KYC flags for an array of addresses to allow tokens | ||
/// transfers | ||
function clearKyc(address[] _addrs) public returns (bool); | ||
/// @notice Release vested tokens after a maturity date | ||
/// @return Boolean success value | ||
function releaseVested() public returns (bool); | ||
/// @notice Claim refund on failed ITO | ||
/// @return Boolean success value | ||
function refund() public returns (bool); | ||
/// @notice Push refund for `_addr` from failed ICO | ||
/// @param _addrs An array of address to refund | ||
/// @return Boolean success value | ||
function refundFor(address[] _addrs) public returns (bool); | ||
/// @notice Abort the token sale prior to finalizeICO() | ||
function abort() public returns (bool); | ||
/// @notice Salvage `_amount` tokens at `_kaddr` and send them to `_to` | ||
/// @param _kAddr An ERC20 contract address | ||
/// @param _to and address to send tokens | ||
/// @param _amount The number of tokens to transfer | ||
/// @return Boolean success value | ||
function transferExternalToken(address _kAddr, address _to, uint _amount) | ||
public returns (bool); | ||
} | ||
``` |
Oops, something went wrong.