We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [openzeppelin]

OpenZeppelin provides tools to write, deploy and operate decentralized applications. We also protect leading organizations by performing security audits on their systems and products.

Filter by
Sorted by
Tagged with
1
vote
2answers
36 views

Crazy Math Result from OpenZeppelin

I was getting a "EVM error", so I commented out some code and backtracked to find the issue. I added my _feeAmount to an Emit, and getting a what seems to be a bizarre math answer on a simple math ...
0
votes
2answers
39 views

Super simple token with Open Zeppelin

I want to create a super simple token for my community. I read some tutorials and I found this code: pragma solidity ^0.5.2; import "./lib/oz/contracts/token/ERC20/ERC20Pausable.sol"; import "./lib/...
0
votes
1answer
48 views

Help me Understand the flow of this smart contract

I have 2 smart contract, below is the implementatin of them : 1) import "./MaintainableUpgradeabilityProxy.sol"; function _createProxy(address implementation, address serviceRegistry) internal ...
1
vote
1answer
28 views

openzeppelin access roles.sol

I'm running this contract on remix https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/roles/WhitelistAdminRole.sol There was no error but i saw an warning "Gas ...
7
votes
2answers
74 views

Pros and Cons of smart contract upgradable patterns

There have been quite many arguments around how to achieve smart contract updates like Upgradeable smart contracts. I feel Proxycontract with Delegate-call is currently the most famous one. But aside ...
0
votes
0answers
26 views

Contract can't import remote repository locally

I made a compiler script that takes all contracts in folder ./contracts/ and produces a .json for each contract, containing an ABI and Bytecode. This worked fine for a while. However, I added some ...
1
vote
2answers
37 views

ERC20 not recognized by TokenTracker

I have deployed ERC20 with reference to // File: openzeppelin- zos/contracts/token/ERC20/DetailedMintableToken.sol I called the initialized function with owner, name, symbol and decimal value. ...
0
votes
1answer
33 views

ERC20Mintable contract call return wrong number

I use OpenZeppilin ERC20Mintable contract and add MaxSupply parameter to contraint the ERC20 token amount allowed to issue. what I want is only permit contract ower to view MaxSupply info, my ...
0
votes
1answer
21 views

openzeppelin mint sequence

// openzeppelin v5 contract ERC721Full is ERC721, ERC721Enumerable, ERC721Metadata { constructor (string memory name, string memory symbol) public ERC721Metadata(name, symbol) { // solhint-...
1
vote
2answers
61 views

SafeMath and user input: it's always possible to overflow/underflow. No way out?

SafeMath doesn't prevent overflow/underflow from user input. Example: function sub(uint8 a, uint8 b) public returns(uint8) { require(b <= a); uint8 c = a - b; return c; } Say the user ...
0
votes
1answer
44 views

Is it ok to build app with huge data in ethereum blockchain

