Skip to content

Commit

Permalink
Merge pull request #60 from 7flash/master
Browse files Browse the repository at this point in the history
fix typo
  • Loading branch information
miohtama committed Sep 13, 2017
2 parents aafd292 + 068ad58 commit 9ba1787
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion contracts/Crowdsale.sol
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ contract Crowdsale is Haltable {
* Allow anonymous contributions to this crowdsale.
*/
function invest(address addr) public payable {
if(requireCustomerId) throw; // Crowdsale needs to track partipants for thank you email
if(requireCustomerId) throw; // Crowdsale needs to track participants for thank you email
if(requiredSignedAddress) throw; // Crowdsale allows only server-side signed participants
investInternal(addr, 0);
}
Expand Down
8 changes: 4 additions & 4 deletions contracts/PresaleFundCollector.sol
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ contract PresaleFundCollector is Ownable {
/**
* Load funds to the crowdsale for a single investor.
*/
function parcipateCrowdsaleInvestor(address investor) public {
function participateCrowdsaleInvestor(address investor) public {

// Crowdsale not yet set
if(address(crowdsale) == 0) throw;
Expand All @@ -124,12 +124,12 @@ contract PresaleFundCollector is Ownable {
* Load funds to the crowdsale for all investor.
*
*/
function parcipateCrowdsaleAll() public {
function participateCrowdsaleAll() public {

// We might hit a max gas limit in this loop,
// and in this case you can simply call parcipateCrowdsaleInvestor() for all investors
// and in this case you can simply call participateCrowdsaleInvestor() for all investors
for(uint i=0; i<investors.length; i++) {
parcipateCrowdsaleInvestor(investors[i]);
participateCrowdsaleInvestor(investors[i]);
}
}

Expand Down
2 changes: 1 addition & 1 deletion docs/source/interact.rst
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ Example triggering the funds transfer to ICO:
if is_account_locked(web3, account):
request_account_unlock(chain, account, None)
txid = contract.transact({"from": account}).parcipateCrowdsaleAll()
txid = contract.transact({"from": account}).participateCrowdsaleAll()
print("TXID is", txid)
check_succesful_tx(web3, txid)
print("OK")
Expand Down
2 changes: 1 addition & 1 deletion ico/earlypresale.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def participate_early(chain, web3: Web3, presale_address: str, crowdsale_address

funds = from_wei(presale.call().balances(investor), "ether")
print("Moving funds {} ETH for investor {} to presale {}".format(funds, investor, presale.address))
txid = presale.transact({"from": deploy_address}).parcipateCrowdsaleInvestor(investor)
txid = presale.transact({"from": deploy_address}).participateCrowdsaleInvestor(investor)
print("Broadcasting transaction {}".format(txid))
check_succesful_tx(web3, txid, timeout=timeout)
updated += 1
Expand Down
4 changes: 2 additions & 2 deletions ico/tests/contracts/test_eth_tranche_pricing.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def test_presale_move_to_wei_tranche_based_crowdsale(chain, presale_fund_collect
assert wei_tranche_ico.call().getState() == CrowdsaleState.Funding

# Load funds to ICO
presale_fund_collector.transact().parcipateCrowdsaleAll()
presale_fund_collector.transact().participateCrowdsaleAll()

# Tokens received, paid by preico price
wei_tranche_ico.call().investedAmountOf(customer) == to_wei(50, "ether")
Expand Down Expand Up @@ -333,7 +333,7 @@ def test_presale_update_counters(chain, presale_fund_collector, wei_tranche_ico,
assert wei_tranche_ico.call().getState() == CrowdsaleState.Funding

# Load funds to ICO
presale_fund_collector.transact().parcipateCrowdsaleAll()
presale_fund_collector.transact().participateCrowdsaleAll()

assert wei_tranche_ico.call().weiRaised() == to_wei(20000, "ether")
assert wei_tranche_ico.call().presaleWeiRaised() == to_wei(20000, "ether")
Expand Down
2 changes: 1 addition & 1 deletion ico/tests/contracts/test_milestone_pricing.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def test_presale_move_to_milestone_based_crowdsale(chain, presale_fund_collector
assert milestone_ico.call().getState() == CrowdsaleState.Funding

# Load funds to ICO
presale_fund_collector.transact().parcipateCrowdsaleAll()
presale_fund_collector.transact().participateCrowdsaleAll()

# Tokens received, paid by preico price
milestone_ico.call().investedAmountOf(customer) == to_wei(50, "ether")
Expand Down
10 changes: 5 additions & 5 deletions ico/tests/contracts/test_presale.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def test_invest_presale_move_to_crowdsale(chain, presale_fund_collector, presale
assert presale_crowdsale.call().finalizeAgent()
assert presale_crowdsale.call().getState() == CrowdsaleState.Funding

presale_fund_collector.transact().parcipateCrowdsaleAll()
presale_fund_collector.transact().participateCrowdsaleAll()

# Presale balances zerod
assert presale_fund_collector.call().balances(customer) == 0
Expand All @@ -113,8 +113,8 @@ def test_invest_presale_move_to_crowdsale_twice(chain, presale_fund_collector, p
presale_fund_collector.transact({"from": customer_2, "value": value}).invest()

time_travel(chain, preico_starts_at)
presale_fund_collector.transact().parcipateCrowdsaleAll()
presale_fund_collector.transact().parcipateCrowdsaleAll()
presale_fund_collector.transact().participateCrowdsaleAll()
presale_fund_collector.transact().participateCrowdsaleAll()

# Tokens received
assert presale_crowdsale.call().investedAmountOf(customer) == to_wei(1, "ether")
Expand All @@ -130,7 +130,7 @@ def test_invest_presale_move_to_crowdsale_too_early(chain, presale_fund_collecto
time_travel(chain, preico_starts_at - 1)

with pytest.raises(TransactionFailed):
presale_fund_collector.transact().parcipateCrowdsaleAll()
presale_fund_collector.transact().participateCrowdsaleAll()


def test_invest_presale_move_to_crowdsale_early_whitelisted(chain, web3, presale_fund_collector, presale_crowdsale_miletstoned, customer, customer_2, preico_starts_at, team_multisig, finalizer, uncapped_token):
Expand Down Expand Up @@ -176,7 +176,7 @@ def test_invest_presale_invest_too_late(chain, presale_fund_collector, presale_c

time_travel(chain, preico_starts_at + 1)

presale_fund_collector.transact().parcipateCrowdsaleAll()
presale_fund_collector.transact().participateCrowdsaleAll()

# No more presales
with pytest.raises(TransactionFailed):
Expand Down
2 changes: 1 addition & 1 deletion ico/tests/contracts/test_token_tranche_pricing.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def test_presale_move_to_tranche_based_crowdsale(chain, presale_fund_collector,
assert tranche_ico.call().getState() == CrowdsaleState.Funding

# Load funds to ICO
presale_fund_collector.transact().parcipateCrowdsaleAll()
presale_fund_collector.transact().participateCrowdsaleAll()

# Tokens received, paid by preico price
tranche_ico.call().investedAmountOf(customer) == to_wei(50, "ether")
Expand Down

0 comments on commit 9ba1787

Please sign in to comment.