Questions tagged [openzeppelin-contracts]

OpenZeppelin Contracts is a library for secure smart contract development. It provides implementations of standards like ERC20 and ERC721 which you can deploy as-is or extend to suit your needs, as well as Solidity components to build custom contracts and more complex decentralized systems.

Filter by
Sorted by
Tagged with
2
votes
1answer
158 views

Issue in understanding MintedCrowdsale in the ICO contract from openzeppelin

I am trying to understand the openzeppelin code for writing ICO contract. In MintedCrowdsale, mint() function in ERC20Mintable is called as mentioned below. ERC20Mintable(address(token())).mint(...
1
vote
1answer
228 views

In OpenZeppelin _deliverTokens() from CrowdSale contract is not called

I am using openZeppelin for creating the ICO contract. Could you please help me to understand the below behaviour ? Crowdsale The CrowdSale contract is having the function buyTokens(). It calls the ...
1
vote
1answer
103 views

Why does this function not need a require statement?

Why does the following function not need a require statment? function transferFrom(address from, address to, uint256 value) public returns (bool) { _allowed[from][msg.sender] = _allowed[from][...
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 ...
2
votes
0answers
175 views

Using OpenZeppelin's increaseTime.js

I'm writing a test for a time-dependent solidity function. I'd like to use the increaseTime.js helper from v1.12.0 of OpenZeppelin's library. When I try to call this helper inside my test, I get an ...
0
votes
1answer
786 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
1answer
752 views

How do I call the burnFrom() function once my contract is deployed?

I'm using the Openzeppelin library in my contract where MyToken is StandardBurnableToken. Once I deploy that and I want to burn a set amount of the initial supply how do I call the function? I don't ...
0
votes
1answer
1k views

Calling the burn function

I am using the openzeppelin library and importing the StandardBurnableToken.sol logic into MyContract.sol here is a code pragma solidity ^0.4.17; import "/openzeppelin-solidity/contracts/token/...
1
vote
1answer
110 views

Contract Inheritence

Let's suppose we created two contracts: Contract A and Contract B. Contract A is inherit by Zeppelin's standard token ERC20 where as Contract B is inherit by contract A. Will contract B be ...
0
votes
1answer
585 views

Altering / overriding the method from main contract

I am using openzeppelin to create a ICO as a CappedCrowdsale and TimedCrowdsale as mentioned in the example mentioned in the below link. Reference : https://github.com/buddies2705/Solidity-Tutorial/...
1
vote
2answers
410 views

Escrow account creation in the example ICO contract from openzeppelin

I am understanding the ICO as explained in openzeppelin https://github.com/OpenZeppelin/openzeppelin-solidity/tree/master/contracts/examples When I called the "Buy tokens" the beneficiary is getting ...
6
votes
1answer
673 views

Is there a way to test an onlyOwner function from a Truffle/Solidity unit test?

I have a contract with a function marked as onlyOwner (from OpenZeppelin, so only the address that deployed the contract can call it). pragma solidity ^0.4.17; import "./Ownable.sol"; contract ...
1
vote
0answers
1k views

Issue in installing truffle-hdwallet-provider

I am trying to install "truffle-hdwallet-provider" using the command "npm i truffle-hdwallet-provider --save". I am getting the beow mentioned error. Please assist me in resolving this. truffle-...
7
votes
1answer
4k views

What is IERC20?

I understand the ERC20 standards which includes the functions like totalSupply() balanceOf() allowance() transfer() approve() transferFrom() When I check the openzeppelin, I could see "contract ...
0
votes
1answer
154 views

Not able to deploy contract in testnet(Ropseten)

I am trying to deploy a crowdsale contract which is build upon openzeppelin while deploying it on geth --dev and ganache it gets deployed perfectly but whenever I am trying to deploy the contract on ...
2
votes
1answer
224 views

Wallets report 0 balance for address but balanceOf is right

Given this contract using Openzeppelin lib: contract Token is StandardToken, Ownable { string public name = ""; string public symbol = ""; uint8 public decimals = 18; constructor(...
1
vote
1answer
112 views

Not able to deploy crowdsale

when i am doing truffle migrate.i am able to deploy my crowdsale contract but my token contract is getting deployed but not the crowdsale contract. var Sportist = artifacts.require("./Sportist.sol"); ...
2
votes
3answers
2k views

Basic Crowdsale Contract

I am learning to develop smart contract using Solidity. Currently, I am working and test the feature of following crowdsale contract. https://github.com/OpenZeppelin/openzeppelin-solidity/blob/v1.8.0/...
2
votes
1answer
2k views

What is the most used ERC20 implementation?

I understand ERC20 is a specification. I found some implementations like the following: https://theethereum.wiki/w/index.php/ERC20_Token_Standard https://github.com/ConsenSys/Tokens I want to create ...

1 2 3
4