Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [crowdsale]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

Deploy a crowdsale contract for a previously deployed ERC20 token

I have deployed an upgradable ERC20 token using ^0.8.4 and I would like to set up an AllocatedCrowdsale from OpenZeppelin for said token. I have set up a second project for the crowdsale using ^0.5.0 ...
user avatar
0 votes
1 answer
18 views

How can i store each address that interact with my smart contract?

i am working on a crowdsale type of smart contract and i want to store everyone who sent ether to my contract .So i created a struture like this struct User { address participantsAddress; ...
user avatar
  • 5
0 votes
0 answers
7 views

Can I use Crowdsale with ERC20 Token created in OZ4.5.0?

Basically, I already have ERC20 token created, which is using solidity 0.8.2 and OpenZeppelin version 4.5.0. I know that Crowdsales supports only OpenZeppelin Contracts 2.x version. I am not sure if I ...
user avatar
0 votes
1 answer
28 views

ERC20Token - crowdsale, not enough tokens for transfer issue

I am trying to create a ICO contract (Crowdsale) which will fecilitate the sale of ERC20Token. While migrating the contract, I am getting stuck at an error "SAMTokenSale" hit a require or ...
user avatar
0 votes
1 answer
67 views

What's a good way to implement multiple rates into Crowdsale?

i am trying to deploy an allowance crowdsale contract, I have it working just fine. But I have multiple rates depending on the amount of ETH that is sent to the contract. I have deployed 3 different ...
user avatar
0 votes
1 answer
34 views

Deploying AllowanceCrowdsale with Chainlink Pricefeed problem

I am new to Solidity and lost how i can acomplish to integrate the Chainlink Pricefeed into the OpenZepellin 2.5.0 AllowanceCrowdsale contract. What i have got so far: The Crowdsale contract: pragma ...
user avatar
  • 1
0 votes
1 answer
52 views

Crowdsale - Invalid implicit conversion from contract IERC20 to contract ERC20 requested

I am using ^0.8.0 version of solidity compiler and trying to add crowdsale smart contract pragma solidity ^0.8.0; import "./Crowdsale.sol"; contract MyTokenSale is Crowdsale { ...
user avatar
1 vote
0 answers
228 views

How to Implement a Time-Locked Crowd sale with Multiple Vesting Schedule and Token Distribution for an ERC20 token PreICO, ICO & PostICO stages

I am working on a ERC20 token crowd sale project. The token distribution and vesting schedule is a little bit complicated. So Here is the scenario: Total Supply: 1,000,000,000 Token Distribution: ...
user avatar
  • 115
0 votes
1 answer
37 views

Persistent out of gas error with truffle latest on receive (Fallback) function

I am having a persistent issue programming receive fallback function on an smart contract where I am programming an staged pre-sale of a Token. When I try on Remix transaction looks as done, but it ...
user avatar
  • 13
1 vote
0 answers
27 views

Crowdsale contract problem

I want to do that if another token arrives on a contract, it can be taken out by the other token. function withdrawTeamSale() public { require(IBEP20(address(this)).transferFrom(msg.sender, ...
user avatar
0 votes
0 answers
37 views

Returned error: VM Exception while processing transaction: revert

I am getting an error "Returned error: VM Exception while processing transaction: revert" when trying to send a transaction to a Crowdsale contract. This contract does not have any tokens ...
user avatar
  • 7
0 votes
1 answer
156 views

error: type address payable is not implicitly convertible to expected type contract "IERC20""

So I'm testing out deploying a crowdsale contract (using remix). First I deployed the token contract (I tried multiple versions, but here's one contract example taken from the openzeppelin forums): // ...
user avatar
  • 75
1 vote
1 answer
30 views

what is the unit in ICO?

It is a bit a silly question I am trying to understand what the amount of coins are sold in ICO, let's say, someone has minted 10 coins whose decimal are 3, which means someone has 10.000 (10 *10^3). ...
user avatar
  • 105
0 votes
1 answer
173 views

How to Calculate Jager using msg.value on Binance Smart Chain?

Very quick and likely easy question here. I am trying to code a crowdsale contract that accepts BNB and returns a number of tokens to the sender. My transactions keep failing because it says the BNB ...
user avatar
  • 21
1 vote
1 answer
54 views

Can I send ETH to an Smart Contract address?

I'm developing an Smart Contract based in the Openzeppelin's Crowdsale one. When I test the Crowdsale Smart Contract manually, sending ETH with metamask, the SC returns me the correct amount of tokens....
user avatar
  • 584
0 votes
0 answers
62 views

How to add 20% of buy token in presale(Crowdsale) if user bought worth of 5 BNB?

Source of Presale contract:https://github.com/laronlineworld/BYBPresale/blob/main/BYBPresale.sol /** * @dev Calculates the token amount per ETH contributed based on the time now. * @return Rate of ...
user avatar
0 votes
1 answer
73 views

Is it possible to create a crowdsale contract that instead of eth/bnb to buy tokens, token will be use to buy tokens?

Is it possible to create a crowdsale contract that instead of eth/bnb to buy tokens, token will be use to buy tokens? like swap token to token? This is my crowdsale contract: // SPDX-License-...
user avatar
  • 1
0 votes
0 answers
327 views

Error in ERC20 Token transfer from Crowdsale contract

These are the steps I followed: approve admin for 2 B spending. transfer 2 B out of 10 B to MyCrowdsale contract using transferFrom() function approve 2 B spending for MyCrowdsale contract set the ...
user avatar
  • 121
0 votes
0 answers
76 views

Crowdsale smart contract frontend creation

I wanted to make a front end webpage for buyflamecoin function in my crowdsale smart contract. Crowd sale contract link : https://bscscan.com/address/0x959a4c2980ee9541b7359a1ab67b3b963c33ab93 Can ...
user avatar
0 votes
1 answer
281 views

Can you reserve your token name and symbol before releasing to mainnet?

Is it possible to list our token to reserve the name and symbol before our contracts are released on mainnet?
user avatar
  • 1
0 votes
0 answers
153 views

How do I create a crowdsale smart contract that has maximum buy amount

I wrote a code for a crowdsale smart contract. Code is below: // SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.8.0; contract Context { constructor () internal { } // solhint-...
user avatar
0 votes
1 answer
40 views

I am Getting DeclarationError : undeclared identifier function setEndTime(uint _endTime) public onlyOwner

pragma solidity ^0.5.0; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/dfbdb11605bab94df6a6b864afc1a068e94a67cc/contracts/crowdsale/Crowdsale.sol"; import "https://...
user avatar
  • 1
2 votes
2 answers
458 views

Always running out of gas when sending ETH to a contract

I'm trying to implement a Crowdsale contract using OpenZeppelin 4.x since this version has deleted the Crowdsale.sol from its repo. My goal is to send ETH to the contract, receive "Gold" in ...
user avatar
  • 304
0 votes
1 answer
259 views

Create crowdsale contract with newer version solidity of token contract

I have created token contract with solidity ver. ^0.8.0 and now I want create crowdsale contract. Is there a way to combine crowdsale contract (solidity version 0.8.0) with token contract crowdsale (...
user avatar
  • 3
1 vote
1 answer
221 views

Sell function but with accepting only another erc20 token, not eth

I want to sell my token (PRO TOKEN) to users in my presale, but I dont want people to send ETH or any other crypto to buy from my smart contract. I want people to buy my PRO TOKEN by sending ...
user avatar
2 votes
1 answer
32 views

Can you create fungible tokens out of a single non-fungible token?

As you are aware, ERC20 tokens are fungible tokens and ERC721 are non-fungible tokens. Click here for details if you want to read about them. Assuming you have a non-fungible digital asset such as art ...
user avatar
  • 121
1 vote
0 answers
87 views

InternalCompilerError: Compiled contract not found. Contracts are correctly pointed to

Environment OpenZeppelin 2.5.1 Truffle v5.2.4 (core: 5.2.4) Node v15.11.0 Details Inheriting the PostDeliveryCrowdsale into my crowdsale contract fails to compile as can be seen below, this only ...
user avatar
  • 11
0 votes
0 answers
55 views

How do I pick up Ether after Crowdsale? And other questions

Testnet: Rinkeby Address token: 0xeAD7ACF95b260E4C866a036F9E792759Ba0Ad4ce Address Crowdsale:0xf2D4B282CE60A0abBE7fb74C694A9A04087E5519 Ethers credited at the end of Crowdsale: ...
user avatar
  • 1
0 votes
1 answer
484 views

How can I test my purchase function on the truffle with chai?

I'm trying to test my token buying function but I encounter an error, o facilitate understanding I will show the code "Error: Returned error: VM Exception while processing transaction: revert&...
user avatar
0 votes
1 answer
235 views

Why is my Crowdsale Contract not letting me buy?

Good day, I have designed a mintable token that has a max supply, I now want to sell that token in a Crowdsale. I created the crowdsale contract, set the token address, transffered the funds... but ...
user avatar
0 votes
1 answer
143 views

Deploying Crowdsale.sol - Error

In order to enable purchases of MyToken, where do I include the RATE (token/ETH) such as the below code from Openzeppelin docs on crowdsales into my deploy_contract.js or MyToken.sol? And how to ...
user avatar
  • 3
0 votes
3 answers
53 views

How to get token address inside a crowdsale contract, if you create separate migration files?

To expand on the question, I have created an erc20 token contract, & a crowdsale contract. For each file, I intend to create separate migration files. How can i get the token address for reference ...
user avatar
0 votes
0 answers
41 views

What does this solidity code do in crowdsale contract?

Trying to level up on my solidity skills. I understand most of the crowdsale contract except these lines balances[teamWallet] = 3000 ether; emit Transfer(address(0x0), teamWallet, (3000 ether))...
user avatar
0 votes
1 answer
138 views

How to resolving this "Uncaught (in promise) TypeError"

I have a problem running npm run dev when I create a crowd sale project reference yt: Dapp University this my app.js code: App = { web3Provider: null, contracts: {}, account: '0x0', loading: ...
user avatar
0 votes
0 answers
145 views

Transaction error thrown with Vyper smart contract in MetaMask

I am trying to troubleshoot a problem I'm having with a crowdsale contract (written in Vyper). The contract compiles fine, and I can deploy the contract to Rinkeby without any problems, however when I ...
user avatar
0 votes
1 answer
325 views

OpenZeppelin - deploy crowdsale from Remix - wallet address

I am deploying a basic crowdsale using: // SPDX-License-Identifier: MIT pragma solidity ^0.4.18; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v1.6.0/contracts/crowdsale/...
user avatar
  • 131
1 vote
1 answer
247 views

Difference between types of sale activities for tokens

I want to underatand whats the difference between a crowdsale, airdrop, ICO, ILO, ipo and presale. Are all these types of presale activities?
user avatar
  • 760
0 votes
1 answer
1k views

Warning! Error encountered during contract execution [execution reverted]

I have an ERC20 Mintable+Burnable Token created on solidity 6.11 and a sale contract on solidity 5.0 I am getting error when i send ETH to the sale contract. https://rinkeby.etherscan.io/tx/...
user avatar
0 votes
2 answers
2k views

"VM Exception while processing transaction: revert" in Truffle test and Truffle dev

this is my problem :) Issue "Error: Returned error: VM Exception while processing transaction: revert" when reaching the Transfer function. I think it is related to the fact that my Crowdsale smart ...
user avatar
0 votes
1 answer
616 views

Openzeppelin Crowdsale

Ok so Ive found Openzeppelin a slightly easier Code to use, it explains better than Solidity does. But now my problem is the Math bit. Im no mathematician neither and cannot get my head around how it ...
user avatar
0 votes
0 answers
357 views

Token transfer lock after crowdsale

I am faced with a problem regarding the ICO and Token smart contracts (SCs). I am currently using OpenZeppelin SCs to create my token and ICO and everything is working fine. Now I would like to add a ...
user avatar
1 vote
1 answer
170 views

Solidity error message on compilation (DeclarationError: Identifier not found or not unique. using Address for address;)

I'm trying to compile a code for a crowdsale contract (Timed and with allowance) from openzeppelin library that is based on a deployed token. However during compilation on remix i get a syntax error ...
user avatar
2 votes
1 answer
1k 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)
user avatar
0 votes
1 answer
223 views

How to get tokens for crowdsale from the main token contract

Trying to deal with Ethereum contracts using OpenZeppelin examples and Remix. There is a token contract deployed in the test network: pragma solidity ^0.5.0; import "./ERC20.sol"; import "./...
user avatar
  • 1
0 votes
1 answer
58 views

Zepellin Crowsale buyTokens error

I'm trying to use the buyTokens function of the Zepellin Crowsale interface, but this gives me an error, without any log to be able to debug contract TokenA is MintableToken, PausableToken, ...
user avatar
1 vote
1 answer
68 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 (...
user avatar
  • 121
0 votes
1 answer
3k views

error: VM Exception while processing transaction: revert SafeMath: subtraction overflow on migrating crowdsale conract

I am developing the token sale Dapp using openzepplin-solidity version 2.3. While migrating, I got the following error. Returned error: VM Exception while processing transaction: revert SafeMath:...
user avatar
0 votes
1 answer
276 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 ...
user avatar
1 vote
1 answer
574 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 ...
user avatar
  • 185
1 vote
1 answer
199 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 ...
user avatar

1
2 3 4 5 6