Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
fa52f391
Commit
fa52f391
authored
Jul 13, 2021
by
github-actions
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Transpile
9645d523
parent
d9632fa2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
6 deletions
+6
-6
ERC1155Upgradeable.sol
contracts/token/ERC1155/ERC1155Upgradeable.sol
+2
-2
README.adoc
contracts/token/ERC20/README.adoc
+1
-1
ERC721Upgradeable.sol
contracts/token/ERC721/ERC721Upgradeable.sol
+1
-1
SignatureCheckerUpgradeable.sol
contracts/utils/cryptography/SignatureCheckerUpgradeable.sol
+1
-1
ERC165CheckerUpgradeable.sol
contracts/utils/introspection/ERC165CheckerUpgradeable.sol
+1
-1
No files found.
contracts/token/ERC1155/ERC1155Upgradeable.sol
View file @
fa52f391
...
...
@@ -415,7 +415,7 @@ contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradea
) private {
if (to.isContract()) {
try IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
if (response != IERC1155ReceiverUpgradeable
(to)
.onERC1155Received.selector) {
if (response != IERC1155ReceiverUpgradeable.onERC1155Received.selector) {
revert("ERC1155: ERC1155Receiver rejected tokens");
}
} catch Error(string memory reason) {
...
...
@@ -438,7 +438,7 @@ contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradea
try IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
bytes4 response
) {
if (response != IERC1155ReceiverUpgradeable
(to)
.onERC1155BatchReceived.selector) {
if (response != IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector) {
revert("ERC1155: ERC1155Receiver rejected tokens");
}
} catch Error(string memory reason) {
...
...
contracts/token/ERC20/README.adoc
View file @
fa52f391
...
...
@@ -22,7 +22,7 @@ Additionally there are multiple custom extensions, including:
* {ERC20Permit}: gasless approval of tokens (standardized as ERC2612).
* {ERC20FlashMint}: token level support for flash loans through the minting and burning of ephemeral tokens (standardized as ERC3156).
* {ERC20Votes}: support for voting and vote delegation.
* {ERC20VotesComp}: support for voting and vote delegation (compatible with Compound's token
n
, with uint96 restrictions).
* {ERC20VotesComp}: support for voting and vote delegation (compatible with Compound's token, with uint96 restrictions).
* {ERC20Wrapper}: wrapper to create an ERC20 backed by another ERC20, with deposit and withdraw methods. Useful in conjunction with {ERC20Votes}.
Finally, there are some utilities to interact with ERC20 contracts in various ways.
...
...
contracts/token/ERC721/ERC721Upgradeable.sol
View file @
fa52f391
...
...
@@ -381,7 +381,7 @@ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeab
) private returns (bool) {
if (to.isContract()) {
try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721ReceiverUpgradeable
(to)
.onERC721Received.selector;
return retval == IERC721ReceiverUpgradeable.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
...
...
contracts/utils/cryptography/SignatureCheckerUpgradeable.sol
View file @
fa52f391
...
...
@@ -24,7 +24,7 @@ library SignatureCheckerUpgradeable {
) internal view returns (bool) {
if (AddressUpgradeable.isContract(signer)) {
try IERC1271Upgradeable(signer).isValidSignature(hash, signature) returns (bytes4 magicValue) {
return magicValue == IERC1271Upgradeable
(signer)
.isValidSignature.selector;
return magicValue == IERC1271Upgradeable.isValidSignature.selector;
} catch {
return false;
}
...
...
contracts/utils/introspection/ERC165CheckerUpgradeable.sol
View file @
fa52f391
...
...
@@ -104,7 +104,7 @@ library ERC165CheckerUpgradeable {
* Interface identification is specified in ERC-165.
*/
function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) {
bytes memory encodedParams = abi.encodeWithSelector(IERC165Upgradeable
(account)
.supportsInterface.selector, interfaceId);
bytes memory encodedParams = abi.encodeWithSelector(IERC165Upgradeable.supportsInterface.selector, interfaceId);
(bool success, bytes memory result) = account.staticcall{gas: 30000}(encodedParams);
if (result.length < 32) return false;
return success && abi.decode(result, (bool));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment