Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [open-zeppelin]

The tag has no usage guidance.

1
vote
1answer
11 views

How to burn non burnable ERC20?

Suppose you received 250 HELLOCoins and you want to burn them. Unfortunately, HELLOCoins uses OpenZeppelin ERC20 which implements the following function: function _transfer(address from, address to,...
1
vote
1answer
17 views

Importing in SOLC to deploy smart contract

I don't run an Ethereum framework like Truffle and I want to deploy a smart contract using infura node. The smart contract is very simple: pragma solidity ^0.5.2; import "http://github.com/...
0
votes
1answer
13 views

What does the single line “_;” in OpenZeppelin's onlyMinter() function do? [duplicate]

In onlyMinter(), there is a line with only _;. I'm having troubles adding a minter address, so I'm just checking the various contracts that go into ERC721. The function is modifier onlyMinter() { ...
0
votes
0answers
12 views

No events were emitted - Exchanging ERC721 Tokens

Function to exchange ERC721 Tokens between two addresses. I am implementing this on truffle and openzeppelin 2.10. Two different tokens should be exchanged between two addresses. Here's my contract ...
-1
votes
0answers
15 views

Write a Function to Exchange ERC721 Tokens

How can we exchange Exchange ERC721 Tokens between two addresses? What would be contract function to write with oppenzeppelin 2.0 and truffle. Implemented exchangeStars() function in contract: ...
1
vote
1answer
18 views

How to ERC721 token using external contract to msg.sender?

I have Caller and ERC721 contract just like this : contract SampleToken is ERC721MetadataMintable { string private name; string private symbol; constructor (address _creator, string _name,...
0
votes
0answers
11 views

Struct Mapping: DeclarationError: Identifier not found or not unique for

Using openzepplin version 2.0.0 and solc version 0.5. I am writing an ERC721 token contract on truffle. Truffle compiles with no error on solc 0.4.23. I had to upgrade to 0.5 due to openzepplin ...
1
vote
2answers
26 views

OpenZeppelin Starting Balance

I believe that the openzeppelin project have updated their StandardToken smart contract which is now called ERC20.sol. One issue that I have is that the new smart contract has some missing ...
2
votes
2answers
30 views

OpenZeppelin crowdsale token ownership

Using the non-modified OpenZeppelin code to create a mintable and burnable ERC20 token and a crowdsale contract, once ownership of the token is transferred to the crowdsale contract, is it possible to ...
0
votes
0answers
28 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
127 views

Truffle compile gives Parser Error: Error parsing openzeppelin-solidity/contracts/ownership/Ownable.sol

I installed the latest version of truffle, solc, node and also installed new version of openzeppelin-solidity library in my project. Changed the truffle-config.js to use new solc version. My contract ...
1
vote
1answer
63 views

Issue in comparing token contract address and address(0) in Solidity 0.5.0

I am trying to compare the token contract address with the address(0). This was working fine in older version of truffle and solidity compiler (0.4.24). When I upgraded truffle and started using the ...
0
votes
0answers
20 views

Questions on MinterRole contract in openzeppelin

I am using the openzeppelin for creating the ICO contract. I am concerned about the MinterRole here. After I develop Token contract, I added the sale contract as a minter using "addMinter" function. ...
1
vote
0answers
7 views

IncreasingPriceCrowdsale breaking TimedCrowdsale

For reasons I can't figure out why open-zeppelin's IncreasingPriceCrowdsale and TimedCrowdsale seem to be conflicting with each other. Here is a basic version of the Crowdsale contract I'm working ...
1
vote
1answer
30 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
1answer
24 views

How to automatically deliver the tokens in a PostDeliveryCrowdsale

My goal is to deliver the tokens only at the end of the crowd sale. I have seen the below code which can deliver the tokens in a batch. Questions Will this work even when there is a million _to ...
1
vote
1answer
33 views

Running Openzepplin from docker

I am trying to build a docker image using open zepplin libraries. It works until it has to import the zepellin library, for which it can't seem to find. Here is what my docker image looks like : ...
0
votes
1answer
25 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 ...
2
votes
1answer
31 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
47 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
53 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
39 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
37 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
67 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
60 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
73 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
25 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
54 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
82 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 ...
1
vote
1answer
54 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
157 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-...
1
vote
1answer
94 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
48 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
83 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
51 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
1answer
1k 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 ...