Questions tagged [crowdsale]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
484 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
211 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
493 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
46 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
37 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
56 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
370 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
42 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
30 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
265 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
263 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
145 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
1answer
89 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
438 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
382 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
196 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
495 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
71 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
298 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
360 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
434 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
116 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
72 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
101 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
0answers
11 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
58 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
15 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
0answers
139 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
244 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
2answers
443 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
160 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
209 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
464 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
69 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
1answer
3k views

How to fix “invalid argument 0: json: cannot unmarshal hex number with leading zero digits into Go struct field CallArgs.value of type *hexutil.Big”?

Using Remix and metamask, I have deployed a contract on the rinkeby network that contains a function that, when called will send unsold tokens to a specific address. The code for it is like this ...
1
vote
3answers
549 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
437 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
214 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
495 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
215 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
462 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
213 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
467 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
93 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 ...
1
vote
1answer
400 views

How can I display amount ETH funded and ICO-token received on a webpage

How can I display amount ETH funded and ICO Tokens received on a webpage in a crowdsale ICO campaign? The webpage is the personalised customer page after login. I will display the ethereum adress. ...
1
vote
0answers
759 views

How to access Token functions in remix.ethereum.org?

I'm looking at Crowdsale.sol from OpenZeppelin / zeppelin-solidity. Here's a snippet: import '../token/MintableToken.sol'; contract Crowdsale { MintableToken public token; After I create the ...
1
vote
0answers
367 views

Capping Token Sale

How does one have a capped crowdsale? This is my code so far contract CrowdsaleToken is StandardToken{ string public constant name = "TestCoin"; string public constant symbol = "TCC"; uint public ...
1
vote
1answer
46 views

I want to remove the timed aspect of this crowdsale contract and make it finalizable manually [closed]

Which lines do I remove and what do I replace them with to change this from a timed crowdsale contract into one I can end manually? pragma solidity ^0.4.18; interface token { function transfer(...
1
vote
1answer
428 views

Could not withdraw tokens after crowd sale

I'm trying to implement smart contract for crowd sale and faced following problem. Firstly, I created test token here on Ethereum- using examples from OpenZeppelin framework and test CrowdSale ...
0
votes
1answer
42 views

ERC20, how to calculate how many tokens for crowdsale?

If you look at this article, the total tokens for crowdsale is 100 tokens and defined in the code as uint256 public maxTokens = 100000000000000000000; how come 100000000000000000000 becomes 100 ...