* Improved tokens guide, add ERC777.
* Fix typo.
* Add release schedule and api stability.
* Add erc20 supply guide.
* Revamp get started
* Add Solidity version to examples
* Update access control guide.
* Add small disclaimer to blog guides
* Update tokens guide.
* Update docs/access-control.md
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
* Update docs/access-control.md
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
* Update docs/access-control.md
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
* Apply suggestions from code review
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
* Apply suggestions from code review
Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>
* Documentation: Typos and add npm init -y to setup instructions (#1793)
* Fix typos in GameItem ERC721 sample contract
* Add npm init -y to create package.json
* Address review comments.
(cherry picked from commit 852e11c2db)
35 lines
1.2 KiB
Solidity
35 lines
1.2 KiB
Solidity
pragma solidity ^0.5.0;
|
|
|
|
import "./ERC20.sol";
|
|
import "../../lifecycle/Pausable.sol";
|
|
|
|
/**
|
|
* @title Pausable token
|
|
* @dev ERC20 with pausable transfers and allowances.
|
|
*
|
|
* Useful if you want to e.g. stop trades until the end of a crowdsale, or have
|
|
* an emergency switch for freezing all token transfers in the event of a large
|
|
* bug.
|
|
*/
|
|
contract ERC20Pausable is ERC20, Pausable {
|
|
function transfer(address to, uint256 value) public whenNotPaused returns (bool) {
|
|
return super.transfer(to, value);
|
|
}
|
|
|
|
function transferFrom(address from, address to, uint256 value) public whenNotPaused returns (bool) {
|
|
return super.transferFrom(from, to, value);
|
|
}
|
|
|
|
function approve(address spender, uint256 value) public whenNotPaused returns (bool) {
|
|
return super.approve(spender, value);
|
|
}
|
|
|
|
function increaseAllowance(address spender, uint addedValue) public whenNotPaused returns (bool) {
|
|
return super.increaseAllowance(spender, addedValue);
|
|
}
|
|
|
|
function decreaseAllowance(address spender, uint subtractedValue) public whenNotPaused returns (bool) {
|
|
return super.decreaseAllowance(spender, subtractedValue);
|
|
}
|
|
}
|