Questions tagged [crowdsale]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
18 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 ...
1
vote
1answer
32 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
0answers
19 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 ...
0
votes
1answer
23 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-...
0
votes
0answers
133 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 ...
0
votes
0answers
41 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 ...
0
votes
1answer
65 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?
0
votes
0answers
79 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
1answer
11 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
vote
2answers
142 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 ...
0
votes
1answer
78 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 (...
1
vote
1answer
127 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
1answer
24 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 ...
1
vote
0answers
32 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 ...
0
votes
0answers
48 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: ...
0
votes
1answer
160 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
1answer
165 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
1answer
114 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 ...
0
votes
3answers
33 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
0answers
38 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
1answer
100 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
0answers
98 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
1answer
222 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/...
0
votes
1answer
142 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?
0
votes
1answer
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
2answers
941 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 ...
0
votes
1answer
507 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
0answers
165 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
1answer
94 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
1answer
611 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
1answer
184 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 "./...
0
votes
1answer
53 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
1answer
59 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 (...
0
votes
1answer
2k 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
1answer
197 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
vote
1answer
296 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
145 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 ...
0
votes
2answers
191 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 ...
1
vote
0answers
18 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 ...
0
votes
1answer
73 views

What DSAuthority(0) and eos.owner() means and does?

In ERC20 EOS crowdsale contract, what these three lines(469-471) does? function initialize(DSToken eos) auth { assert(address(EOS) == address(0)); //[Someone explained this line here][...
0
votes
2answers
3k views

Invalid implicit conversion from address to address payable requested

first of all really nice to find this forum, I'm starting coding Solidity. Here the problem I get compiling a template of crowdsale smart contract ExampleTokenCrowdsale.sol, from this tutorial. The ...
0
votes
1answer
27 views

Is it likely to receive more token airdrops to one of the original Ethereum addresses from the crowdsale?

Is it likely to receive more token airdrops to one of the original Ethereum addresses from the crowdsale? Hi there, I participated in the original Ethereum crowdsale and I used to store a certain ...
0
votes
0answers
98 views

Issue in understanding Crowsale in the ICO contract

I want to create a token and run an ICO but all this without the function of crowdsale and minting. It want it to be a token which has a strict initial suplly (exmpl 1M) and without the funtion of ...
0
votes
1answer
720 views

Sell tokens to a contract and burn them after

The goal is to make a crowdsale smart contract where investors can buy tokens (no cap, no initial supply, all tokens are minted) and sell them to a contract for some price (rate in my case). And I ...
1
vote
2answers
110 views

Make a crowdsale reusable?

I have a pretty standard OpenZeppelin crowdsale. Now the issue is that I want to be able to use one crowdsale contract with multiple (~100) different ERC20 tokens. Ideally I want to put the ...
1
vote
1answer
75 views

Set rate for crowdsale after it has ended

The problem I am trying to solve is how to properly price an ICO. One idea would be to have 10 tokens available. Do the ICO and collect all the ETH. Then after the ICO has ended, divvy up the tokens ...
0
votes
2answers
344 views

(Truffle) how to call finalize() function after finishing crowdsale

I would like to call token.transferOwnership(msg.sender) after finishing timed crowdsale. So, I inherited FinalizableCrowdsale contract, then override finalization() function to call transferOwnership ...
1
vote
0answers
87 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 ...
0
votes
1answer
796 views

Error in creating instance of deployed contract using truffle console

I deployed Token and Crowdsale contract in separate migration files. During Migration, there was no error. Migration logs are share: Running migration: 2_deploy_token.js Deploying DappToken... ......
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
2 3 4 5