Questions tagged [crowdsale]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
12 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); } ...
0 votes
1 answer
44 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 ...
0 votes
2 answers
56 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 ...
0 votes
1 answer
33 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 ...
1 vote
1 answer
53 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 ...
0 votes
0 answers
57 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 ...
0 votes
1 answer
21 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; ...
  • 15
0 votes
0 answers
19 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 ...
0 votes
1 answer
77 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 ...
0 votes
1 answer
106 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 ...
0 votes
1 answer
54 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 ...
  • 1
0 votes
1 answer
177 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 { ...
1 vote
0 answers
436 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: ...
  • 125
0 votes
1 answer
55 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 ...
  • 23
1 vote
0 answers
30 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, ...
0 votes
1 answer
230 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): // ...
  • 95
1 vote
1 answer
32 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). ...
  • 159
0 votes
1 answer
302 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 ...
  • 21
1 vote
1 answer
73 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....
0 votes
1 answer
86 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-...
  • 1
0 votes
1 answer
351 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?
  • 1
0 votes
0 answers
171 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-...
0 votes
1 answer
51 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://...
  • 1
2 votes
2 answers
629 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 ...
  • 316
0 votes
1 answer
314 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 (...
  • 3
1 vote
1 answer
245 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 ...
2 votes
1 answer
38 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 ...
  • 121
1 vote
0 answers
105 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 ...
  • 11
0 votes
0 answers
63 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: ...
  • 1
0 votes
1 answer
611 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&...
0 votes
1 answer
261 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 ...
0 votes
1 answer
162 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 ...
  • 3
0 votes
3 answers
66 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 ...
0 votes
0 answers
42 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))...
0 votes
1 answer
447 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: ...
0 votes
0 answers
165 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 ...
0 votes
1 answer
362 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/...
  • 131
1 vote
1 answer
280 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?
  • 922
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/...
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 ...
1 vote
1 answer
638 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 ...
0 votes
0 answers
418 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 ...
1 vote
1 answer
202 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 ...
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)
0 votes
1 answer
244 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 "./...
  • 1
0 votes
1 answer
60 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, ...
1 vote
1 answer
71 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 (...
  • 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:...
0 votes
1 answer
321 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 ...
  • 1,044
1 vote
1 answer
874 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 ...
  • 185

1
2 3 4 5 6