Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [crowdsale]

The tag has no usage guidance.

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

Sending crowdsale tokens to investors with ethersJS

In my crowdsale contract I have provided a claim function for investors to claim their tokens (PULL). No issues with that. function claim() external nonReentrant { claimInvestor(msg.sender); } ...
pellyadolfo's user avatar
0 votes
1 answer
241 views

how to implement a crowdsale using the current version of openzeppelin 4.X

I develop smart contracts and I really like to use openzeppelin libraries for this, I know how to implement ICO using Crowdsale.sol contract from openzeppelin, but there is no such contract in the ...
Lll Cilician's user avatar
1 vote
2 answers
90 views

Functions working in remix but not in testnet

The functions remainingToken() and totalContribution() are not working in testnet but working in remix. function remainingToken() public view ownable returns (uint remainingSupply) { return ...
Zartaj Afser's user avatar
  • 4,181
1 vote
1 answer
47 views

Way to send tokens(I created ) to another smart contract for Crowdsale

I want to develop a crowd_sale contract. I have an ERC20 token contract. Now I want to transfer the tokens to the crowdsale contract at the time of deployment, so that people can buy tokens from that ...
Zartaj Afser's user avatar
  • 4,181
1 vote
1 answer
115 views

creation of TokenCrowdsale errored: Internal JSON-RPC error. { "code": -32000, "message": "execution reverted" }

I have an erc20 token and I want to create a crowd sale contract for it on Binance smart chain the token is deployed successfully but when I try to transact crowdsale then am having the error. Please ...
Syed Murtaza's user avatar
0 votes
1 answer
25 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; ...
dev's user avatar
  • 15
0 votes
1 answer
121 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 ...
BlockChain Learner's user avatar
0 votes
1 answer
121 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 ...
BigMadcode's user avatar
0 votes
1 answer
63 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 ...
girax's user avatar
  • 1
1 vote
1 answer
312 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 { ...
Mariia Synelnyk's user avatar
2 votes
0 answers
588 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: ...
AllJs's user avatar
  • 135
0 votes
1 answer
71 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 ...
ealco85's user avatar
  • 23
1 vote
0 answers
31 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, ...
Grecz Balázs's user avatar
0 votes
1 answer
255 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): // ...
Narcis's user avatar
  • 95
1 vote
1 answer
34 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). ...
DHC's user avatar
  • 367
0 votes
1 answer
374 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 ...
Austin's user avatar
  • 21
1 vote
1 answer
85 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....
Alexander Herranz's user avatar
0 votes
1 answer
95 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-...
Lar's user avatar
  • 1
0 votes
1 answer
398 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?
jon's user avatar
  • 1
0 votes
0 answers
185 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-...
Iammrjude1's user avatar
0 votes
1 answer
54 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://...
dprof's user avatar
  • 1
2 votes
2 answers
773 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 ...
Magno C's user avatar
  • 345
0 votes
1 answer
333 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 (...
Kamil's user avatar
  • 3
1 vote
1 answer
266 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 ...
HiddenGemsss's user avatar
2 votes
1 answer
40 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 ...
John's user avatar
  • 121
1 vote
0 answers
112 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 ...
Sptz's user avatar
  • 11
0 votes
0 answers
65 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: ...
Genry's user avatar
  • 1
0 votes
1 answer
659 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&...
walter calegari's user avatar
0 votes
1 answer
269 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 ...
AvocadoChocolate's user avatar
0 votes
1 answer
178 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 ...
Luke's user avatar
  • 3
0 votes
3 answers
68 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 ...
BlockDev's user avatar
0 votes
0 answers
45 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))...
AvocadoChocolate's user avatar
0 votes
1 answer
712 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: ...
Imam Ash Shidqi's user avatar
0 votes
0 answers
173 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 ...
phantalune's user avatar
0 votes
1 answer
380 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/...
tony gil's user avatar
  • 131
1 vote
1 answer
362 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?
mzaidi's user avatar
  • 1,012
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/...
VagueRumi's user avatar
0 votes
2 answers
3k 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 ...
Alexis Rin's user avatar
1 vote
1 answer
653 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 ...
Ascii124's user avatar
0 votes
0 answers
452 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 ...
Hackeerrrr's user avatar
1 vote
1 answer
311 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 ...
guessy_88's user avatar
2 votes
1 answer
2k 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)
Bernardo Barateiro's user avatar
0 votes
1 answer
255 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 "./...
Dmitry's user avatar
  • 1
0 votes
1 answer
61 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, ...
user7362292's user avatar
1 vote
1 answer
73 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 (...
Ben Hagel's 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:...
urjit on rails's user avatar
0 votes
1 answer
361 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 ...
bbusdriver's user avatar
  • 1,154
1 vote
1 answer
1k 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 ...
Giuseppe's user avatar
  • 185
1 vote
1 answer
279 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 ...
bbusdriver's user avatar
  • 1,154
0 votes
2 answers
379 views

Remix: This contract does not implement all functions and thus cannot be created

I'm new here and code with openzeppelin framework 2.2.0. There is no error occurred when compiling with solidity 0.5.8. But when I'm going to deploy the contract, I have no bytecode and cannot ...
Yuda Chandra Wiguna's user avatar

1
2 3 4 5 6