Skip to content

LeadcoinNetwork/crowdsale-smart-contract

Repository files navigation

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