Questions tagged [crowdsale]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
463 views

Buy token function does not work in crowd-sale smart contract

I am new to ethereum block-chain. I created a crowd-sale and ERC20 smart contract and deployed on rinkeby test network. The ERC20 token transfer function working fine. But when I check functionality ...
1
vote
1answer
154 views

Tokensale whitelist UI

I am trying to design UI for a tokensale smart contract where all participants must be whitelisted before purchasing tokens. The participants submit their address via the UI form, but only the ...
1
vote
2answers
528 views

Get address of internal transaction using Ganache

I am deploying a Crowdsale contract locally, using truffle and ganache. The problem is, that the MintableToken is created during the deployment of the Crowdsale contract, using the ...
1
vote
2answers
184 views

Receive ether from one address and transfer tokens to another [closed]

I am starting a crowdsale and I want to add a custom function to my crowdsale contract. Basically I want users to be able to purchase tokens for fiat and bitcoins. In order to make that work I will ...
1
vote
1answer
501 views

In the example Ethereum crowdsale contract, what is the safe withdrawal function?

By safe withdrawal, I mean if a crowdsale doesn't reach the target, what area of code sends the tokens back to investors. I'm really stumped. pragma solidity ^0.4.16; interface token { ...
1
vote
1answer
215 views

Where to place in Zeppelin crowdsale variables

In various tutorials and previous releases of zeppelin, variables like _rate were explicit in the code. Now, however, these are left in a function (SampleCrowdsale), and I'm not sure what I'm ...
1
vote
1answer
569 views

How reliable is it to use Block number to calculate Time in Smart contract?

I have seen contracts use block numbers to manage when the crowdsale should start and stop. How reliable is this? I understand the average time in ethereum is 17secs between blocks, but can this be ...
1
vote
1answer
86 views

Remix error : Function declared as view but this (potentially) modifies state

i'm following a tutorial but now it is old, because was written more then 1 year ago, with 0.4.24 pragma and i also want upgrade this code. I got this error and i'm pretty sure to know why: view and ...
1
vote
1answer
60 views

Crowdsale, how to calculate hard cap?

I was reading this article about Crowdsale. Simply, 100 Tokens are to be minted. The author set 60% of tokens are distributed as public sale. To be more specific, 20 out of 60 tokens will be sold ...
1
vote
1answer
73 views

Must token contract transfer all tokens to crowdsale contract before it can sell them?

I notice that on the standard tests for crowdsale contracts in Openzeppelin, they transfer the tokens from the Token contract to the Crowdsale Contract: context('once deployed', async function () { ...
1
vote
1answer
704 views

Ethereum Token Creation & Crowdsale Example

My goal is to create a token and sell it via the crowdsale contract. I used the examples: https://www.ethereum.org/token The code below is the exact same as on the ethereum homepage besides the ...
1
vote
1answer
51 views

Can't withdraw from Crowdsale multiple times

I'm using a crowdsale contract (listed below) and on Ropsten network I just set founding goal to 1ETH send it to crowdsale address and then I can withdraw to beneficiary address but when I send ETH a ...
1
vote
1answer
36 views

Why am I not receiving '5 passing, 1 failing' after performing truffle test?

After running truffle test i get the following unexpected error: Zanes-iMac:riskxtoken zanemassey$ truffle test Using network 'development'. Compiling ./contracts/Migrations.sol... Compiling ./...
1
vote
1answer
326 views

Implementation of an Allowance Crowdsale. Token Interface / _prevalidatePurchase-/_delivertokens-function

I am new to solidity coding and after I created some basic contracts as well as a ERC20 token contract I wanted to create a crowdsale contract. Now I am stuck and I have a question regarding the ...
1
vote
3answers
279 views

How do ICOs with token price linked to fiat currency prices work?

So when I see most Crowdsale contracts the price is set to x ETH and you receive the tokens based on that, if ETH price is down you get more tokens/$ and when ETH price is up, you get less/$. That's ...
1
vote
1answer
97 views

Set Wallet Address to Crowdsale Address

I am using an openZepplin crowdsale contract which has the following constructor contract myContract is Crowdsale { function myContract ( uint256 _rate, address _wallet, ...
1
vote
1answer
481 views

Airdrop cost optimization

I am planning an airdrop of an ERC20 mintable token created through a crowdsale contract based on Open Zeppelin. Now what I am wondering, is what would be the cost effective way of adding an airdrop ...
1
vote
2answers
437 views

ICO crowdsale without smart contract

I see that there are some ICO who collect ETH without smart contract and would like to know the negatives and positives for such decision. Thank you
1
vote
1answer
198 views

Using a token deployed separately in zeppelin-solidity Crowdsale.sol contructor

How to bring already deployed token into zeppelin-solidity Crowdsale.sol contructor? The owner is the same. What should I use instead of the "Mintable _token" below? function Crowdsale(uint256 ...
1
vote
2answers
570 views

Why this code gives me this error. Please help

Code is pragma solidity ^0.4.18; import 'https://github.com/OpenZeppelin/zeppelin-solidity/contracts/token/ERC20/MintableToken.sol'; contract HashnodeToken is MintableToken { string public name = ...
1
vote
1answer
75 views

crowdsale contract on my Ethereum Wallet for windows

I first created a token without difficulty with Ethereum Wallet can be see here: https://etherscan.io/address/0x926351469a1a97Ca5AB9b80928a0Ba01493d39F9#readContract. Now I'm trying to do a ...
1
vote
1answer
312 views

Gas issue on remix

I need your help, please. I've been trying to deploy a simple token and crowdsale contract that creates the token on remix, but when I try to deploy the crowdsale contract, it tells me gas exceeds the ...
1
vote
1answer
371 views

Who holds the tokens in a crowdsale?

I am trying to figure out how the ICO crowdsale is usually done? I have a good understanding of the ERC20 Token and its standards. When a new token is created the owner is assigned all the tokens. I ...
1
vote
1answer
450 views

Help with with Crowdsale contract?

I need your help. is anything wrong with this Crowdsale and CappedCrowdsale contracts? Basically, I enter timestamps, rate, address and cap amounts in Remix, click Create (RINKEBY). In InjectedWeb -...
1
vote
2answers
125 views

crowdsale deployed on testnet cannot receive ether from another test account

I deployed a smart contract for crowdsale that has a function of receiveETH(): function receiveETH(address beneficiary) internal { uint coinToSend = bonus(msg.value.mul(COIN_PER_ETHER).div(...
1
vote
1answer
75 views

Crowdsale not stoping

I'm trying to create a token sale for a colection. The idea is to restart the crowdsale everytime we grow funds to amplify the collection, the tokens are burnable to purchase items from the colection. ...
1
vote
1answer
115 views

Toggle crowdsale on/off and set new max caps

Hi i'm quite new to java and solidity, i was wondering how i could make a function in my crowdsale that only me as the owner of the contract could call at anytime to switch the crowdsale on and off, ...
1
vote
1answer
71 views

How to deploy more than one contract with Remix

I'm trying to deploy my contracts with Remix to Ropsten, but I don't know how to do it. Can you help me? (I have a ERC20 token contract, and a CrowdSale contract)
1
vote
1answer
40 views

Using an ERC20 crowdsale for a non-Ethereum based coin

I am confused as to how a crowdsale works. If in a crowdsale, people give their Ethereum to a new coin to be entered in a smart contract. Doesn't that mean that the receiving end of the contract (...
1
vote
0answers
17 views

Is it possible to do vote and participate in crowd-sale using Forwarder address?

Currently, I am using Metamask (Ropsten TestNet). And I want to implement one voting cum crowd-sale process, the scenario is given below: Want to make the voting process in this if Voter is voted to ...
1
vote
0answers
67 views

How to get back the ownership from crowdsale?

When I started crowdsale, I transferred token ownership to the crowdsale contract. When the sale finished, I'd like to send back the ownership to token so that the next crowdsale will start. How can I ...
1
vote
0answers
20 views

integrate icoengine into zeppelin crowdsale contract

I have the following functions // from https://github.com/eidoo/icoengine/blob/master/contracts/KYCBase.sol function buyTokens(uint64 buyerId, uint maxAmount, uint8 v, bytes32 r, bytes32 s) public ...
1
vote
1answer
104 views

Refundable Crowdsale

I am trying to create a contract for crowdsale using OpenZeppelin lib. I have imported everything necessary to the contract and initialized everything properly, but when I am trying to deposit funds ...
1
vote
0answers
149 views

Mix of Crowdsale contracts does not work. Completely lost :-/ [closed]

I am following this community for quite a bit and found some very helpful answers in the past, so I hope you can help me to solve a problem with my crowdsale contract as well. At first I would like ...
1
vote
1answer
258 views

ICO Token sale payment process

How can one start selling their coins on their custom website for ETH and Bitcoin? I was checking bunnytoken.com, they have very simple payment process script, which includes referral solution. ...
1
vote
3answers
475 views

What is the right approach to implement payable fallback function in crowdsale contract?

I am implementing crowdsale smart contract to accept ether and invoke ERC20 smart contract to assign tokens count calculated depending on the amount of ether invested. I heard that just implementing ...
1
vote
2answers
495 views

How to allow only the owner to transfer ERC20 tokens during crowdsale?

I recently came accross an ICO that used temp wallets. The tokens were sent to the investors manually which means that not everyone received their tokens at the same time. Until everyone received ...
1
vote
0answers
178 views

check msg.data in crowdsale contract, but the msg.data.length is zero

pragma solidity ^0.4.18; import 'zeppelin-solidity/contracts/math/SafeMath.sol'; import 'zeppelin-solidity/contracts/token/ERC20/ERC20.sol'; import '../util/BytesLib.sol'; contract Crowdsale { ...
1
vote
0answers
221 views

Token creation and crowdsale

I'm trying to create a token and a crowdsale on Rinkeby I managed to create both but when I want to send ethereum to the crowdsale I get an error: if you submit it may consume all the gas you ...
1
vote
0answers
489 views

How to mint tokens before crowdsale

I want to make a crowdsale with pre-ICO and ICO, so people can swap tokens directly by sending to the smart-contract. The pre-Ico should have a certain rate for the swap and the ICO should have a ...
1
vote
0answers
73 views

My basic crowdsale smartcontract does not work

I am new to ethereum and blockchain, I want to create a crowdsale/ICO. I followed ethereum website basic instruction. When I tried to test from testnet a transaction from my own account it shows some ...
1
vote
3answers
604 views

Using Openzeppelin's crowdsale contract as a base, how can I set the rate to be a decimal number?

For example if rate = 10 then for every wei the buyer gets 10 "token units" which are each 1*10^18 of a full token (as the default decimal for the erc20 token is 18). If I want the users in a ...
1
vote
1answer
449 views

How to create a different contract for private and ICO?

Is it possible that the Total supply is created at the time of creation of token for Privete-sale and then create an ICO contract for the Unsold tokens to sell them on crowdsale? (i.e. It is hard to ...
1
vote
1answer
235 views

Ethereum crowdsale example - Stuck tokens (how to save)

I deployed a crowdsale contract using the source from ethereum.org and loaded it with some tokens. It works as expected, except that it has no code to return the unsold tokens to the beneficiary. Is ...
1
vote
0answers
512 views

Token and Crowdsale contracts address problem

I'm testing the creation and deployment of ERC20 token + Crowdsale based on Open Zeppelin on the Rinkeby testnet using Truffle + Geth. The deployment went fine it seems, and through Metamask I was ...
1
vote
1answer
222 views

Can't interact with Crowdsale contract

I'm testing a Crowdsale contract (C) which send tokens of an already deployed contract (T). The idea is to send an amount of tokens to C from T, and then selling them for Ether, but nothing is working,...
1
vote
1answer
469 views

How KYC ICO check addresses during crowdsale?

I see more ICO are complying with KYC. I wonder what exactly means for the crowdsale smart contract. Is the latter rejecting eth coming from unregistered addresses? Then, how is this managed? With a ...
1
vote
0answers
220 views

Cannot send ETH to crowdsale contract

my problem is that I cannot send ETH in Rinkeby testnet or truffle to this crowdsale smart contract. I have shared token and crowdsale contract. They compile both in Remix and Mist wallet. What could ...
1
vote
0answers
476 views

ICO - question regarding private network

my team and I have been working on developing an application, based on a private ethereum network, due to the high gas cost of our contracts on the main chain. Now we would like to proceed to the ...
1
vote
0answers
94 views

Ethereum Crowdsale Code in Parity not working

I followed the tutorial on How to do Crowdsales via ethereum.org using Parity. However, there is always an exception when I try to give Ether to the address of the crowdsale contract. any thoughts on ...