I agree that the smart contract works well for small Apps. Is it ok to develop a app with huge data. For this let us take an example of building a huge patient database across hospitals (only with key ...
3
votes
2answers
301 views

Zeppelin OS: revert Cannot call fallback function from the proxy admin

I have been attempting to create a simple upgradable contract using Zeppelin OS: Following the tutorial I have been able to: - Create a new contract - Deploy it using zos push - Create the proxy ...
6
votes
1answer
115 views

Does OpenZeppelin make security audits? [closed]

Does the OpenZeppelin project offer security audit services for other projects and companies?
0
votes
1answer
56 views

While compiling contract i got an error “Error: Could not find path from any sources; imported from path”

pragma solidity ^0.4.22; import './NewToken.sol'; import 'zeppelin-solidity/contracts/crowdsale/emission/MintedCrowdsale.sol'; import 'zeppelin-solidity/contracts/crowdsale/validation/...
2
votes
2answers
108 views

bool side = coinFlip == 1 ? true : false;

I'm currently attempting to solve the Coinflip challenge by Ethernaut and I have trouble understanding the following line of code (after ==): bool side = coinFlip == 1 ? true : false; I can't seem ...
0
votes
2answers
125 views

Create and Run an AllowanceCrowdSale With Zeppelin-OS Contracts

I use the openzeppelin library: https://github.com/OpenZeppelin/openzeppelin-solidity/tree/v1.12.0 token I create a BurnableToken: pragma solidity 0.4.24; import 'openzeppelin-solidity/contracts/...
1
vote
1answer
90 views

OpenZeppelin MintableToken error only on private network

I started a new private network by geth command. geth --networkid "198" --nodiscover --datadir "~/test-geth" --rpc --rpcaddr "0.0.0.0" --rpcport "8545" --rpccorsdomain "*" --rpcvhosts "*" --rpcapi ...
2
votes
1answer
133 views

Created Crowdsales contract, sending ropsten ETH to the contract and Failed

I created crowdsale contract - https://ropsten.etherscan.io/address/0xfbb2759ef0b7169d0a2effa971845ea0f99f87b1 My token - https://ropsten.etherscan.io/token/0x0f26c1c05f1bbBC7Eff0488F1a98619e8a9758cf ...
1
vote
2answers
462 views

zeppelinSales contract constructor expected 3 arguments, received 0

I am trying to deploy Crowdsale contract, but when I do "truffle migrate --network ropsten" I get these errors: Running migration: 1_initial_migration.js Deploying Migrations... ... ...
1
vote
1answer
59 views

Error encountered, bailing. Network state unknown. Review successful transactions manually. exceeds block gas limit

I am trying to deploy my crowdsale contract using "truffle migrate --network ropsten". I encounter this problem "Error encountered, bailing. Network state unknown. Review successful transactions ...
2
votes
2answers
1k views

Type address is not implicitly convertible to expected type contract ERC20

I am trying to compile my crowdsale contract and get this error: " TypeError: Type address is not implicitly convertible to expected type contract ERC20. token = ...
2
votes
2answers
2k views

How do I import from / install OpenZeppelin properly?

I'm a newb dev and want to play with smart contracts, and was trying to figure this out. Ive installed truffle and openzeppelin, everything seems to check out, but in Mist I still get an error when I ...
3
votes
2answers
147 views

Openzeppelin ERC20/StandardToken.sol changes some state variable to private

I made token based on Openzeppelin ERC20. Few days before, StandardToken.sol which I imported changed some of its state variables(total supply_, balances) from internal to private. github history ...
0
votes
1answer
126 views

Is the Truffle Migrations contract the same as OpenZeppelin's Ownable?

Please help me to understand what the Migrations contract in the truffle suite does. Are we supposed to inherit from it? What if I'm using OpenZepp's Ownable? Or does this file allow for long term ...
0
votes
1answer
110 views

Created Standard Token, deployed successfully but on Myetherwallet error

Here is the token contract I created - https://ropsten.etherscan.io/address/0x2cccce414fcdf028c0574766af4302a4abeb5788 Address: 0x2CCcCe414FCdF028C0574766Af4302A4aBEB5788 For some reason I can not ...
2
votes
2answers
84 views

The contract code couldn't be stored, please check your gas amount. [Zeppelin, Truffle.js, Ropsten]

I am having some problem with deploying the simple Token Contract to Ropsten network. Error is "The contract code couldn't be stored, please check your gas amount". I tried to change Gas values ...
1
vote
1answer
481 views

DeclarationError: Identifier already declared. Two imports import the same ERC721 contract

Im building a contract that uses two contracts that both use the ERC721 zeppelin contract, when I import the two as such: import nonFungableWidthAddedFunctionality1.sol; import ...
0
votes
1answer
58 views

When extending a contract how to call the external constructor and pass parameters?

I have the following contract import "zeppelin-solidity/contracts/token/ERC721/ERC721Token.sol"; contract Contract is ERC721Token { function Contract(string _name, string _symbol) public { ...
1
vote
1answer
294 views

Truffle react with Proxy Contract of OpenZeppelin

Is it possible to create a react app with truffle framework using the Proxy Contract of OpenZeppelin for upgradable contract? What I understood is that one should send a transaction at Proxy ...
0
votes
1answer
174 views

Cannot deploy contact to ropsten via remix

I'm trying to deploy a token contract and a crowdsale contract via Remix on Ropsten. However I am running into trouble. Below are both of my smart contracts and an explanation of what is happening. ...
1
vote
0answers
146 views

How to Deploy non-Migratable Contract in Zeppelin OS?

I am using Zeppelin OS to create a migratable contract MyContract, which will be imported into another contract Foo. Foo calls the baz() function of MyContract, so when MyContract is upgraded, Foo ...
0
votes
1answer
244 views

SenTransaction can't send Ether to a contract address

I am using openzeppelin, Ganache and truffle, here's a very simple smart contract for fundraising: pragma solidity 0.4.24; import 'openzeppelin-solidity/contracts/crowdsale/Crowdsale.sol'; contract ...
2
votes
1answer
115 views

Correct way to transfer ERC-20 tokens and keeping decimals in count?

I have a token with 18 decimals, I'm using the OpenZeppelin StandardToken example and have figured out that when I want to send value I have to keep the decimals in count as such: _value * 10**...
1
vote
1answer
173 views

How do OpenZeppelin ERC721 tests pass?

I don't understand how the following test can pass. I tried it in my application and it fails. The entry point is the description 'when called by the owner'. In this function two test cases are ...
0
votes
1answer
70 views

Can a smart contract be set up so that a function to forward funds sends a set percentage of the Ether received to 2 or more contracts?

For example the the openzeppelin crowdsale contract has a function that sends ether to a wallet address. Could this method include logic to send 60% of the funds received to Alice's wallet and 40% to ...
0
votes
1answer
131 views

Does an ERC721 contract have to rely on an external agent to be the approved spender?

I am creating a dApp that services a game. The "house" in the game is my game server that creates the smart contract using Web3.js. It also owns all the non-fungible assets at the start of the game, ...
3
votes
1answer
614 views

What's the point of ERC721Receiver.sol and ERC721Holder.sol in OpenZeppelin's implementation?

I'm studying OpenZeppelin's ERC721 token implementation and I'm having a hard time making sense of ERC721Receiver.sol and ERC721Holder.sol and how they relate to eachother. In the file ...
1
vote
1answer
148 views

Help with inheritance and Truffle tests

I have two contracts that both inherit from OpenZeppelin's Whitelist. After deploying both contracts, I use an instance of the first contract to add a "trusted" address to the whitelist. Since both ...
1
vote
1answer
236 views

On the unstructured storage upgrade pattern, why do we have to follow the structure of the previous contract?

ZeppelinOS has adopted the unstructured storage proxy pattern to upgrade contracts. In the blog post that introduces this pattern, they say: "The only thing you will have to care about is that ...
0
votes
1answer
74 views

What happens with the balance of a contract after it is upgraded using ZeppelinOS?

ZeppelinOS implements upgradeability of smart contracts through the use of a proxy and unstructured storage. If the contract holds some ether, what happens with that ether after it is upgraded?
4
votes
2answers
781 views

Solidity Error: Exceeds block gas limit

When I start ganache-cli in one terminal window and run ./node_modules/.bin/solidity-coverage (command from documentation) in another I get Error: Exceeds block gas limit at Object....
0
votes
1answer
220 views

Correct Open Zeppelin contract for external agent contract that handles sales logic on behalf of an ERC721 contract?

I just finished this article on the Open Zeppelin ERC721 token implementation: https://medium.com/blockchannel/walking-through-the-erc721-full-implementation-72ad72735f3c I about to start ...
1
vote
1answer
347 views

Error parsing … ParsedContract.sol:33:18: ParserError: Expected token Semicolon got 'LParen'

When compiling my contract code in truffle I receive this error: Error parsing zeppelin-solidity/contracts/token/ERC20/StandardToken.sol: ParsedContract.sol:33:18: ParserError: Expected token ...
1
vote
2answers
555 views

SafeMath library vs SafeMath contract on the inheritance chain

guys, I am developing ERC-20 token and I am wondering why SafeMath is used as as library in the OpenZeppelin implementation? Will not it be more optimal if we supply it as a base contract on the ...
1
vote
1answer
227 views

Multiple timelocks on wallets in contract

I am developing an ERC20 token which needs to have a timelock on a certain wallet that unlocks a certain amount of tokens every month. I am currently using the openzeppelin function: function ...
0
votes
1answer
80 views

Can't use token variable's method at contract that inherit zeppelin crowdsale?

Calling the method of Crowdsale's "token" on the source that inherited Crowdsale of zeppelin v1.8.0 inevitably causes "out of gas". Error: Error: VM Exception while executing eth_call: out of gas ...
1
vote
1answer
63 views

zeppelin-solidity: WhyHasNoEther contract prevent accidental loss of Ether

I am writing smart contract. I am looking for Zeppelin with many helpful methods. But there is one contract that I don't understand named HasNoEther. pragma solidity ^0.4.18; import "./Ownable.sol"; ...
2
votes
1answer
143 views

How do investors get refund when `RefundableCrowdsale` does not reach its goal?

Question regarding RefundableCrowdsale of OpenZeppelin. When its goal isn't reached, how do investors get refund? By calling the claimRefund() method? How do they call the method??
0
votes
1answer
52 views

Chicken-Egg Problem when I deploy a Crowdsale with Standard Token

I just try to implement a standard token with a basic crowdsale from open zeppelin. I have everything up and running but the transaction always reverts and I tracked it down to this line: token....
2
votes
1answer
316 views

TypeError: Member “mint” not found or not visible after argument-dependent lookup in contract ERC20

token.mint(beneficiary, tokens) prevents code from fully compiling using Zeppelin 1.8. Casting your token as a MintableToken* solves this issue and allows your code to compile: MintableToken token = ...