Giter VIP home page Giter VIP logo

crowdsale-smart-contract's Introduction

LeadCoin's Crowdsale Contracts

Please see below LeadCoin smart contracts for the LeadCoin Crowdsale.

leadcoin Token

LDC is an ERC-20 compliant cryptocurrency built on top of the Ethereum blockchain.

Contracts

Please see the contracts/ directory.

The Crowdsale Specification

  • LDC token is ERC-20 compliant.
  • LDC Token is Bancor compliant.
  • Token allocation:
    • 50% of the total number of LDC tokens will be allocated to contributors during the token sale.
    • 10% of the total number of LDC tokens will be allocated to the team.
    • 10% of the total number of LDC tokens will be allocated to Webydo LTD, the first node in the network.
    • 30% of the total number of LDC tokens will be allocated to LeadCoin, to be used for future strategic plans and to develop the LeadCoin' ecosystem.

LDC PRICING PROGRAM

The LDC / ETH rate will be 15000 LDC for every ETH

Develop

  • Contracts are written in Solidity and tested using Truffle and testrpc.

  • Our smart contract is based on Sirin Labs ICO and Open Zeppelin smart contracts v1.3.0 (latest OZ commit merged is 8e01dd14f9211239213ae7bd4c6af92dd18d4ab7 from 24.10.2017).

  • LDC token is a SmartToken, implementing Bancor's SmartToken contract.

Audit

The contract was audited by several Ethereum blockchain experts.

No potential vulnerabilities have been identified in the crowdsale and token contract.

  • Matthew di Ferrante and Dean Eigenmann, well-known Ethereum experts who have provided auditing services for many other token sale contracts.

    The audit report is available here:

https://github.com/LeadcoinNetwork/crowdsale-smart-contract/blob/master/audit/leadcoin-audit.pdf

Code

Class Diagram

Class Diagram

LeadCoinCrowdsale Functions

getTotalFundsRaised

function getTotalFundsRaised() public view returns (uint256)

Returns the total funds collected in wei(ETH and none ETH).

addUpdateGrantee

function addUpdateGrantee(address _grantee, uint256 _value) external onlyOwner beforeFinzalized

Adds/Updates address and token allocation for token grants.

Granted tokens are allocated to non-Ether, presale, buyers.

setFiatRaisedConvertedToWei

function setFiatRaisedConvertedToWei(uint256 _fiatRaisedConvertedToWei) external onlyOwner onlyWhileSale

Sets funds collected outside the crowdsale in wei. funds are converted to wei using the market conversion rate of USD\ETH on the day on the purchase.

hasEnded

function hasEnded() public view returns (bool) {

Return true if the crowdsale cap was reached or endTime reached ( override crowdsale.sol)

validPurchase

function validPurchase() internal view returns (bool) {

Return true if hardcap was not reached ( override crowdsale.sol)

deleteGrantee

function deleteGrantee(address _grantee) external onlyOwner beforeFinzalized

Deletes entries from the grants list.

claimTokenOwnership

function claimTokenOwnership() external onlyOwner

Accepts new ownership on behalf of the LeadCoinCrowdsale contract. This can be used, by the token sale contract itself to claim back ownership of the LeadCoinSmartToken contract.

LeadCoinCrowdsale Events

GrantAdded

event GrantAdded(address indexed _grantee, uint256 _amount);

GrantUpdated

event GrantUpdated(address indexed _grantee, uint256 _oldAmount, uint256 _newAmount);

GrantDeleted

event GrantDeleted(address indexed _grantee, uint256 _hadAmount);

FiatRaisedUpdated

event FiatRaisedUpdated(address indexed _address, uint256 _fiatRaised)

Dependencies

# Install Truffle and testrpc packages globally:
$ npm install -g truffle ethereumjs-testrpc

# Install local node dependencies:
$ npm install

Test

$ ./scripts/test.sh

Code Coverage

$ ./scripts/coverage.sh

Collaborators

License

Apache License v2.0

crowdsale-smart-contract's People

Contributors

doubleorseven avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.