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.
4
questions
1
vote
2answers
657 views
Sign message with web3 and verify with openzeppelin-solidity ECDSA.sol
I'm trying to get a little example working with ECDSA.sol here: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/cryptography/ECDSA.sol
This contract:
Generate a random(...
1
vote
1answer
403 views
ERC721 how does tokenOfOwnerByIndex() list tokens owned by a user?
Per eip-721, there's an optional "enumeration extension". So what I did was I called balanceOf to get the number of tokens owned by the account and called tokenOfOwnerByIndex in a loop to get each ...
1
vote
1answer
113 views
ERC721Token super._mint calls addTokenTo from the top level implementation
Based on Shawn's answer,
super._mint calls addTokenTo from the top level implementation (ERC721Token).
How does this work?
super._mint calls _mint from ERC721BasicToken
reads line addTokenTo
...
0
votes
1answer
207 views
How to use function modifier to control contract function access right?
I deployed a ERC20Mintable token in truffle environment(the source file is ERC20Mintable.sol).
The mint function is declared with onlyMinter modifer:
contract ERC20Mintable is ERC20, MinterRole {
...